pub struct Results {
pub schema: String,
pub kernel: String,
pub entry: String,
pub plan_cc: String,
pub device_name: String,
pub device_cc: String,
pub driver_version: String,
pub candidates: Vec<CandidateResult>,
pub total_gpu_seconds: f64,
pub strategy: Option<String>,
pub budget_exhausted: bool,
}Expand description
A results.v1 document: every measurement, and the machine that took it.
Checkpointed after each candidate, so an interrupted sweep resumes from what it already measured rather than starting over.
Fields§
§schema: StringSchema tag; always results.v1.
kernel: StringThe kernel measured.
entry: StringThe entry point launched.
plan_cc: StringThe capability the plan was gated at.
device_name: StringProduct name of the device, as the driver reports it.
device_cc: StringThe device’s actual capability, which need not equal plan_cc.
driver_version: StringDriver version. Part of what makes a timing reproducible, and part
of why results do not port (docs/LIMITATIONS.md).
candidates: Vec<CandidateResult>One entry per candidate visited, in visiting order.
total_gpu_seconds: f64GPU seconds the whole sweep consumed.
strategy: Option<String>Strategy that produced the visiting order (exhaustive | random:<seed>).
budget_exhausted: boolTrue when the sweep stopped because the wall budget ran out.
Implementations§
Source§impl Results
impl Results
Sourcepub fn load(path: &Path) -> Result<Option<Self>, String>
pub fn load(path: &Path) -> Result<Option<Self>, String>
Read results.v1 from a run directory.
Ok(None) means one thing only: the file is not there, so the
measurement box has not run yet. Everything else is an error.
This used to be read_to_string(path).ok()? then from_str().ok(),
so a truncated file, an empty one, null, [], a results.v2 from
a newer runner and a directory named results.json all collapsed
into that same None — and report rendered “nothing measured yet”,
exit 0, nothing on stderr, with a JSON report that validated. The run
directory is the hand-off between two machines, and the two
conditions call for opposite actions: wait, or go and look. Nothing
told them apart.
verdicts.v1 two lines away in the report builder already checked
its schema tag by name; this is the same check, so a future
results.v2 is refused by name rather than read as nothing.
§Errors
Any I/O error that is not NotFound, any parse failure, and any
document whose schema is not results.v1 — each naming the path.