pub struct DenseFp8Plan {
pub ffn_nvfp4: bool,
pub attn_nvfp4: bool,
pub attn_fp8_twins: Fp8TwinSet,
}Expand description
What a native-FP8 dense layer must materialise beyond the checkpoint bytes.
Every field is “build this derived copy”: false means the selected
kernels provably never read it.
Fields§
§ffn_nvfp4: boolNVFP4 gate/up/down and their w4a16_gemm_t_m128 transposed twins.
attn_nvfp4: boolNVFP4 q/k/v/o, their transposed twins, and the fused [q|k|v] twin.
attn_fp8_twins: Fp8TwinSetWhich Fp8WeightTransposed twins transpose_fp8_for_prefill builds.
Implementations§
Source§impl DenseFp8Plan
impl DenseFp8Plan
Sourcepub fn resolve(i: DenseFp8Inputs) -> Self
pub fn resolve(i: DenseFp8Inputs) -> Self
The decision table. Pure — no environment reads, no allocation.
- FFN NVFP4 — unreachable the moment
set_fp8_weightsruns (see the module docs: every entry point returns from inside the FP8 arm and thew8_gemm!transposed operands are a literalNone). Built only under the escape hatch. - Attention NVFP4 —
set_fp8_weightsoverwritesq_weight/k_weight/v_weight/o_weightwithQuantWeight::Fp8, so the base NVFP4 weights are orphaned at load. The transposed and fused twins survive only behind theATLAS_CUTLASS_NVFP4_*levers, which default off. - Attention FP8 twins, K and V — KEPT UNCONDITIONALLY. The
first prefill chunk (
seq_len_start == 0, the default for every request) does not go throughpaged_qkv.rsat all: it goes throughprefill/cache_skip_qkv.rs, whose dispatch chain has no W8A8 arm, sok_fp8w_t/v_fp8w_tare dereferenced atcache_skip_qkv.rs:218/:235on every request regardless offp8_blockscaled_prefill. Freeing them is a NULL-pointer kernel launch on the first token. - Attention FP8 twins, Q and O — Q on that same chain is behind
ATLAS_ATTN_PREFILL_Q_T=1(cache_skip_qkv.rs:142) and O is routed topaged_oproj.rsfrom both chains, so both are reachable only after the W8A8 arm declines — block-scaled prefill off, or a target missing one of the two kernels.
Trait Implementations§
Source§impl Clone for DenseFp8Plan
impl Clone for DenseFp8Plan
Source§fn clone(&self) -> DenseFp8Plan
fn clone(&self) -> DenseFp8Plan
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DenseFp8Plan
impl Debug for DenseFp8Plan
Source§impl PartialEq for DenseFp8Plan
impl PartialEq for DenseFp8Plan
impl Copy for DenseFp8Plan
impl Eq for DenseFp8Plan
impl StructuralPartialEq for DenseFp8Plan
Auto Trait Implementations§
impl Freeze for DenseFp8Plan
impl RefUnwindSafe for DenseFp8Plan
impl Send for DenseFp8Plan
impl Sync for DenseFp8Plan
impl Unpin for DenseFp8Plan
impl UnwindSafe for DenseFp8Plan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.