TargetDefaults

Struct TargetDefaults 

Source
pub struct TargetDefaults {
Show 15 fields pub hw: &'static str, pub lm_head_batchm_max: u32, pub ssm_batched_recurrent: bool, pub gdn_prefill_tc: bool, pub ssm_ba_gates_hopper: bool, pub fp8_act_quant_hopper: bool, pub decode_split_silu: bool, pub attn_decode_splitk: &'static str, pub ffn_m16_tc: bool, pub attn_m16_tc: bool, pub lm_head_m16_tc: bool, pub attn_ncol_gemv: bool, pub ffn_gateup_fused: bool, pub w8a8_prefill_max_m_widening: u32, pub w8a8_prefill_max_m_narrowing: u32,
}
Expand description

2026-09-25: One compiled target’s serving defaults. A const that build.rs writes into OUT_DIR/target_ptx.rs and lib.rs include!s, so crate::TARGET_DEFAULTS is known at compile time.

Fields§

§hw: &'static str

2026-09-25: The kernels/<hw> directory this binary was built for (METRALE_TARGET_HW, else build_diagnose::DEFAULT_HW). It is set even when that tree has no HARDWARE.toml: read_defaults then returns baseline(hw).

§lm_head_batchm_max: u32

2026-09-25: Upper edge of the BF16 decode head’s batched-GEMV band (metrale-model-engine model/trait_impl/lm_head_batched.rs). The resolver clamps it to DENSE_GEMV_BATCHM_MAX_M (resolve_batchm_max). hopper declares 16; gb10, b200 and b300 declare the baseline 8.

§ssm_batched_recurrent: bool

2026-09-25: Batched recurrent launch on the GDN decode path (metrale-model-layers layers/qwen3_ssm/gdn_flags.rs). True on hopper.

§gdn_prefill_tc: bool

2026-09-25: The tensor-core GDN chunked-prefill family, including the gated_delta_rule_chunk_delta_h_tcfuse_x2 state spine (kernels/hopper/common/gated_delta_rule_chunk_tc.cu), selected in metrale-model-layers layers/ops/ssm_gdn_a3.rs. True on hopper.

§ssm_ba_gates_hopper: bool

2026-09-25: dense_gemm_ba_gates_prefill_hopper, one CTA per token, for the SSM BA projection and GDN gate transforms (metrale-model-layers layers/ops/ssm_ba_gates_hopper.rs). True on hopper. Its source exists only under kernels/hopper, so the row has no effect elsewhere. SSM-BA-GATES-ATTRIBUTION.md holds the measurements.

§fp8_act_quant_hopper: bool

2026-09-25: per_token_group_quant_fp8_hopper (kernels/hopper/common/fp8_act_quant_hopper.cu) for the per-token FP8 activation quantizer. True on hopper. The twin takes a launch only when its grid reaches the CTA floor in metrale-model-layers layers/ops/fp8_act_quant_floor.rs. Its source exists only under kernels/hopper, so the row has no effect elsewhere. FP8-ACT-QUANT-ATTRIBUTION.md holds the measurements.

§decode_split_silu: bool

2026-09-25: Split SiLU+down on the decode path (ModelLevers::decode_split_silu). True on every declaring target; METRALE_NO_DECODE_SPLIT_SILU turns it off.

§attn_decode_splitk: &'static str

2026-09-25: How the paged-decode attention path picks its KV split count: legacy, auto or a pinned count, parsed by crate::attn_splitk::parse. hopper declares auto; every other target declares or defaults to legacy.

§ffn_m16_tc: bool

2026-09-25: The w8a16_gemm_m16 tensor-core tier on the dense-FFN decode arm (metrale-model-layers layers/dense_ffn_m16_tc.rs). False on every target, hopper included; the hopper HARDWARE.toml records why.

§attn_m16_tc: bool

2026-09-25: The w8a16_gemm_m16{,_strided} tensor-core tiers on the decode Q/K/V and o_proj projections. True on hopper.

§lm_head_m16_tc: bool

2026-09-25: The dense_gemm_m16_bf16 tensor-core arm on the BF16 decode head (metrale-model-engine model/trait_impl/lm_head_batched.rs). True on hopper. It reassociates the K reduction relative to dense_gemv_bf16, so a near-tie argmax can change.

§attn_ncol_gemv: bool

2026-09-25: w8a16_gemv_batch16_ncol{2,4} on the decode attention projections (metrale-model-layers layers/qwen3_attention/attn_ncol_gemv.rs). False on every target.

§ffn_gateup_fused: bool

2026-09-25: One fused [gate | up] GEMM at N = 2 * intermediate instead of two at N = intermediate (metrale-model-layers layers/dense_ffn_gateup_fused.rs). True only on hopper; its strided-SiLU consumer (kernels/hopper/common/silu_mul_strided.cu) exists only in the hopper tree.

§w8a8_prefill_max_m_widening: u32

2026-09-25: Upper M for the W8A8 block-scaled dense-FFN prefill on a widening projection (n > k: gate/up), read in metrale-model-layers layers/dense_ffn_w8a8_prefill.rs. u32::MAX means no cap. gb10 declares 64; its HARDWARE.toml records the measurement.

§w8a8_prefill_max_m_narrowing: u32

2026-09-25: Upper M for the same path on a narrowing projection (n <= k: down). gb10 declares 384. See Self::w8a8_prefill_max_m_widening.

Trait Implementations§

Source§

impl Clone for TargetDefaults

Source§

fn clone(&self) -> TargetDefaults

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TargetDefaults

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for TargetDefaults

Source§

fn eq(&self, other: &TargetDefaults) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for TargetDefaults

Source§

impl Eq for TargetDefaults

Source§

impl StructuralPartialEq for TargetDefaults

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.