For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo struct
Struct_ep_fused_silu_fp8
struct Struct_ep_fused_silu_fp8
Implemented traitsโ
AnyType,
ImplicitlyDestructible
Methodsโ
executeโ
static def execute[fp8_dtype: DType, scales_dtype: DType, input_dtype: DType, target: StringSlice[StaticConstantOrigin]](output: ManagedTensorSlice[Output, static_spec=output.static_spec], scales: ManagedTensorSlice[Output, static_spec=scales.static_spec], input: ManagedTensorSlice[Input, static_spec=input.static_spec], row_offsets: ManagedTensorSlice[Input, static_spec=row_offsets.static_spec], context: DeviceContext)
Execute the Expert Parallelism fused SILU kernel with FP8 quantization.
This function launches the fused_silu_fp8 kernel to perform the SILU operation for all the MLPs in the EP MoE module.
This kernel will read the row offsets to determine the actual number of received tokens in the input tensor, and then only perform the SILU operation on the received tokens. Once the SILU operation is performed, the output will be quantized to the FP8 format. The scales tensor will be stored in a transposed way.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!