For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo struct
Struct_ep_fused_silu_mxfp6
struct Struct_ep_fused_silu_mxfp6
Registers the ep.fused_silu.mxfp6 graph op with the graph compiler.
Implemented traitsโ
Methodsโ
executeโ
static def execute[scales_dtype: DType, input_dtype: DType, target: StringSpan[ImmStaticOrigin], *, max_padded_M: Int, FP6_FORMAT: Int = Int(0), activation: StringSpan[ImmStaticOrigin] = StringSpan("silu"), swiglu_alpha: Float32 = 0, swiglu_limit: Float32 = 0](output: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=output.static_spec], scales: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=scales.static_spec], input: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=input.static_spec], row_offsets: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=row_offsets.static_spec], context: DeviceContextBase)
Execute the EP fused SILU kernel with MXFP6 quantization.
Unlike ep.fused_silu.mxfp4 and .mxfp8, which share one body that
switches on elements-per-byte, FP6 needs its own kernel: four codes per
three bytes is a ratio of 4/3, which that integer cannot represent.
output is packed uint8 at three quarters of the hidden size.
FP6_FORMAT selects the element encoding (0 = E2M3, 1 = E3M2). Both
occupy six bits and pack identically, so nothing downstream can recover
it from the bytes -- it must match what the checkpoint declares.
The gated activation is built at compile time from the activation,
swiglu_alpha and swiglu_limit parameters.