IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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โ€‹

AnyType, Deinitable, Movable

Methodsโ€‹

executeโ€‹

static def execute[scales_dtype: DType, input_dtype: DType, target: StringSpan[ImmStaticOrigin], *, FP6_FORMAT: Int = Int(0), fuse_a_scale_preshuffle: Bool = False, max_padded_M: Int = Int(0), clamp_activation: Bool = False](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], alpha: Float32, limit: Float32, context: DeviceContext)

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.