-
-
Notifications
You must be signed in to change notification settings - Fork 20.2k
[ROCm][AITER][Bugfix] Disable emulation for MoE #41226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1026,11 +1026,11 @@ def __init__( | |
| ) | ||
|
|
||
| # TODO(aiter): extend once rocm_aiter_fused_experts gains dispatch | ||
| # for the other OCP MX schemes. Today its CK MoE kernel only has an | ||
| # 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",) | ||
| # for the other OCP MX schemes. Today its CK MoE kernel has entries | ||
| # for `w_mxfp4` (w4a16) and `w_mxfp4_a_mxfp4`; 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", "w_mxfp4_a_mxfp4") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The addition of _AITER_NATIVE_OCP_MX_SCHEMES = (OCP_MX_Scheme.w_mxfp4,
OCP_MX_Scheme.w_mxfp4_a_mxfp4) |
||
| self.emulate = ( | ||
| not current_platform.supports_mx() | ||
| or self.ocp_mx_scheme not in _AITER_NATIVE_OCP_MX_SCHEMES | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The unit test should be parametrized to cover cases where MX support or AITER is disabled. This would have caught the logic bug in
self.emulatewhere emulation is incorrectly disabled when AITER is unavailable on MX-supporting hardware.