pub struct TargetPtxSet {
pub target: KernelTarget,
pub ptx_arch: &'static str,
pub modules: Vec<(&'static str, &'static [u8])>,
pub sampling: SamplingPresets,
pub behavior: ModelBehavior,
pub model_type_matches: Vec<ModelTypeMatch>,
pub match_names: &'static [&'static str],
pub dflash: Option<DflashConfig>,
pub shadowed_dropped: &'static [(&'static str, &'static str)],
pub expected_absent: &'static [(&'static str, &'static str)],
}Expand description
2026-09-25: One compiled kernel target: its KernelTarget identity,
kernel blobs and MODEL.toml declarations.
Each blob is one compiled module, emitted as &'static [u8] by build.rs
(include_bytes!): PTX text for NVIDIA, binary objects for SCALE, HIP and
Metal.
Fields§
§target: KernelTarget§ptx_arch: &'static str2026-09-25: The kernels/<hw>/HARDWARE.toml [hardware].arch this
target was compiled with, verbatim (sm_90a, sm_121f, gfx1151).
KernelTarget::arch holds the same string with an a/f suffix
stripped (build_arch::kernel_target_arch). The GPU arch preflight
judges compatibility on this field, because the suffix changes which
devices the PTX runs on; it skips an empty value.
modules: Vec<(&'static str, &'static [u8])>§sampling: SamplingPresets§behavior: ModelBehavior§model_type_matches: Vec<ModelTypeMatch>§match_names: &'static [&'static str]2026-09-25: MODEL.toml [model] match_names: case-insensitive
substrings of a checkpoint reference (HF id, --model-name, resolved
model dir) that identify checkpoints this target serves. Consulted only
to break a tie between targets that declare the same
(model_type, hidden_size); see crate::resolve::resolve_target.
build.rs (validate_collision_match_names) panics if a colliding
target leaves it empty.
dflash: Option<DflashConfig>2026-09-25: DFlash drafter pairing; None when MODEL.toml has no
[dflash] section with a draft_model.
shadowed_dropped: &'static [(&'static str, &'static str)]2026-09-25: (module, kernel) pairs this target’s leaf-role files
drop relative to their common/ namesakes: the common/ file defines
the kernel, the model’s file of the same name does not, and a model
file replaces its namesake whole. The boot kernel audit reports them
per module.
expected_absent: &'static [(&'static str, &'static str)]2026-09-25: (module, kernel) lookups this model’s dispatch may issue
and fail to resolve without that being an error, from MODEL.toml
[expected_absent]; the build panics on an entry without a reason.
The boot kernel gate refuses to serve on any other unresolved lookup
unless --dangerously-allow-unresolved-kernel-lookups is set.