Repository navigation
[tests] Add per-backend testcase skipping config - #5735
Conversation
|
Hi @lixing-he! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
|
|
|
@claude review |
There was a problem hiding this comment.
Verdict: Request changes -- the PR adds a plugin system (entry points, a register API, two env vars) that nothing in the repo uses, and removing disabled/skip_rocm_test breaks the graph_trainer integration tests and a CPU unit test.
What this PR does. It deletes skip_rocm_test and disabled from IntegrationTestDefinition and moves the 24 ROCm skips into tests/integration_tests/skips/skip_cases.toml, keyed by backend section and then by suite. _filter_tests now looks up (suite, test_name) in a merged skip table. The table is built when the module is imported, from the default TOML, TORCHTITAN_SKIP_CASES paths, and torchtitan.skip_cases entry points.
Example.
# before (h100.py): skip and reason sit next to the test
IntegrationTestDefinition(..., test_name="deepseek_v3_fsdp+hybridep",
# deep_ep/NVSHMEM is CUDA-only, so skip on ROCm.
skip_rocm_test=True)
# after: reason deleted, name listed in another file
# skip_cases.toml
[rocm]
h100 = ["deepseek_v3_fsdp+hybridep", ...]An out-of-tree NPU repo would ship its own TOML and register it with an entry point. That repo can already skip tests today with --exclude a,b,c.
Must fix
- The problem isn't concrete. The description says skipping "is spread across per-definition booleans" but doesn't show a workflow that fails on
main, and it doesn't name an out-of-tree user. Please add the use case (which device repo, and why--excludeisn't enough), or drop the extension machinery. skips/__init__.py:68-104-- plugin system with no consumer, two new env vars, and side effects at import time (inline).__init__.py:35-- removing the fields breaksgraph_trainer/tests/integration_tests.py(18 uses;TypeErroron import) andtest_integration_test_definitions.py:140,159. Graph_trainer suites also can't be listed in the TOML, becausevalidate_suiteonly accepts_TEST_SUITES(inline).h100.py:194-- the skip reasons are deleted, and the skips now live away from the test definitions (inline). Unrelated file-mode changes onh100.pyandmodels.py.
Should consider
skips/__init__.py:108-- the backend now comes fromtorch.version.hip, while--gpu_arch_typestill selects the goldens (inline).skips/__init__.py:120imports_TEST_SUITES, a private name, fromrun_testsinside a function to avoid a circular import. Malformed files raiseTypeError(lines 51, 57);ValueErroris the convention for bad user input.
Details
Smaller alternative (about -20/+15 LoC instead of +158 net): replace skip_rocm_test: bool with skip_backends: frozenset[Literal["cuda", "rocm", "xpu", "npu"]] = frozenset() on IntegrationTestDefinition, keep the reason comment next to each entry, and filter on the backend in _filter_tests. Keep disabled (graph_trainer still uses it), or migrate those callers in the same PR. Out-of-tree devices keep using --exclude, which exists today. Add an extension point only once a named user needs one.
Not verified: the runnable/filtered counts in the description (requires running on CUDA and ROCm).
| disabled: bool = False | ||
| skip_rocm_test: bool = False |
There was a problem hiding this comment.
This removes both fields, but some callers still use them:
torchtitan/experiments/graph_trainer/tests/integration_tests.pypassesskip_rocm_test=True/disabled=...toIntegrationTestDefinition18 times (e.g. lines 332, 345, 386, 514). Importing that module now raisesTypeError: unexpected keyword argument, which breaks every graph_trainer integration workflow.tests/unit_tests/cpu/test_integration_test_definitions.py:140,159readstest.disabled, which now raisesAttributeError.
Those graph_trainer skips also can't move to the TOML. Its suites (graph_trainer_default, graph_trainer_h100, ...) aren't in _TEST_SUITES, so validate_suite rejects any section that names them. The PR needs a migration path for every caller, or it should keep the fields.
| def register_skip_cases(source: str | Path) -> None: | ||
| """Register an additional skip-cases file with the same schema. | ||
|
|
||
| Registration must happen before the runner starts filtering tests. | ||
| """ | ||
| path = Path(source) | ||
| _SECTIONS.extend(_parse(path.read_text(), str(path))) | ||
|
|
||
|
|
||
| def _import_skip_case_extensions() -> None: | ||
| """Leverage the Python plugin mechanism to load out-of-the-tree skip cases.""" | ||
| from importlib.metadata import entry_points | ||
|
|
||
| group_name = "torchtitan.skip_cases" | ||
| skip_case_extensions = entry_points(group=group_name) | ||
|
|
||
| for skip_case_extension in skip_case_extensions: | ||
| try: | ||
| entrypoint = skip_case_extension.load() | ||
| entrypoint() | ||
| except Exception as err: | ||
| raise RuntimeError( | ||
| f"Failed to load the skip-cases extension: " | ||
| f"{skip_case_extension.name}. You can disable extension " | ||
| "auto-loading with TORCHTITAN_SKIP_CASES_AUTOLOAD=0." | ||
| ) from err | ||
|
|
||
|
|
||
| def _is_skip_case_autoload_enabled() -> bool: | ||
| return os.getenv("TORCHTITAN_SKIP_CASES_AUTOLOAD", "1") == "1" | ||
|
|
||
|
|
||
| _SECTIONS.extend(_parse(SKIP_CASES_FILE.read_text(), str(SKIP_CASES_FILE))) | ||
| for _path in os.environ.get("TORCHTITAN_SKIP_CASES", "").split(os.pathsep): | ||
| if _path.strip(): | ||
| register_skip_cases(_path.strip()) | ||
| if _is_skip_case_autoload_enabled(): |
There was a problem hiding this comment.
This adds three extension mechanisms: the torchtitan.skip_cases entry-point group, the register_skip_cases() API, and two env vars (TORCHTITAN_SKIP_CASES, TORCHTITAN_SKIP_CASES_AUTOLOAD). None of them has an in-repo consumer or a named out-of-tree user. .claude/rules/design.md says not to build plugin systems or registries before a second implementation exists, and to keep env vars to a minimum.
Out-of-tree CI can already skip tests without any of this: --exclude name1,name2 (run_tests.py:588). If a device repo needs more than that, please name the user and say why --exclude doesn't work for them.
Separately, lines 100-104 read files, read env vars and run third-party entry points when the module is imported. design.md asks that imports have no side effects.
| # deep_ep/NVSHMEM is CUDA-only, so skip on ROCm. | ||
| skip_rocm_test=True, |
There was a problem hiding this comment.
The reason for each skip gets deleted along with the flag: "deep_ep/NVSHMEM is CUDA-only" here, "symmetric memory is CUDA-only" below, and the DeepSeek V4 sparse-attention and Qwen3.5 short_conv notes in models.py. skip_cases.toml keeps only a bare list of names. Nobody can tell which ROCm skips are permanent hardware limits and which are TODOs to re-validate, and a test rename now has to be made in two files.
Smallest fix: keep the skip next to the definition, e.g. skip_backends: frozenset[Literal["cuda", "rocm", "xpu", "npu"]] = frozenset() with the comment beside it. Also, this file and models.py change mode from 100755 to 100644, which looks unrelated to this PR. Please revert the mode change.
| def _section_applies(name: str) -> bool: | ||
| if name == "all": | ||
| return True | ||
| if name == "rocm": | ||
| return utils.device_type == "cuda" and torch.version.hip is not None | ||
| if name == "cuda": | ||
| return utils.device_type == "cuda" and torch.version.hip is None | ||
| return utils.device_type == name |
There was a problem hiding this comment.
The ROCm skip used to follow --gpu_arch_type. Now it follows torch.version.hip, but --gpu_arch_type still picks gpu_arch and the golden files (run_tests.py:619) and is still passed to run_single_test. That leaves two sources of truth for the backend. Either derive the backend from one place, or drop --gpu_arch_type as an input. (Should consider; nothing in-repo breaks today, since ROCm CI runs a HIP build.)
|
@claude review |
There was a problem hiding this comment.
Verdict: Request changes -- the plugin system still has no named user, the second commit leaves two ROCm skip mechanisms side by side, and the transformers_modeling_backend runner now crashes.
What changed since the last review (a3bddfc). disabled and skip_rocm_test are restored on IntegrationTestDefinition, along with their filter in _filter_tests. Skip reasons are now TOML comments, and the file-mode changes on h100.py and models.py are reverted.
Example.
# graph_trainer: skipped when --gpu_arch_type rocm, nothing logged
IntegrationTestDefinition(..., skip_rocm_test=True)
# core suites: skipped when torch.version.hip is set, a skip is logged
# skip_cases.toml
[rocm]
h100 = ["dist_gemm", ...]On main there is one ROCm skip flag. With this PR there are two, and each uses a different backend check.
Earlier must-fix items
- Resolved: the graph_trainer
TypeErrorand the unit testAttributeError(the fields are back). - Resolved: the file-mode changes, and the lost skip reasons (now TOML comments for 7 of the 24 entries).
- Still open: the problem isn't concrete. No out-of-tree user is named, and the description doesn't say why
--excludeisn't enough. - Still open:
skips/__init__.py:68-105. The entry points,register_skip_cases, and two env vars have no consumer, and the module has side effects at import time.
Must fix
- The PR description is stale. It still says the PR removes
disabledandskip_rocm_test, and that the TOML is the single mechanism. The validation counts ("ROCm 62 runnable / 24 filtered") need to be rechecked against the current code. run_tests.py:389--args.test_suiteis read unconditionally.transformers_modeling_backend/tests/integration_tests.pyhas no--test_suite, so its runner now raisesAttributeError(inline).run_tests.py:406-416--skip_rocm_test(follows--gpu_arch_type, no log) and[rocm](followstorch.version.hip, logged) are two ROCm skip mechanisms. Pick one, and migrate every caller (inline).
Should consider
skips/__init__.py:120still imports the private_TEST_SUITESlazily to avoid a circular import, and_parsestill raisesTypeErrorfor bad input where torchtitan usesValueError.skips/holds only__init__.pyand one TOML file.design.mdsays to flatten folders that hold one or two files.
Details
Smallest alternative, unchanged from the last review (about -20/+15 LoC instead of +165 net): replace skip_rocm_test with skip_backends: frozenset[Literal["cuda", "rocm", "xpu", "npu"]] = frozenset() on the definition, keep each reason next to its entry, filter against one backend source, and migrate the 18 graph_trainer uses. Out-of-tree devices keep using --exclude. Add a TOML or plugin layer only once a named device repo needs one.
Not verified: the runnable/filtered counts on CUDA and ROCm (needs GPU runs).
| if hasattr(args, "exclude") and args.exclude: | ||
| exclude_set = {name.strip() for name in args.exclude.split(",")} | ||
|
|
||
| validate_suite(args.test_suite, {test.test_name for test in test_list}) |
There was a problem hiding this comment.
This line, and the lookup at line 413, read args.test_suite unconditionally. torchtitan/experiments/transformers_modeling_backend/tests/integration_tests.py:58-74 builds its own parser with no --test_suite and calls run_tests(args, test_list). That runner now fails with AttributeError: 'Namespace' object has no attribute 'test_suite' before it runs any test, which breaks integration_test_8gpu_transformers_modeling_backend.yaml and validate_release_gpu.sh:337. Before this PR, run_tests only read test_suite behind hasattr(args, "test_suite") (line 532).
If the TOML stays, take the suite as an explicit argument (or skip the lookup when there is no suite), and check every external caller of run_tests.
seems we need more documentation |
Thanks for the review. First, the documentation changes:
Three decisions for your review:
Would you be comfortable with these three decisions, or would you prefer a |
|
@claude review again |
|
Claude finished @tianyu-l's task in 3m 8s —— View job Request changes: review -- 942bd33 fixes the earlier crash and removes the second ROCm mechanism. Still open: the entry-point plugin has no named user, the PR description is stale, and the graph_trainer TOML has to list the same tests twice because it's keyed by suite. |
There was a problem hiding this comment.
Verdict: Request changes -- 942bd33 fixes most of the earlier findings. Three things are still open: the entry-point plugin has no named user, the description is stale, and keying the TOML by suite forces the same test to be listed twice in graph_trainer.
What changed since the last review. skip_rocm_test is now removed everywhere. graph_trainer's 8 uses move into graph_trainer/tests/skips/skip_cases.toml, which is loaded with register_skip_cases(..., suites=...). disabled stays. Loading is now lazy, the TORCHTITAN_SKIP_CASES env var is gone, and bad input raises ValueError. A runner without --test_suite skips the file check, and a README is added.
Example.
# graph_trainer/tests/skips/skip_cases.toml: the same tests, twice
[rocm]
graph_trainer = ["sdc_replay", "aot_fx_trace_llama3_fsdp_tp_cp", ...]
graph_trainer_default = ["sdc_replay", "aot_fx_trace_llama3_fsdp_tp_cp", ...]A new llama3 ROCm skip has to go into both lists. If one is missed, that suite runs the test on ROCm and nothing reports it.
Earlier must-fix items
- Resolved: the transformers_modeling_backend
AttributeError(run_tests.py:282). - Resolved: two ROCm skip mechanisms (
skip_rocm_testis gone, and graph_trainer is migrated). - Resolved: import-time side effects, the private
_TEST_SUITESimport, andTypeErrorraised for bad input. - Still open: the entry point (
torchtitan.skip_cases) andTORCHTITAN_SKIP_CASES_AUTOLOADhave no consumer, and no out-of-tree device repo is named.register_skip_casesnow has an in-repo user (graph_trainer), and it already covers a downstream repo that has its own runner. On your decision 2: drop the entry point and the env var until a named repo needs them. - Still open: the description is stale (below).
Must fix
- The PR description doesn't match the code. It says
disabledis removed (it's kept), lists the deletedTORCHTITAN_SKIP_CASESenv var as a registration path, says main "has nodisabled=Truecases" (graph_trainer has several), and doesn't mention the graph_trainer migration. The "86 / 62 / 24" counts cover only the core suites. graph_trainer/tests/skips/skip_cases.toml:2-17-- the suite keys force duplicated lists (inline).
Should consider
graph_trainer/tests/skips/skip_cases.toml:4-5-- the "ditto" comments carry thedisabledreason over to tests that aren't disabled (inline).skips/__init__.py:122-134-- the "never half-filled" claim is false (inline).tests/unit_tests/cpu/test_skip_cases.py-- tests private loader state; a CPU check of the shipped TOMLs against the real suites would guard more (inline)..claude/rules/tests.md:45-50-- this adds a maintainer-owned rule that makes thetorchtitan.skip_casesentry point the official interface. Leave it out until maintainers settle decision 2.
Questions
- For maintainers (@tianyu-l): your three decisions. My recommendation: (1) handle
--gpu_arch_typein a separate PR -- fine, since it now only picks goldens; (2) drop the entry point; (3) keepdisabled-- agreed.
Details
Every graph_trainer workflow passes --gpu_arch_type cuda, and no ROCm workflow runs graph_trainer. So the migrated graph_trainer ROCm skips are never exercised in CI. They weren't on main either.
If the suite keys go away (skips keyed by test name, validated against the union of the runner's suites), the duplication goes away, and so do suites=, _OUTSIDE_SUITES, and the core_suites argument of validate_suite.
Not verified: the runnable/filtered counts on CUDA and ROCm (needs GPU runs).
| graph_trainer = [ | ||
| "sdc_replay", | ||
| "aot_fx_trace_llama3_fsdp_tp_cp", # aot_fx_trace applies CUDA graphs; disabled via _FLEX_CP_INDUCTOR_DISABLED | ||
| "aot_fx_trace_llama3_spmd_gradient_accumulation", # ditto | ||
| "aot_fx_trace_llama3_ga_per_microbatch_fsdp_collectives", # ditto | ||
| "aot_fx_trace_llama3_ga_first_unshard_last_reduce_fsdp", # ditto | ||
| "aot_fx_trace_llama3_fsdp_tp_sac_and_offload", # ditto; disabled=True | ||
| ] | ||
| graph_trainer_default = [ | ||
| "sdc_replay", | ||
| "aot_fx_trace_llama3_fsdp_tp_cp", # aot_fx_trace applies CUDA graphs; disabled via _FLEX_CP_INDUCTOR_DISABLED | ||
| "aot_fx_trace_llama3_spmd_gradient_accumulation", # ditto | ||
| "aot_fx_trace_llama3_ga_per_microbatch_fsdp_collectives", # ditto | ||
| "aot_fx_trace_llama3_ga_first_unshard_last_reduce_fsdp", # ditto | ||
| "aot_fx_trace_llama3_fsdp_tp_sac_and_offload", # ditto; disabled=True | ||
| ] |
There was a problem hiding this comment.
The same six llama3 tests appear twice here, once under graph_trainer and once under graph_trainer_default. Both suites are built from _build_llama3_tests() (integration_tests.py:602-614). Because the file is keyed by suite, a test that belongs to N suites has to be listed N times. If one copy is forgotten, that suite runs the test on ROCm and nothing reports it: validate_suite only checks for unknown names, not for missing ones. With skip_rocm_test on the definition, this mistake wasn't possible.
If the TOML stays, key the skips by test name per runner instead of by suite, e.g. [rocm] tests = [...], validated against the union of the runner's suites. That removes the duplication and also removes the need for suites=.
| "aot_fx_trace_llama3_fsdp_tp_cp", # aot_fx_trace applies CUDA graphs; disabled via _FLEX_CP_INDUCTOR_DISABLED | ||
| "aot_fx_trace_llama3_spmd_gradient_accumulation", # ditto |
There was a problem hiding this comment.
The comments mix up the ROCm reason with the disabled reason. "disabled via _FLEX_CP_INDUCTOR_DISABLED" only applies to aot_fx_trace_llama3_fsdp_tp_cp, but the "ditto" lines below inherit it, so they claim spmd_gradient_accumulation and the two GA tests are disabled, and they aren't. sdc_replay has no reason at all (the original reason, "aot_fx_trace applies CUDA graph by default", covered only the aot_fx_trace entries). Please write one ROCm reason per entry and leave disabled state out of this file; the definition already records it.
| # ``_loading`` covers re-entry (an entry point may call register_skip_cases); | ||
| # ``_loaded`` is only set once everything was read, so a malformed file | ||
| # leaves the state empty instead of half-filled. | ||
| _loading = True | ||
| try: | ||
| _SECTIONS.extend( | ||
| _parse(SKIP_CASES_FILE.read_text(encoding="utf-8"), str(SKIP_CASES_FILE)) | ||
| ) | ||
| if _is_skip_case_autoload_enabled(): | ||
| _import_skip_case_extensions() | ||
| _loaded = True | ||
| finally: | ||
| _loading = False |
There was a problem hiding this comment.
The comment says a malformed file "leaves the state empty instead of half-filled", but the code doesn't do that. The default file is appended to _SECTIONS before any entry point runs. If an entry point then raises, _SECTIONS keeps the default sections and whatever earlier entry points registered, and the next _load() appends the default file again. Today the runner just crashes, so this has no effect yet. Still, either build into a local list and extend _SECTIONS once at the end, or delete the claim. If the entry point is dropped (see review body), _loading and most of this function go away too.
| def test_entry_point_registration(monkeypatch, tmp_path) -> None: | ||
| entry_file = tmp_path / "entry.toml" | ||
| entry_file.write_text('[all]\nfeatures = ["entry_case"]\n', encoding="utf-8") | ||
|
|
||
| class FakeEntryPoint: | ||
| name = "fake" | ||
|
|
||
| def load(self): | ||
| return lambda: skips.register_skip_cases(entry_file, suites={"features"}) | ||
|
|
||
| monkeypatch.setenv("TORCHTITAN_SKIP_CASES_AUTOLOAD", "1") | ||
| monkeypatch.setattr( | ||
| importlib.metadata, | ||
| "entry_points", | ||
| lambda group=None: [FakeEntryPoint()], | ||
| ) | ||
| skips._load() | ||
| assert any(section.source == str(entry_file) for section in skips._SECTIONS) | ||
|
|
||
| class BrokenEntryPoint: | ||
| name = "broken" | ||
|
|
||
| def load(self): | ||
| raise RuntimeError("boom") | ||
|
|
||
| skips._SECTIONS.clear() | ||
| skips._loaded = False | ||
| monkeypatch.setattr( | ||
| importlib.metadata, | ||
| "entry_points", | ||
| lambda group=None: [BrokenEntryPoint()], | ||
| ) | ||
| with pytest.raises(RuntimeError, match="broken"): | ||
| skips._load() |
There was a problem hiding this comment.
These 161 lines test how the loader works internally. They monkeypatch private module state (_loaded, _loading, _SECTIONS, _OUTSIDE_SUITES) and use fake entry points. The regression that actually matters isn't covered on CPU: a shipped skip_cases.toml entry that goes stale after a test is renamed. Today that only fails when the suite runs on a GPU runner. .claude/rules/tests.md asks tests to guard real invariants and not snapshot private layouts.
Suggest replacing the file with one test in test_integration_test_definitions.py. It would parse both shipped TOML files and check every entry against the real suite builders (those builders are already called on CPU there). That catches renames before CI time is spent, and a parse error would surface there too.
The PR description has updated. |
|
@claude review |
There was a problem hiding this comment.
Verdict: Request changes -- the code hasn't changed since the last review (HEAD is still 942bd33), and only the description was updated. It now matches the code, but the two design issues are still open: the entry point has no named user, and the suite-keyed TOML makes graph_trainer list the same tests twice.
What changed since the last review. Only the PR description. It now describes skip_rocm_test being replaced while disabled stays, drops the deleted TORCHTITAN_SKIP_CASES env var, covers the graph_trainer migration (7 skips on main, which matches integration_tests.py:332-628 there), and lists the 5 unit tests that actually exist.
Example. This is still the case at HEAD:
# graph_trainer/tests/skips/skip_cases.toml
[rocm]
graph_trainer = ["sdc_replay", "aot_fx_trace_llama3_fsdp_tp_cp", ...] # 6 entries
graph_trainer_default = ["sdc_replay", "aot_fx_trace_llama3_fsdp_tp_cp", ...] # same 6 againBoth suites are built from _build_llama3_tests(). If a new llama3 ROCm skip is added to only one list, the other suite runs that test on ROCm, and validate_suite doesn't catch it (it only rejects unknown names, not missing ones).
Earlier must-fix items
- Resolved: the description is stale. It now matches the code.
- Still open: the
torchtitan.skip_casesentry point andTORCHTITAN_SKIP_CASES_AUTOLOAD(skips/__init__.py:83-103) have no consumer, and neither the description nor the README names an out-of-tree device repo. graph_trainer shows thatregister_skip_cases()alone already covers a repo with its own runner. Either name the downstream user and explain why an explicitregister_skip_cases()call isn't enough for them, or drop the entry point, the env var, and_loading. - Still open:
graph_trainer/tests/skips/skip_cases.toml:2-17. Suite keys force the lists to be duplicated (see the earlier inline comment). Keying each runner's file by test name and validating against the union of that runner's suites removes the duplication, along withsuites=,_OUTSIDE_SUITES, and thecore_suitesargument.
Should consider (still open, unchanged)
graph_trainer/tests/skips/skip_cases.toml:4-9: the "ditto" comments carry the_FLEX_CP_INDUCTOR_DISABLEDreason over to tests that aren't disabled, andsdc_replayhas no reason.skips/__init__.py:122-124: the "never half-filled" comment is false.tests/unit_tests/cpu/test_skip_cases.py: tests private loader state. One test intest_integration_test_definitions.pythat checks both shipped TOMLs against the real suite builders would catch stale names on CPU..claude/rules/tests.md:45-50: names thetorchtitan.skip_casesentry point as the official interface. Leave it out until decision 2 is settled.
Questions
- @tianyu-l: the author's three decisions (comment of 11-04) still need a maintainer answer, especially (2), whether to keep the entry point. The fixes above depend on it.
Not verified: the CUDA/ROCm runnable and filtered counts (these need GPU runs).
The comments have been updated based on the suggestions. But graph_trainer and graph_trainer_default remain as they are in the graph_trainer/tests/skips/skip_cases.toml, because a testcase here originally belongs to both suites. |
|
@claude review |
There was a problem hiding this comment.
Verdict: Request changes -- e39eac6 only changes comments. Two design items are still open: the entry point has no named user, and keying the TOML by suite still makes graph_trainer list the same tests twice.
What changed since the last review. One commit, e39eac6, which only edits comments. The _load() comment now matches the code. The graph_trainer TOML drops the "ditto" and disabled notes and gives each aot_fx_trace_* entry its own reason.
Example. On your reply that "a testcase here originally belongs to both suites": that's true, but the ROCm skip belongs to the test, not to the suite. On main it was one skip_rocm_test=True on the definition, and every suite built from _build_llama3_tests() inherited it. With suite keys:
[rocm]
graph_trainer = ["sdc_replay", "aot_fx_trace_llama3_fsdp_tp_cp", ...] # 6 entries
graph_trainer_default = ["sdc_replay", "aot_fx_trace_llama3_fsdp_tp_cp", ...] # the same 6Suppose a seventh llama3 test is added to only one of these lists. The other suite then runs it on ROCm, and validate_suite passes, because it only rejects unknown names. It never checks for missing ones. Keyed by test name, the same file has one list:
[rocm]
tests = ["sdc_replay", "aot_fx_trace_llama3_fsdp_tp_cp", ..., "aot_fx_trace_llama3_fsdp_tp_asynctp"]Each runner validates this list against the union of the test names in its own suites. That removes the duplication, and with it suites=, _OUTSIDE_SUITES, and the core_suites argument of validate_suite. The core suites lose nothing: features/models/h100 are disjoint lists, so the suite key there was never doing any disambiguation.
Earlier must-fix items
- Resolved: the "never half-filled" comment (
skips/__init__.py:122-124). - Resolved: the "ditto" comments that carried the
disabledreason over to tests that aren't disabled (graph_trainer/tests/skips/skip_cases.toml). - Still open: the
torchtitan.skip_casesentry point andTORCHTITAN_SKIP_CASES_AUTOLOAD(skips/__init__.py:83-106) have no consumer, and no out-of-tree device repo is named. graph_trainer already shows that an explicitregister_skip_cases()call covers a runner that has its own bootstrap. Name the downstream repo and say why that call isn't enough for it, or drop the entry point, the env var, and_loading. - Still open:
graph_trainer/tests/skips/skip_cases.toml:2-17, the duplicated suite-keyed lists (see the example above).
Should consider (still open)
graph_trainer/tests/skips/skip_cases.toml:3,11:sdc_replaystill has no ROCm reason. The comment onmain("aot_fx_trace applies CUDA graph by default") covered only theaot_fx_trace_*entries..claude/rules/tests.md:45-50: still presents thetorchtitan.skip_casesentry point as the official interface for out-of-tree repos. Leave it out until decision 2 is settled.tests/unit_tests/cpu/test_skip_cases.py: still tests private loader state (_loaded,_loading,_SECTIONS,_OUTSIDE_SUITES). One test intest_integration_test_definitions.pythat checks both shipped TOMLs against the real suite builders would catch stale names on CPU.
Questions
- @tianyu-l: the author's decision 2 (keep the entry point) still needs a maintainer answer. The open items above depend on it.
Not verified: the CUDA/ROCm runnable and filtered counts (these need GPU runs).
I haven't made code changes for these points; here is my reasoning:
|
|
@tianyu-l Thanks for the reviews. There are a few points I've been wanting to confirm with you:
Happy to adjust any of these based on your preference. |
| |---|---|---| | ||
| | `skip_cases.toml` | permanent, backend-wide skips | this directory | | ||
| | `disabled=True` | skips not caused by hardware coupling, and temporary one-off skips | the definition | | ||
| | `--exclude a,b,c` | skipping a few cases for one invocation | the command line | |
There was a problem hiding this comment.
there are in-repo usage for this
- scripts/ci/pytorch_ci_test_runner.sh#L37
- .github/scripts/validate_release_gpu.sh#L382
- .github/scripts/run_8xgpu_integration_tests.sh#L81
maybe let's link them here?
There was a problem hiding this comment.
Added in the latest commit.
There was a problem hiding this comment.
I imagine it'd be easier to make per-hardware files, when more and more hardware join CI.
There was a problem hiding this comment.
Done in the latest commit — each backend now has its own file under tests/integration_tests/hardware_skips/
| # pyproject.toml of the device repo | ||
| [project.entry-points."torchtitan.skip_cases"] | ||
| my_device = "my_device.tests:register_skips" |
There was a problem hiding this comment.
device repo means your fork of torchtitan?
There was a problem hiding this comment.
Not a fork of torchtitan — by "device repo" I mean an out-of-tree downstream repo that provides an additional device backend to torchtitan. I've added this definition to the README in the latest commit.
|
|
||
|
|
||
| def _is_skip_case_autoload_enabled() -> bool: | ||
| return os.getenv("TORCHTITAN_SKIP_CASES_AUTOLOAD", "1") == "1" |
There was a problem hiding this comment.
can we remove this env for now? if not, what's the use case
if you have to use it, could you use an arg, instead of envvar?
There was a problem hiding this comment.
Removed it in the latest commit, it's actually useless.
| _SECTIONS.extend( | ||
| _parse(SKIP_CASES_FILE.read_text(encoding="utf-8"), str(SKIP_CASES_FILE)) | ||
| ) |
There was a problem hiding this comment.
can we not invent multiple ways of doing the same thing -- could we just use register_skip_cases for tests in the module as well
There was a problem hiding this comment.
Done in the latest commit — there is now a single registration path by using register_skip_cases
| return sections | ||
|
|
||
|
|
||
| _SECTIONS: list[SkipSection] = [] |
There was a problem hiding this comment.
Agreed — renamed in the latest commit, also renamed some other variables, functions and directories
There was a problem hiding this comment.
Overall I believe this file can be made minimal and simpler
There was a problem hiding this comment.
I've made some changes to this file, and it is indeed minimal and simpler now.
| _OUTSIDE_SUITES: dict[str, frozenset[str]] = {} | ||
|
|
||
|
|
||
| def register_skip_cases( |
There was a problem hiding this comment.
"skip case" is not clear about what it means, could you give it another try
There was a problem hiding this comment.
Renamed like above saying
There was a problem hiding this comment.
Still open: the torchtitan.skip_cases entry point and TORCHTITAN_SKIP_CASES_AUTOLOAD (skips/init.py:83-103) have no consumer, and neither the description nor the README names an out-of-tree device repo. graph_trainer shows that register_skip_cases() alone already covers a repo with its own runner. Either name the downstream user and explain why an explicit register_skip_cases() call isn't enough for them, or drop the entry point, the env var, and _loading.
I had the same impression. Right now it looks very complicated.
Still open: graph_trainer/tests/skips/skip_cases.toml:2-17. Suite keys force the lists to be duplicated (see the earlier inline comment). Keying each runner's file by test name and validating against the union of that runner's suites removes the duplication, along with suites=, _OUTSIDE_SUITES, and the core_suites argument.
I didn't understand this, but could you fix / improve.
the author's three decisions (comment of 11-04) still need a maintainer answer, especially (2), whether to keep the entry point. The fixes above depend on it.
I'm OK with the entry point.
There was a problem hiding this comment.
Thanks for the review. In the latest commit, I've Simplified the entry-point mechanism and removed TORCHTITAN_SKIP_CASES_AUTOLOAD. And I fixed the problem with duplicate testcases in graph_trainer by using the testcase's name directly instead of the suite name + testcase's name.
There are also quite a few improvements in the latest commit, including documentation and code; I'd really appreciate it if you could take a look when you have time.
34fbd2b to
6a85727
Compare
|
@claude review again |
|
Claude finished @tianyu-l's task in 2m 26s —— View job Approve, please address the items below before merging: review. Your comments are addressed. Before merge: check that each TOML key matches its file name, delete the empty |
There was a problem hiding this comment.
Verdict: Approve -- please address the items below before merging. The latest commits (6a85727, 7ab1947) address @tianyu-l's comments, and the design is now settled. The remaining items are small, local edits. A maintainer still needs to review, and @tianyu-l's change request is still in place.
What changed since the last review. Files are now one per backend (hardware_skips/<backend>.toml), and each holds a flat <backend> = [test names] list. Suite keys, suites=, _OUTSIDE_SUITES, validate_suite, TORCHTITAN_SKIP_CASES_AUTOLOAD and _loading are all gone. Everything goes through register_hardware_skips(), which accepts a file or a directory. The in-tree directory and the entry points are loaded the first time skips are queried. Names now use "hardware skips" instead of "skip cases", and the README links the in-repo --exclude callers.
Example.
# graph_trainer/tests/hardware_skips/rocm.toml: each test listed once
rocm = ["sdc_replay", "aot_fx_trace_llama3_fsdp_tp_cp", ..., "aot_fx_trace_llama3_fsdp_tp_asynctp"]On ROCm (torch.version.hip set), every runner skips every listed name, whichever suite it is in. The duplicated lists are gone. The core file holds the 24 names from main, and the graph_trainer file holds the 7 (6 llama3 tests plus asynctp).
Earlier must-fix items
- Resolved: the entry point. @tianyu-l is OK with keeping it, the env var is removed, and the README example is concrete.
- Resolved: the duplicated suite-keyed graph_trainer lists. Skips are now matched by test name only.
- Resolved: @tianyu-l's comments on naming, the env var, having a single registration path, per-hardware files, the README links, and the "device repo" definition.
Must fix
hardware_skips/__init__.py:45-50: the file name and the top-level key name the backend twice, and nothing checks that they agree. A typo in the key silently disables every skip in that file. Require key ==file.stem(inline).hardware_skips/cuda.toml,xpu.toml(in both directories): four empty placeholder files. Delete them (inline).tests/unit_tests/cpu/test_hardware_skips.py: name validation was removed in this revision, so a stale or misspelled name in a shipped TOML now goes unnoticed until a ROCm run. The new tests cover private loader state instead. Replace them with one CPU check that every shipped name exists in the real suite builders (inline).
Should consider
run_tests.py:385: the docstring saysdisabledis matched by name. It's--excludethat is (inline).graph_trainer/tests/integration_tests.py:336-337: "which ROCm does not support" is a new claim that wasn't onmain(inline).
Details
All registered sources are merged into one global set of names, so the graph_trainer and transformers_modeling_backend runners also apply the core rocm.toml, and the other way round when a runner registers more files. No names collide today. The test proposed in item 3 would make a collision visible if each file were checked against the runner that owns it, but that is optional.
tests/ is not an installed package (pyproject.toml only includes torchtitan* and torchtitan_recipes*). So the README's entry-point example, which imports tests.integration_tests.hardware_skips, only works when the runner is started from a torchtitan checkout. That is how the runners are launched today, so this is fine as is. It is worth one sentence in the README.
Decision 1 (--gpu_arch_type still picks the goldens, while skips follow torch.version.hip) is deferred to a follow-up, as agreed.
Not verified: the CUDA/ROCm runnable and filtered counts (these need GPU runs).
| for skip_hardware, tests in raw.items(): | ||
| if not isinstance(tests, list) or not all( | ||
| isinstance(test, str) for test in tests | ||
| ): | ||
| raise ValueError(f"{source}: {skip_hardware} must be an array of strings") | ||
| testcases.append(HardwareSkipTestCases(skip_hardware, frozenset(tests))) |
There was a problem hiding this comment.
The backend is named twice, once by the file name and once by the top-level key, and nothing checks that they agree. The README says the key is what counts. So a rocm.toml that holds rocn = [...] or ROCm = [...] skips nothing, and one that holds cuda = [...] skips those tests on CUDA. Neither case raises an error. In both cases the misspelled key just falls through to utils.device_type == skip_hardware, which is False.
Since the maintainer asked for one file per backend, the smallest fix is to require that the key equals the file stem. Either raise in register_hardware_skips:
for file in files:
testcases = _parse(file.read_text(encoding="utf-8"), str(file))
if [t.skip_hardware for t in testcases] != [file.stem]:
raise ValueError(f"{file}: must contain exactly one key, {file.stem!r}")
_TESTCASES_TO_SKIP.extend(testcases)or drop the key and take the backend from file.stem. With either fix, a file can't name a different backend from the one its file name says.
| @@ -0,0 +1 @@ | |||
| cuda = [] | |||
There was a problem hiding this comment.
cuda = [] and xpu = [], both here and under graph_trainer/tests/hardware_skips/, are four placeholder files with nothing in them. Loading an empty list has the same effect as having no file. Please delete them and add each file when it gets its first entry. The README already shows the format.
| from tests.integration_tests import IntegrationTestDefinition, hardware_skips | ||
| from tests.integration_tests.hardware_skips import HardwareSkipTestCases | ||
| from tests.integration_tests.run_tests import _filter_tests |
There was a problem hiding this comment.
This revision removed validate_suite, so nothing checks a shipped name against a real test anymore. Today, if a test in rocm.toml is renamed or misspelled, its entry silently stops matching. The renamed test then runs on ROCm, and the failure only shows up on a ROCm runner, far from the rename.
These 168 lines don't catch that. They monkeypatch private state (_TESTCASES_TO_SKIP, _loaded, HARDWARE_SKIPS_DIR) and import the private _filter_tests from another module, which .claude/rules/tests.md and the naming rules ask us to avoid. Being self-contained is the reason the test misses the one regression that matters.
Suggest replacing the file with one CPU test, about 15 lines. It parses the shipped TOMLs in tests/integration_tests/hardware_skips/ and graph_trainer/tests/hardware_skips/, and asserts that every name appears in the union of the test_names from the suite builders (build_features_test_list, build_model_tests_list, build_h100_tests_list, the graph_trainer _TEST_SUITES_FUNCTION). test_integration_test_definitions.py already calls these builders on CPU, so the test fits there. A parse error in a shipped file would also fail that test, so test_parse_errors can go too.
| ]: | ||
| """Filter tests by name, scope, hardware skips, and GPU count. | ||
|
|
||
| Hardware skips are matched by test name, the same way ``disabled`` is. |
There was a problem hiding this comment.
disabled is a field on the definition, so it isn't matched by name. --exclude is the one that matches by name.
| Hardware skips are matched by test name, the same way ``disabled`` is. | |
| Hardware skips are matched by test name, the same way ``--exclude`` is. |
| # Note: aot_fx_trace applies CUDA graphs, which ROCm does not support; | ||
| # the ROCm skip lives in hardware_skips/rocm.toml. |
There was a problem hiding this comment.
"which ROCm does not support" is a new claim that wasn't on main. PyTorch on ROCm does expose graph capture through torch.cuda.CUDAGraph (HIP graphs). The original note only said that aot_fx_trace turns CUDA graphs on by default. Please keep the original wording, or state the actual ROCm failure if someone has seen it. (unverified: I haven't checked whether these specific tests fail on ROCm.)
| # Note: aot_fx_trace applies CUDA graphs, which ROCm does not support; | |
| # the ROCm skip lives in hardware_skips/rocm.toml. | |
| # Note: aot_fx_trace applies CUDA graph by default; the ROCm skip lives | |
| # in hardware_skips/rocm.toml. |
tianyu-l
left a comment
There was a problem hiding this comment.
looks nice, some remaining comments
| return utils.device_type == skip_hardware | ||
|
|
||
|
|
||
| def get_testcases_should_skip_on_current_hardware() -> set[str]: |
There was a problem hiding this comment.
| def get_testcases_should_skip_on_current_hardware() -> set[str]: | |
| def get_tests_to_skip_on_current_hardware() -> set[str]: |
There was a problem hiding this comment.
Changed the name in latest commit.
| files = sorted(path.glob("*.toml")) if path.is_dir() else [path] | ||
| for file in files: | ||
| _TESTCASES_TO_SKIP.extend( | ||
| _parse(file.read_text(encoding="utf-8"), str(file)) | ||
| ) |
There was a problem hiding this comment.
It seems toml is native python and doesn't require extra package, correct?
There was a problem hiding this comment.
Yes, it's native since Python 3.11.
| "fsdp_deferred_gradient_reduction", | ||
| "fsdp+varlen_attn+per_op_sac", | ||
| "deepseek_v3_fused_mla_swiglu_fsdp+ep", | ||
| "deepseek_v4_fsdp+tp+ep", # Sparse attention / indexer kernels are CUDA-only and unvalidated on ROCm. |
There was a problem hiding this comment.
Initially I thought we don't need .toml, and maybe .txt would be enough. But here it seems to have the advantage of supporting comments easily.
Given you've simplified things, I think it's fine to have all the skips for all hardware in one file, per claude suggestion -- need a more general name though.
There was a problem hiding this comment.
They're consolidated into one file now. I've named it skipped_tests.toml, so the file path is hardware_skips/skipped_tests.toml.
| """Leverage the Python plugin mechanism to load out-of-tree hardware skips.""" | ||
| from importlib.metadata import entry_points | ||
|
|
||
| group_name = "torchtitan.hardware_skips" |
There was a problem hiding this comment.
at least involve "test" in the name? e.g. torchtitan.tests.integration_tests.hardware_skips to be faithful to the path
There was a problem hiding this comment.
I've renamed group_name to torchtitan.integration_tests.hardware_skips.
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
@claude review again |
|
Claude finished @tianyu-l's task in 1m 56s —— View job Approve, please address the items below before merging: review. 1d84b98 addresses the latest comments. Still open: the unit tests check private loader state, not that the shipped skip names exist in the real suites (@tianyu-l to decide), plus two small cleanups. |
There was a problem hiding this comment.
Verdict: Approve -- please address the items below before merging. 1d84b98 addresses @tianyu-l's latest comments and two of my three earlier items. What remains is local cleanup plus one test question that a maintainer should decide. A maintainer still needs to review, and @tianyu-l's 11-12 change request is still in place.
What changed since the last review. One commit, 1d84b98:
- The per-backend files are merged into one
skipped_tests.tomlper runner, with one top-level key per backend. - The getter is renamed to
get_tests_to_skip_on_current_hardware. - The entry-point group is now
torchtitan.integration_tests.hardware_skips. register_hardware_skipstakes a single file again.- The
run_tests.pydocstring and the graph_trainer block comment now matchmain.
Example.
# tests/integration_tests/hardware_skips/skipped_tests.toml
rocm = ["sdc_replay_accelerator_graph", ..., "qwen3_fsdp+deepep"] # 24 names
# a future backend adds a key to the same file:
# xpu = ["dist_gemm"]On ROCm, every runner drops these names, plus anything its own file registers, and logs Skipping test <suite>/<name> (hardware-specific skip). I checked the 24 core names against the removed skip_rocm_test=True entries: all 24 exist, and they are the same set.
Earlier must-fix items
- Resolved: the empty
cuda.toml/xpu.tomlplaceholders are gone. - Resolved differently: the "key must equal the file stem" check. It no longer applies, because @tianyu-l asked for a single file with several keys. The leftover risk is in Details.
- Still open:
tests/unit_tests/cpu/test_hardware_skips.py. See must-fix 1.
Must fix
tests/unit_tests/cpu/test_hardware_skips.py: still unaddressed. The author's reply is that the test should stay self-contained. But the regression that can happen silently is a shipped name going stale after a rename, and only a test that reads the shipped files can catch it. These 164 lines patch private state instead (_TESTCASES_TO_SKIP,_loaded,HARDWARE_SKIPS_DIR, and the private_filter_testsfrom another module). @tianyu-l, please decide. My recommendation: replace the file with one test intest_integration_test_definitions.py. It would parse both shipped TOMLs and assert that every name is in thetest_names of the suite builders (corebuild_*_tests_list, graph_trainer_TEST_SUITES_FUNCTION). About 15 lines.
Should consider
hardware_skips/__init__.py:31-63: a dict keyed by backend can replace theHardwareSkipTestCasesdataclass and the list (inline).graph_trainer/tests/integration_tests.py:346,384,633: "Also skipped on ROCm" is on 3 of the 7 skipped tests and repeats the comment at line 336 (inline).
Details
A misspelled backend key (rocn = [...], ROCm = [...]) still skips nothing and raises no error: it falls through to utils.device_type == key. Allowlisting the in-tree keys doesn't work cleanly, because out-of-tree files use their own device_type. A shipped-names test like the one in must-fix 1 could also assert that the in-tree keys are in {"cuda", "rocm", "xpu"}. That check is optional.
The entry-point group is torchtitan.integration_tests.hardware_skips. @tianyu-l had suggested torchtitan.tests.integration_tests.hardware_skips, to match the path. Either name includes "test", which was the request.
Not verified: the CUDA/ROCm runnable and filtered counts (these need GPU runs).
| HARDWARE_SKIPS_DIR = Path(__file__).parent | ||
|
|
||
|
|
||
| @dataclass(frozen=True) | ||
| class HardwareSkipTestCases: | ||
| """The test cases skipped on one hardware backend.""" | ||
|
|
||
| skip_hardware: str | ||
| tests: frozenset[str] | ||
|
|
||
|
|
||
| def _parse(text: str, source: str) -> list[HardwareSkipTestCases]: | ||
| raw = tomllib.loads(text) | ||
| testcases: list[HardwareSkipTestCases] = [] | ||
| for skip_hardware, tests in raw.items(): | ||
| if not isinstance(tests, list) or not all( | ||
| isinstance(test, str) for test in tests | ||
| ): | ||
| raise ValueError(f"{source}: {skip_hardware} must be an array of strings") | ||
| testcases.append(HardwareSkipTestCases(skip_hardware, frozenset(tests))) | ||
| return testcases | ||
|
|
||
|
|
||
| _TESTCASES_TO_SKIP: list[HardwareSkipTestCases] = [] | ||
|
|
||
|
|
||
| def register_hardware_skips(source: str | Path) -> None: | ||
| """Register a hardware-skip file. | ||
|
|
||
| Registration must happen before the runner starts filtering tests. | ||
| """ | ||
| path = Path(source) | ||
| _TESTCASES_TO_SKIP.extend(_parse(path.read_text(encoding="utf-8"), str(path))) |
There was a problem hiding this comment.
Now that there is one file with one list per backend, HardwareSkipTestCases is a list of (backend, names) pairs that get_tests_to_skip_on_current_hardware merges again on every call. A dict keyed by backend holds the same thing, and it removes the public dataclass and the from __future__ import. HARDWARE_SKIPS_DIR is also only used to build one path now:
_SKIPPED_TESTS_FILE = Path(__file__).with_name("skipped_tests.toml")
_TESTS_TO_SKIP: dict[str, set[str]] = defaultdict(set)
def register_hardware_skips(source: str | Path) -> None:
"""Register a hardware-skip file. Must run before the runner filters tests."""
path = Path(source)
for hardware, tests in tomllib.loads(path.read_text(encoding="utf-8")).items():
if not isinstance(tests, list) or not all(isinstance(t, str) for t in tests):
raise ValueError(f"{path}: {hardware} must be an array of strings")
_TESTS_TO_SKIP[hardware].update(tests)and get_tests_to_skip_on_current_hardware becomes a union over the keys where _should_skip_current_hardware(hardware) is true. That is about 15 fewer lines, and it is the "minimal and simpler" shape @tianyu-l asked for.
| test_name="aot_fx_trace_llama3_fsdp_tp_cp", | ||
| ngpu=8, | ||
| skip_rocm_test=True, | ||
| # Also skipped on ROCm; see hardware_skips/skipped_tests.toml. |
There was a problem hiding this comment.
This note appears on 3 of the 7 skipped tests (here, line 384, and line 633), only on the ones that are also disabled. The other four don't have it, and the block comment at line 336 already says where the ROCm skips live. The note is incomplete and partly repeats that comment. Please delete all three; the TOML is the single place that records the skip.
|
@lixing-he please rebase so that I can trigger CI. Also please see what's worth fixing from claude's comment; no blocker from me. |
1d84b98 to
ebb05c9
Compare
Rebased onto the latest main, and applied claude's suggestions of comments. |
Summary
Replace the per-definition
skip_rocm_test: boolon integration tests with asingle TOML file under
tests/integration_tests/hardware_skips/:utils.device_type;cuda/rocmare distinguished withtorch.version.hip;the skip;
calling
register_hardware_skips()explicitly, using the same format andparser as the in-tree file;
graph_trainer skips move to their own TOML, registered by that runner;
Background
Integration tests currently have no unified skip mechanism: skipping is spread
across per-definition booleans, and some of them, such as skip_rocm_test, are
tightly coupled to specific hardware.
Design
Skip rules live under
tests/integration_tests/hardware_skips/:TOML format
xpuand so on compare directly withutils.device_type;cudaandrocmare special cases because both reportdevice_type == "cuda", and are distinguished withtorch.version.hip;test_names ofIntegrationTestDefinitionentries;strings raises
ValueErrorbefore any test starts.Registering an out-of-tree device
Beyond the default file, an out-of-tree device can register its own TOML, using
the same schema, in two ways:
entry point:
call
register_hardware_skips(path)directly from the test bootstrap.Migration
skip_rocm_testfromIntegrationTestDefinition;skip_rocm_test=Trueentries in the core suites intotests/integration_tests/hardware_skips/skipped_tests.tomlunderrocm;skip_rocm_test=Trueentries intotorchtitan/experiments/graph_trainer/tests/hardware_skips/skipped_tests.toml,registered by that runner;
tests/integration_tests/hardware_skips/README.md, link it from the TestStructure in
tests/README.md, and add a rule to.claude/rules/tests.md;skip_rocm_testare incompatible and need to move to the TOML.Validation
Selection over the current main inventory (86 definitions: features 51 /
models 26 / h100 9):
current
skip_rocm_test=Truecount;tests/unit_tests/cpu/test_hardware_skips.py: 5 tests pass, covering parseerrors, registration, hardware matching, entry-point registration/failure, and
runner skipping by test name.