pub struct Nvfp4Projection { /* private fields */ }Expand description
Dense NVFP4 W4A16 matrix: two E2M1 values per byte, one E4M3 scale per sixteen columns, and an independent F16 multiplier per row.
Implementations§
Source§impl Nvfp4Projection
impl Nvfp4Projection
pub fn admit( pkg: &FtwModelPackage, base: &str, rows: usize, cols: usize, ) -> Result<Self, WeightError>
pub fn row( &self, pkg: &FtwModelPackage, row: usize, out: &mut [f32], ) -> Result<(), WeightError>
pub fn gemv( &self, pkg: &FtwModelPackage, input: &[f32], out: &mut [f32], ) -> Result<(), WeightError>
pub fn argmax( &self, pkg: &FtwModelPackage, input: &[f32], ) -> Result<(u32, f32), WeightError>
Trait Implementations§
Source§impl Clone for Nvfp4Projection
impl Clone for Nvfp4Projection
impl Copy for Nvfp4Projection
Auto Trait Implementations§
impl Freeze for Nvfp4Projection
impl RefUnwindSafe for Nvfp4Projection
impl Send for Nvfp4Projection
impl Sync for Nvfp4Projection
impl Unpin for Nvfp4Projection
impl UnsafeUnpin for Nvfp4Projection
impl UnwindSafe for Nvfp4Projection
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more