Skip to main content

FpElement

Trait FpElement 

Source
pub trait FpElement: KernelDtype + Sealed { }
Expand description

8-bit floating-point element types supported by the kernel facade.

Sibling trait to Element (which covers f16 / bf16 / f32 / F32Strict / f64) and to IntElement (which covers S8 / U8) — kept separate because the FP8 kernel family has its own MMA instruction set (mma.sync ... .f32.e4m3.e4m3.f32), arch requirement (sm_89+), and conversion semantics (saturating-to-max-finite vs the int family’s saturating-to-INT_MAX).

Sealed because adding a new FP8 variant requires shipping new kernel instantiations in baracuda-kernels-sys.

KIND is inherited from the KernelDtype supertrait. Pre-Phase-28 code using <T as FpElement>::KIND must update to plain T::KIND or <T as KernelDtype>::KIND.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§