pub struct BenchPlan {
pub schema: String,
pub kernel: String,
pub entry: String,
pub cc: String,
pub allow_unsafe_reason: Option<String>,
pub candidates: Vec<Candidate>,
}Expand description
A plan.v1 document: every candidate to measure, and how.
Fields§
§schema: StringSchema tag; always plan.v1.
kernel: StringThe kernel being tuned.
entry: StringThe #[kernel] entry point to launch, as named in the PTX.
cc: StringThe capability the gate ran at, carried so the runner can refuse a plan built for a different target than the device it holds.
allow_unsafe_reason: Option<String>Present iff the plan includes gate-refused candidates: the explicit, recorded reason the operator gave to –allow-unsafe (see the README). Never a default.
candidates: Vec<Candidate>The candidates to measure, in plan order. A strategy visits them in its own order without reordering this list.
Implementations§
Source§impl BenchPlan
impl BenchPlan
Sourcepub fn load(path: &Path) -> Result<Self, PlanError>
pub fn load(path: &Path) -> Result<Self, PlanError>
Read a plan, refusing any schema but plan.v1.
The schema check is not a formality: the runner launches whatever a plan tells it to, on a real device, so a document it half-understands is worse than one it rejects.
Sourcepub fn param_slots(candidate: &Candidate) -> usize
pub fn param_slots(candidate: &Candidate) -> usize
Number of .param slots this candidate’s args expand to (each
ArgSpec is exactly one slot; slices appear as explicit ptr + len_of
pairs). Used to validate against the PTX entry signature.