TargetPtxSet

Struct TargetPtxSet 

Source
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 str

2026-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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.