[ROCm][Bugfix]: W4A4 MOE using emulation instead of AITER on MXFP4-supported hardware (#41175)
Signed-off-by: Rohan138 <rohanpotdar138@gmail.com>
This commit is contained in:
@@ -252,7 +252,8 @@ def rocm_aiter_fused_experts(
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
quant_method = QuantMethod.NO.value
|
quant_method = QuantMethod.NO.value
|
||||||
# mxfp4: both w4a4 (quark) and w4a16 (oracle CK) use BLOCK_1X32
|
# mxfp4 i.e. w4a4, w4a16 uses BLOCK_1X32
|
||||||
|
# mxfp6 and mxfp8 are unsupported in AITER currently and use emulation instead
|
||||||
if quant_config.use_mxfp4_w4a4 or quant_config.use_mxfp4_w4a16:
|
if quant_config.use_mxfp4_w4a4 or quant_config.use_mxfp4_w4a16:
|
||||||
quant_method = QuantMethod.BLOCK_1X32.value
|
quant_method = QuantMethod.BLOCK_1X32.value
|
||||||
# w8a8 block-scaled
|
# w8a8 block-scaled
|
||||||
|
|||||||
@@ -1025,12 +1025,8 @@ class QuarkOCP_MX_MoEMethod(QuarkMoEMethod):
|
|||||||
get_current_vllm_config().model_config.hf_config, "model_type", None
|
get_current_vllm_config().model_config.hf_config, "model_type", None
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO(aiter): extend once rocm_aiter_fused_experts gains dispatch
|
# TODO: Remove once all OCP MX schemes use the kernel abstraction
|
||||||
# for the other OCP MX schemes. Today its CK MoE kernel only has an
|
_AITER_NATIVE_OCP_MX_SCHEMES = ("w_mxfp4", "w_mxfp4_a_mxfp4")
|
||||||
# entry for `w_mxfp4` (w4a16); mixed schemes like `w_mxfp4_a_mxfp6_*`
|
|
||||||
# fall through to QuantMethod.NO and raise "Unsupported kernel config
|
|
||||||
# for moe heuristic dispatch".
|
|
||||||
_AITER_NATIVE_OCP_MX_SCHEMES = ("w_mxfp4",)
|
|
||||||
self.emulate = (
|
self.emulate = (
|
||||||
not current_platform.supports_mx()
|
not current_platform.supports_mx()
|
||||||
or self.ocp_mx_scheme not in _AITER_NATIVE_OCP_MX_SCHEMES
|
or self.ocp_mx_scheme not in _AITER_NATIVE_OCP_MX_SCHEMES
|
||||||
|
|||||||
Reference in New Issue
Block a user