[Kernel] Enable OAI Triton MXFP4 MoE on SM12x (#58877)
Signed-off-by: lazymio <mio@lazym.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Shengqi Chen <harry-chen@outlook.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
Shengqi Chen
parent
b3082d3044
commit
40c86ae1ce
@@ -120,7 +120,14 @@ def _swizzle_mxfp4(quant_tensor, scale, num_warps=8):
|
||||
K = scale.shape[-1]
|
||||
pad_k = -K % 4
|
||||
scale = torch.nn.functional.pad(scale, (0, pad_k))
|
||||
elif current_platform.is_device_capability_family(100):
|
||||
elif current_platform.is_device_capability_family(
|
||||
100
|
||||
) or current_platform.is_device_capability_family(120):
|
||||
# Native MXFP (cap >= 10.0) requires the persistent kernel. On
|
||||
# SM12x, epilogue_subtile=1 also keeps the heuristic away from a
|
||||
# triton_kernels 3.5.1 codegen bug (SWAP_XW with a subtiled
|
||||
# epilogue); block_m is pinned per call in
|
||||
# gpt_oss_triton_kernels_moe to fit the 99KB shared memory.
|
||||
constraints = {
|
||||
"is_persistent": True,
|
||||
"epilogue_subtile": 1,
|
||||
|
||||
Reference in New Issue
Block a user