[ROCm] Enable MoE FP8 kernel and grouped MM tests on ROCm#3994
Merged
danielvegamyhre merged 3 commits intoMar 10, 2026
Conversation
Fix module-level capability gates in test_kernels.py and test_fp8_grouped_mm.py that used raw get_device_capability() >= (9, 0), which incorrectly passes on MI250X (gfx90a reports 9.0 but lacks FP8). Replace with is_sm_at_least_90() || is_MI300() || is_MI350(). test_kernels.py: - Enable 5 FP8 kernel tests on MI300/MI350: jagged rowwise scales, jagged rowwise scales via transpose, jagged colwise scales, 3D rowwise transpose-rhs (atomic), and 3D rowwise transpose-rhs (reduction). These kernels already have AMD-specific autotune configs on main. - Use e4m3_dtype from config instead of hardcoded torch.float8_e4m3fn (MI300 uses float8_e4m3fnuz). - MXFP8 tests remain skipped on ROCm (MXFP8 format not yet supported). test_fp8_grouped_mm.py: - Fix module-level gate so the file loads on FP8-capable ROCm hardware. The main test (test_fp8_rowwise_scaled_grouped_mm) already has proper per-test MI300/MI350 gating and ROCm-specific tolerances. - Enable test_K_or_N_dim_not_multiple_of_16 on ROCm (validates dimension assertions, uses Float8TrainingOpConfig which already resolves to the correct platform FP8 dtype).
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3994
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 0195356 with merge base f04500f ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
danielvegamyhre
approved these changes
Mar 5, 2026
Contributor
|
Ruff/lint is failing, please fix |
test_fp8_grouped_mm.py: - Merge duplicate `from torchao.utils import` statements (I001) - Remove unused `skip_if_rocm` import (F401) test_kernels.py: - Sort imports alphabetically so torchao.float8 precedes torchao.prototype (I001)
Contributor
Author
Linter fixed! |
…ernels.py Apply `ruff format` to wrap long pytest.skip() calls and multi-condition if-statements that exceed the line length limit.
Contributor
Author
|
@danielvegamyhre This PR is approved and all CI checks are passing. Could you merge when you get a chance? Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix module-level capability gates in test_kernels.py and test_fp8_grouped_mm.py that used raw get_device_capability() >= (9, 0). This incorrectly passes on MI250X (gfx90a reports capability 9.0 despite lacking FP8 support) and incorrectly skips on MI300/MI350. Replace with is_sm_at_least_90() || is_MI300() || is_MI350().
test_kernels.py:
test_fp8_grouped_mm.py: