[ROCm][CI] Adapt MoE tests to the triton_kernels 3.8 API (#57385)
Signed-off-by: Matthew Wong <Matthew.Wong2@amd.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,15 @@ def weight_mx_scale(precision_config):
|
||||
return precision_config.weight_scale
|
||||
|
||||
|
||||
def mx_scale_kwargs(scale):
|
||||
"""PrecisionConfig weight-scale kwargs: 3.8 uses b_mx_scale/b_microblock_size,
|
||||
3.5.1/3.6 use weight_scale.
|
||||
"""
|
||||
if get_triton_kernels_version() == "3.8":
|
||||
return {"b_mx_scale": scale, "b_microblock_size": 32}
|
||||
return {"weight_scale": scale}
|
||||
|
||||
|
||||
def _swizzle_mxfp4(quant_tensor, scale, num_warps=8):
|
||||
"""Weight swizzle for mxfp4 moe, used for OAI mxfp4 kernel."""
|
||||
assert has_triton_kernels()
|
||||
|
||||
Reference in New Issue
Block a user