Gate MX/NVFP4 safetensors test configs on sm100 - #4821
Open
alanhuangyoo wants to merge 1 commit into
Open
Conversation
The MX and NVFP4 entries in _ALL_TEST_CONFIGS are added based on the torch version alone, but both kernels require sm100+. On sm89/sm90 the parametrized cases run and fail instead of being skipped.
alanhuangyoo
requested review from
andrewor14,
jerryzh168 and
vkuzo
as code owners
August 24, 2026 11:44
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/4821
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 09d120d with merge base 88d8e73 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
andrewor14
approved these changes
Aug 24, 2026
Author
|
Label check ran before the module label was added, so it should go green on a re-run. test-rocm died at setup (29s, no tests ran) and #4820 has the same failure, so it doesn't look related to this change. |
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.
test/prototype/safetensors/test_safetensors_support.pybuilds_ALL_TEST_CONFIGSand adds the MX / NVFP4 entries based on the torch version only:Both kernels need sm100+, but the class only gates on sm89:
So on sm89/sm90 those parametrized cases run and fail instead of being skipped:
The
Int4WeightOnlyConfigblock right above already gates onis_sm_at_least_100()for the same reason, and the helper is imported in this file, so this just applies the same guard to the MX/NVFP4 block.The CPU path is unaffected —
test_safetensorsandtest_safetensors_shardedboth start withif device == "cpu": self.skipTest("Need GPU available"), so these configs never executed on CPU.Before, on sm90:
After:
The 3 fixed cases are the MX/NVFP4 ones. The 4 that remain are
ImportError: Requires mslk >= 1.0.0fromInt4WeightOnlyConfigand are unrelated to this change (missing optional dependency in my environment).ruff checkandruff format --checkare clean on the file.This is not covered by CI:
regression_test.ymlruns its CUDA job onlinux.g5.12xlarge.nvidia.gpu(A10G, sm86), where the class-levelis_sm_at_least_89skip hides the whole file.Env: torch 2.13.0+cu130, H20 (sm90), single node.