Expand description
2026-09-25: Kernel-target resolution: which compiled target serves a
checkpoint. The rules are pure functions over ResolveCandidates, so
they are tested without compiled kernels.
(model_type, hidden_size) alone can collide: kernels/gb10/qwen3.6-27b
and kernels/gb10/qwen3.8-27b both declare (qwen3_5, 5120).
The rules:
- Exact
(model_type, Some(hidden_size))declarations are tried before wildcard(model_type, None)ones. - Within the first tier that matches, one target name wins outright.
- Several names are a collision, broken by
match_names: a candidate survives when one of its needles is a case-insensitive substring of a checkpoint reference (HF id,--model-name, resolved model dir). Exactly one surviving name wins. - Zero or several survivors are
TargetResolveError::Ambiguous; the wildcard tier is not tried. --kernel-target <name>pins a target and skips the tie-break, but the pinned target must declare the checkpoint’smodel_typefor thishidden_sizeor a wildcard (TargetResolveError::PinIncompatible).
Owner: kernels crate. Invariants:
- Resolution never chooses between different target names by iteration order: a collision it cannot break is an error.
build.rs(validate_collision_match_names) panics when a target in a collision of the build’s targets has nomatch_names.
Structs§
- Resolve
Candidate - 2026-09-25: The parts of one compiled target that resolution reads,
borrowed so production can wrap
TargetPtxSets without copying blobs.
Enums§
- Target
Resolve Error - 2026-09-25: Why resolution could not choose a target.
Functions§
- ptx_
for_ config - 2026-09-25: The compiled target that serves a checkpoint, by the module’s
rules:
resolve_pinnedwhenpinned_target(--kernel-target) is set, elseresolve_targetoverall_ptx_sets().Ok(None)when no compiled target declares the pair. - ptx_
for_ exact_ target - 2026-09-25: The compiled target with exactly this
(model, quant)identity, orNone. For callers that already know the resolved target, such as the dashboard’s kernel table, which looks up the targetservepublished. - resolve_
pinned - 2026-09-25: Resolve a
--kernel-targetpin, matched case-insensitively against target names. The first same-named candidate that declares the checkpoint’smodel_typewith thishidden_sizeor a wildcard wins; the tie-break is not consulted. - resolve_
target - 2026-09-25: Which candidate serves
(model_type, hidden_size)for a checkpoint identified bymodel_refs: its index,Ok(None)when no tier declares the pair, orTargetResolveError::Ambiguouswhen a collision does not break to exactly one name.