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_mxfp8

struct Struct_ep_fused_silu_mxfp8

Registers the ep.fused_silu.mxfp8 graph op with the graph compiler.

Implemented traitsโ€‹

AnyType, Deinitable, Movable

Methodsโ€‹

executeโ€‹

static def execute[fp8_dtype: DType, scales_dtype: DType, input_dtype: DType, target: StringSpan[ImmStaticOrigin], *, 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 MXFP8 quantization.

Same body as ep.fused_silu.mxfp4: fused_silu_mx_kernel takes its element packing from the output dtype, so one fp8_e4m3fn byte per element here rather than two FP4 nibbles, leaving output at the full hidden size along axis 1. With fuse_a_scale_preshuffle, scales must be shaped [n_local_experts * max_padded_M, K_SCALES].