pub struct W4a4Proj(/* private fields */);Expand description
2026-09-30: The W4A4 kernels of one backend (see the module header).
Implementations§
Source§impl W4a4Proj
impl W4a4Proj
Sourcepub fn for_launch(
gpu: &dyn GpuBackend,
weight: &QuantizedWeight,
m: u32,
n: u32,
k: u32,
) -> Option<Self>
pub fn for_launch( gpu: &dyn GpuBackend, weight: &QuantizedWeight, m: u32, n: u32, k: u32, ) -> Option<Self>
2026-09-30: The kernels for an m-row [n, k] projection over weight, when the tier
admits it there (nvfp4_proj_small_m then runs W4A4); None when it runs W4A16.
Sourcepub fn prepared(gpu: &dyn GpuBackend) -> Option<Self>
pub fn prepared(gpu: &dyn GpuBackend) -> Option<Self>
2026-09-30: The kernels once prepare found them, for the quantize launch alone.
Sourcepub fn quant_kernel(&self) -> KernelHandle
pub fn quant_kernel(&self) -> KernelHandle
2026-09-30: w4a4_quant_rows.
Sourcepub fn mx_kernel(&self, m: u32, n: u32, k: u32) -> KernelHandle
pub fn mx_kernel(&self, m: u32, n: u32, k: u32) -> KernelHandle
2026-09-30: The MX entry an m-row [n, k] launch takes.
Sourcepub fn quantize(
&self,
gpu: &dyn GpuBackend,
input: DevicePtr,
act: Nvfp4ActBuf,
m: u32,
k: u32,
stream: u64,
) -> Result<()>
pub fn quantize( &self, gpu: &dyn GpuBackend, input: DevicePtr, act: Nvfp4ActBuf, m: u32, k: u32, stream: u64, ) -> Result<()>
2026-09-30: Quantize m rows of the BF16 input ([m, k]) into act.
Sourcepub fn gemv(
&self,
gpu: &dyn GpuBackend,
act: Nvfp4ActBuf,
weight: &QuantizedWeight,
output: DevicePtr,
m: u32,
n: u32,
k: u32,
stream: u64,
) -> Result<()>
pub fn gemv( &self, gpu: &dyn GpuBackend, act: Nvfp4ActBuf, weight: &QuantizedWeight, output: DevicePtr, m: u32, n: u32, k: u32, stream: u64, ) -> Result<()>
2026-09-30: output[m, n] (BF16) = the W4A4 product of act and weight.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for W4a4Proj
impl RefUnwindSafe for W4a4Proj
impl Send for W4a4Proj
impl Sync for W4a4Proj
impl Unpin for W4a4Proj
impl UnwindSafe for W4a4Proj
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