pub struct DecodeW8a8Plan {
pub rows: usize,
pub n: u32,
pub k: u32,
pub ldc: u32,
pub out_capacity_bytes: usize,
}Expand description
2026-09-25: The shape and output of one decode projection, as
decode_w8a8_selected judges it. The route is taken only when all of
these hold:
family_armed: the caller’ssuper::CublasScopefamily (ssmorattn) is on.disabledis false (w8a8_decode_proj_disabled).rowsis inDECODE_W8A8_ROWS.- The weight is
Fp8BlockScaled, since cuBLASLt is given its scales as a[N/128, K/128]grid. nandkare multiples of 128, andblk128x128_stride_ok(k)holds (ka multiple of 512), the weight-scale stride rule thatmetrale_gpu_runtime::cublaslt::scale_layoutquotes.ldc >= n.- The output holds the padded write extent (
strided_out_extent_elems). - The quantizer resolved, and the scratch holds
m_padrows in the active scale layout, adapter kernel and buffer included when it is K-major.
Fields§
§rows: usize2026-09-25: Padded decode rows (the forward context’s n).
n: u322026-09-25: Output width of this projection.
k: u322026-09-25: Contract width of this projection.
ldc: u322026-09-25: Output row pitch in BF16 elements (n for a contiguous
output).
out_capacity_bytes: usize2026-09-25: Allocated size of the output buffer, in bytes.
Implementations§
Source§impl DecodeW8a8Plan
impl DecodeW8a8Plan
Sourcepub fn contiguous(
rows: usize,
n: u32,
k: u32,
out_capacity_bytes: usize,
) -> Self
pub fn contiguous( rows: usize, n: u32, k: u32, out_capacity_bytes: usize, ) -> Self
2026-09-25: A contiguous [rows, n] output (GDN in_proj_qkvz and
out_proj, attention o_proj).
Sourcepub fn strided(
rows: usize,
n: u32,
k: u32,
ldc: u32,
out_capacity_bytes: usize,
) -> Self
pub fn strided( rows: usize, n: u32, k: u32, ldc: u32, out_capacity_bytes: usize, ) -> Self
2026-09-25: A strided output: rows ldc BF16 elements apart (attention
Q/K/V into the [n, per_seq_qkv] multi-sequence QKV buffer).
Sourcepub fn write_extent_bytes(&self) -> usize
pub fn write_extent_bytes(&self) -> usize
2026-09-25: Bytes of out this projection may write, pad rows included.
Trait Implementations§
Source§impl Clone for DecodeW8a8Plan
impl Clone for DecodeW8a8Plan
Source§fn clone(&self) -> DecodeW8a8Plan
fn clone(&self) -> DecodeW8a8Plan
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 DecodeW8a8Plan
impl Debug for DecodeW8a8Plan
impl Copy for DecodeW8a8Plan
Auto Trait Implementations§
impl Freeze for DecodeW8a8Plan
impl RefUnwindSafe for DecodeW8a8Plan
impl Send for DecodeW8a8Plan
impl Sync for DecodeW8a8Plan
impl Unpin for DecodeW8a8Plan
impl UnwindSafe for DecodeW8a8Plan
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