DecodeW8a8Plan

Struct DecodeW8a8Plan 

Source
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’s super::CublasScope family (ssm or attn) is on.
  • disabled is false (w8a8_decode_proj_disabled).
  • rows is in DECODE_W8A8_ROWS.
  • The weight is Fp8BlockScaled, since cuBLASLt is given its scales as a [N/128, K/128] grid.
  • n and k are multiples of 128, and blk128x128_stride_ok(k) holds (k a multiple of 512), the weight-scale stride rule that metrale_gpu_runtime::cublaslt::scale_layout quotes.
  • ldc >= n.
  • The output holds the padded write extent (strided_out_extent_elems).
  • The quantizer resolved, and the scratch holds m_pad rows in the active scale layout, adapter kernel and buffer included when it is K-major.

Fields§

§rows: usize

2026-09-25: Padded decode rows (the forward context’s n).

§n: u32

2026-09-25: Output width of this projection.

§k: u32

2026-09-25: Contract width of this projection.

§ldc: u32

2026-09-25: Output row pitch in BF16 elements (n for a contiguous output).

§out_capacity_bytes: usize

2026-09-25: Allocated size of the output buffer, in bytes.

Implementations§

Source§

impl DecodeW8a8Plan

Source

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).

Source

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).

Source

pub fn m_pad(&self) -> u32

2026-09-25: The padded M cuBLASLt is handed.

Source

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

Source§

fn clone(&self) -> DecodeW8a8Plan

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 DecodeW8a8Plan

Source§

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

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

impl Copy for DecodeW8a8Plan

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,