pub struct Nvfp4Artifact { /* private fields */ }Expand description
A validated F32 × NVFP4 projection artifact.
Implementations§
Source§impl Nvfp4Artifact
impl Nvfp4Artifact
Sourcepub fn new(
m: u32,
n: u32,
k: u32,
activation: Nvfp4Activation,
) -> Result<Self, LoweringError>
pub fn new( m: u32, n: u32, k: u32, activation: Nvfp4Activation, ) -> Result<Self, LoweringError>
Describe [m,k] F32 × [n,k] NVFP4 -> [m,n] F32.
The tensor scale is a one-element F32 input rather than artifact metadata, so one loaded program serves every checkpoint tensor with this geometry.
Sourcepub fn new_batched(
batch: u32,
n: u32,
k: u32,
activation: Nvfp4Activation,
) -> Result<Self, LoweringError>
pub fn new_batched( batch: u32, n: u32, k: u32, activation: Nvfp4Activation, ) -> Result<Self, LoweringError>
Describe batch independent F32 vectors of length k multiplied by
NVFP4 weight matrices with n rows and k columns.
Activations, packed weights, block scales and tensor scales all carry the leading batch dimension. This is the natural execution unit for a routed MoE layer and amortizes submission over all selected experts.
Sourcepub fn new_expert_batch(
batch: u32,
n: u32,
k: u32,
activation: Nvfp4Activation,
) -> Result<Self, LoweringError>
pub fn new_expert_batch( batch: u32, n: u32, k: u32, activation: Nvfp4Activation, ) -> Result<Self, LoweringError>
Describe an expert batch whose packed weights and block scales are separate bindings. This retains zero-copy imports for independently cached experts while still issuing one dispatch. The Vulkan descriptor budget permits up to six experts.
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_ref(&self) -> ArtifactRef<'_>
Trait Implementations§
Source§impl Clone for Nvfp4Artifact
impl Clone for Nvfp4Artifact
Source§fn clone(&self) -> Nvfp4Artifact
fn clone(&self) -> Nvfp4Artifact
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Nvfp4Artifact
Source§impl Debug for Nvfp4Artifact
impl Debug for Nvfp4Artifact
Source§impl PartialEq for Nvfp4Artifact
impl PartialEq for Nvfp4Artifact
Source§fn eq(&self, other: &Nvfp4Artifact) -> bool
fn eq(&self, other: &Nvfp4Artifact) -> bool
self and other values to be equal, and is used by ==.