TargetPtxSet

Struct TargetPtxSet 

Source
pub struct TargetPtxSet {
    pub target: KernelTarget,
    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

Kernel modules hyperoptimized for a specific (H, M_q) target.

Each blob is the compiled kernel for one module, emitted uniformly as &'static [u8] by build.rs (include_bytes!). NVIDIA PTX is ASCII text but valid as bytes; SCALE/AMD and Metal produce binary objects. The runtime registry sniffs text-vs-binary per blob at load time.

Fields§

§target: KernelTarget§modules: Vec<(&'static str, &'static [u8])>§sampling: SamplingPresets§behavior: ModelBehavior§model_type_matches: Vec<ModelTypeMatch>§match_names: &'static [&'static str]

[model] match_names needles from MODEL.toml — case-insensitive substrings of the checkpoint reference (HF id / --model-name / resolved model dir) that identify checkpoints THIS target serves. Consulted only to break a tie when several targets declare the same (model_type, hidden_size) (e.g. qwen3.6-27b vs qwen3.8-27b, whose configs are bit-identical); see resolve::resolve_target. Empty for targets that never collide — build.rs panics if a colliding target omits them.

§dflash: Option<DflashConfig>

DFlash drafter pairing for this model. None when the MODEL.toml has no [dflash] section. Consumed by spark-server when --dflash is set without an explicit --draft-model flag.

§shadowed_dropped: &'static [(&'static str, &'static str)]

(module, kernel) pairs this model’s kernel files DROPPED by shadowing their common/ namesakes — the kernel exists in common/ but this model’s fork of the file does not define it, so it is not compiled here.

Shadowing is whole-file, so a fork that predates a kernel added to common/ silently loses it: try_kernel returns handle 0 and whatever depends on it fails CLOSED. The startup audit joins this against the kernels the model actually looked up, which separates the two classes of missing kernel — dropped-by-fork (a build defect) from never-built-for-this-architecture (expected, e.g. MLA on a Qwen model).

§expected_absent: &'static [(&'static str, &'static str)]

(module, kernel) lookups this model’s dispatch may issue and fail to resolve WITHOUT that being an error, declared in the model’s MODEL.toml [expected_absent] with a mandatory stated reason per entry.

The boot audit (kernel_audit::classify_failures) fails CLOSED on every unresolved lookup that is not in this list, so the list is the entire difference between “this model is known to run this way” and “nobody has looked”. It is TRANSITIONAL: the right fix for a lookup that can never resolve is to gate it on config so it is never issued (see qwen3_attention::init_arch_gates), which removes it from here.

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.