IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Mojo struct

Struct_grouped_matmul_rowwise_dynamic_scaled_fp8

struct Struct_grouped_matmul_rowwise_dynamic_scaled_fp8

MOGG wrapper for grouped (ragged MoE) rowwise/per-token scaled FP8 matmul.

Serves rowwise (per-output-channel) weight scales + per-token (colwise) dynamic activation scales - the compressed-tensors FP8 layout used by e.g. RedHatAI/Llama-4-Scout-17B-16E-Instruct-FP8-dynamic. Targets NVIDIA SM100 (B200) with a correctness-first naive grouped kernel.

Implemented traitsโ€‹

AnyType, ImplicitlyDeletable

Methodsโ€‹

executeโ€‹

static def execute[c_type: DType, a_type: DType, b_type: DType, a_scales_type: DType, b_scales_type: DType, //, target: StringSlice[ImmStaticOrigin]](c: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=c.static_spec], a: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=a.static_spec], b: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=b.static_spec], a_scales: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=a_scales.static_spec], b_scales: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=b_scales.static_spec], expert_start_indices: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=expert_start_indices.static_spec], expert_ids: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=expert_ids.static_spec], max_num_tokens_per_expert: UInt32, num_active_experts: UInt32, context: DeviceContext)