pub fn ptx_for_config(
model_type: &str,
hidden_size: usize,
model_refs: &[&str],
pinned_target: Option<&str>,
) -> Result<Option<TargetPtxSet>, TargetResolveError>Expand description
Find the PTX module set matching a checkpoint.
Matching rules (full statement + rationale in this module):
- Exact match on
(model_type, Some(hidden_size))beats wildcard(model_type, None). - When several differently-named targets declare the same pair (the
configs of e.g. Qwen3.6-27B and Qwen3.8-27B are bit-identical), the
tie is broken by matching each target’s declared
match_namesneedles againstmodel_refs(HF id,--model-name, resolved model dir) — and a tie that does not break to exactly one target isErr(TargetResolveError::Ambiguous), never a build-order pick. pinned_target(--kernel-target) bypasses the tie-break but must name a compiled target that declares the(model_type, hidden_size).Ok(None)if no compiled target declares the pair at all.