pub struct DenseFp8Plan {
pub ffn_nvfp4: bool,
pub attn_nvfp4: bool,
pub attn_fp8_twins: Fp8TwinSet,
}Expand description
2026-09-25: Which derived copies one dense layer builds beyond the checkpoint bytes. Each field means “build this copy”.
Fields§
§ffn_nvfp4: bool2026-09-25: The NVFP4 gate/up/down weights and their transposed twins
(fp8_lut::load_dense_ffn).
attn_nvfp4: bool2026-09-25: The NVFP4 q/k/v/o weights, their transposed twins, and the
fused [q|k|v] transposed twin.
attn_fp8_twins: Fp8TwinSet2026-09-25: Which FP8 prefill twins transpose_fp8_for_prefill_selected
builds.
Implementations§
Source§impl DenseFp8Plan
impl DenseFp8Plan
Sourcepub fn resolve(i: DenseFp8Inputs) -> Self
pub fn resolve(i: DenseFp8Inputs) -> Self
2026-09-25: The decision table.
- FFN NVFP4: built only when the layer has no FFN overlay, or under
keep_nvfp4(the module docs say why the FP8 FFN never reads it). - Attention NVFP4:
set_fp8_weightsreplacesq_weight,k_weight,v_weightando_weightwithQuantWeight::Fp8. The NVFP4 copies are kept when aMETRALE_CUTLASS_NVFP4_*attention arm (cutlass_nvfp4_*in the dispatch) or the W4A4 o_proj arm (attn_w4a4) can read them. - FP8 twins K and V: built on every FP8 attention layer unless the
umbrella flag is set (last item). A single
stream’s first prefill chunk (
seq_len_start == 0) runsprefill/cache_skip_qkv.rs, whose only W8A8 arm is the cuBLASLt one (cache_skip_qkv_cublas_selected, which needsMETRALE_CUBLAS_GEMMto coverattn). When it declines, K and V readk_fp8w_tandv_fp8w_tif present. - FP8 twins Q and O: Q is read on that chain only with
attn_prefill_q_t, and on the paged chain after its W8A8 arm declines; both chains run O throughprefill/paged_oproj.rs, which reads the O twin after its W8A8 arm declines. The W8A8 arms decline when block-scaled prefill is off or a W8A8 kernel is missing. - Under the umbrella
cutlass_nvfp4_gemmno FP8 twin is planned, becausetranspose_fp8_for_prefill_selectedbuilds none under that flag.
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
Checks if this value is equivalent to the given key. Read more
§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.