Skip to content

[ROCm] Add skipIfRocmVersionAtLeast([7, 14]) skips for ROCm 7.14 known failures - #188593

Closed
chinmaydk99 wants to merge 11 commits into
pytorch:mainfrom
chinmaydk99:ck-add-rocm-7.14-skips
Closed

chinmaydk99 wants to merge 11 commits into
pytorch:mainfrom
chinmaydk99:ck-add-rocm-7.14-skips

Conversation

@chinmaydk99

@chinmaydk99 chinmaydk99 commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Temporarily skips tests that newly fail in ROCm 7.14 preview CI while remaining green in the current ROCm 7.2 CI. The skips activate automatically during the 7.14 transition and do not affect CUDA, CPU, or older ROCm jobs.

Adds two decorators mirroring the existing lessthan pattern:

  • skipIfRocmVersionAtLeast(version) in common_utils.py
  • skip_if_rocm_ver_atleast_multiprocess(version) in common_distributed.py

Scope of the temporary skips

These failures were observed while validating the ROCm 7.14 preview CI configuration. They do not all represent ROCm runtime regressions; the causes span PyTorch test assumptions, wheel packaging, CI configuration, and component-specific behavior changes.

The version-gated skips address the following concrete cases:

  • MIOpen numerical behavior: selected CTC-loss and convolution cases exceed existing PyTorch tolerances under the ROCm 7.14 library stack.
  • rocBLAS large-batch behavior: test_cholesky_solve_batched_many_batches encounters incorrect results at the 65,536-batch boundary.
  • Inductor numerical expectations: the log10 tests either differ from eager execution under strict bitwise equality or unexpectedly pass stale strict-xfail metadata.
  • ROCm SDK library discovery: spawned native processes cannot locate wheel-provided libraries such as librocprofiler-sdk.so.1 and libamdhip64.so.7. This affects:
    • torch_shm_manager filesystem-sharing tests
    • TestStandaloneCPPJIT.test_load_standalone
    • Inductor’s CPU vec-ISA probe used by dynamic-shape and GPU-wrapper tests
  • Device visibility and diagnostics: some tests assume CUDA-style visibility or exact assertion behavior that differs when ROCm 7.14 initializes and enumerates GPU agents.
  • Unexpected runtime logging: ROCm agent visibility warnings enter log streams used by tests that require exact stderr or logging matches.
  • RCCL/NCCL functionality: Copy Engine collectives, symmetric-memory registration, and selected profiler annotations are unavailable or unstable in the tested configuration.
  • Distributed execution: isolated FSDP, replicate, and context-parallel attention tests show small numerical differences, while selected symmetric-memory tests hang during rendezvous or teardown.
  • Wheel build metadata: selected tests expect compiler configuration metadata or runtime paths that are not currently present in the ROCm 7.14 wheel environment.

These skips are narrowly scoped compatibility measures for the CI transition. They do not disable the corresponding functionality globally and do not affect CUDA, CPU, or earlier ROCm jobs. Each skip is intended to be removed when its underlying PyTorch, library, or CI-integration issue is resolved.

Validation

At commit c943656, the rocm-nightly workflow ran all tests successfully using ROCm7.14 GA.
Post that commit, the temporary changes to install_rocm.sh and rocm-nightly.yml were reverted, as they will be part of a follow-up PR: #188429

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @azahed98

@pytorch-bot

pytorch-bot Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/188593

Note: Links to docs will display an error until the docs builds have been completed.

❌ You can merge normally! (4 Unrelated Failures), 1 Unclassified Failure

As of commit bcb31a0 with merge base b8a607d (image):

UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot

pytorch-bot Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@chinmaydk99 chinmaydk99 changed the title Add skipIfRocmVersionAtLeast([7, 14]) skips for ROCm 7.14 known failures [ROCm] Add skipIfRocmVersionAtLeast([7, 14]) skips for ROCm 7.14 known failures Jun 30, 2026
@chinmaydk99
chinmaydk99 force-pushed the ck-add-rocm-7.14-skips branch 2 times, most recently from 372480d to 9b03588 Compare July 1, 2026 01:23
@chinmaydk99
chinmaydk99 force-pushed the ck-add-rocm-7.14-skips branch from 9b03588 to 587246b Compare July 20, 2026 14:14
Comment thread torch/cuda/__init__.py Resolved
Comment thread tools/testing/test_selections.py Resolved
Comment thread tools/testing/test_selections.py Resolved
Comment thread .github/workflows/rocm-nightly.yml Resolved
@jithunnair-amd
jithunnair-amd requested a review from jeffdaily July 31, 2026 19:09
@chinmaydk99
chinmaydk99 force-pushed the ck-add-rocm-7.14-skips branch from 7fcc379 to fe70b88 Compare July 31, 2026 20:39
@jithunnair-amd jithunnair-amd added ciflow/rocm-nightly Trigger "default" config CI on a nightly build of ROCm from theRock on MI300 keep-going Don't stop on first failure, keep running tests until the end ci-no-td Do not run TD on this PR labels Jul 31, 2026
@chinmaydk99
chinmaydk99 force-pushed the ck-add-rocm-7.14-skips branch 2 times, most recently from 8b74acc to e4964df Compare August 1, 2026 17:12
@jithunnair-amd jithunnair-amd added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 1, 2026
@jithunnair-amd
jithunnair-amd requested a review from a team as a code owner August 5, 2026 05:30
@jithunnair-amd

Copy link
Copy Markdown
Collaborator

@pytorchbot merge -f "Lint clean. Validation down on ROCm 7.14 as mentioned in PR description. Upgrade to 7.14 is part of follow-up PR 188429"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Comment on lines 49 to 54
if IS_ROCM and not IS_MEM_LEAK_CHECK:
try:
# This is the same logic used in GHA health check, see .github/templates/common.yml.j2
lines = (
subprocess.check_output(["rocminfo"], encoding="ascii").strip().split("\n")
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rocminfo does not currently exist on Windows, so this causes tests to fail there. See ROCm/TheRock#7155

jithunnair-amd added a commit to ethanwee1/pytorch that referenced this pull request Aug 7, 2026
Expand the default test matrix in rocm-preview.yml back to 8 shards,
reversing the 6-shard reduction from pytorch#188593. This matches the
trunk MI350 shard count and reduces per-shard runtime.

Test Plan:
- Verified diff restores 8 default shards in rocm-preview.yml

Authored with assistance from Cursor

Co-authored-by: Cursor <[email protected]>
pytorchmergebot pushed a commit that referenced this pull request Aug 13, 2026
## Summary
Remove 21 temporary ROCm 7.14 test skips added by #188593.  ROCm trunk now uses ROCm 7.14. These failures no longer reproduce.

## Child loader fixes
#188429 fixed the ROCm wheel environment and library search paths. Child processes can now load the required ROCm libraries.
Remove the skips for:
- `test/test_multiprocessing.py::TestMultiprocessing::test_fs_sharing`
- `test/test_multiprocessing.py::TestMultiprocessing::test_fs_preserve_sharing
- `test/test_multiprocessing.py::TestMultiprocessing::test_fs_pool`
- `test/test_multiprocessing.py::TestMultiprocessing::test_fs`
- `test/test_multiprocessing.py::TestMultiprocessing::test_fs_is_shared`
- `test/test_utils.py::TestStandaloneCPPJIT::test_load_standalone`
- `test/inductor/test_gpu_cpp_wrapper.py::TestGpuWrapper::test_cuda_cpp_wrapper_keeps_vec_isa_for_host_vectorized_code`
- `test/inductor/test_torchinductor_dynamic_shapes.py::DynamicShapesCpuTests::test_tmp_not_defined_issue3_dynamic_shapes_cpu`

## Other obsolete skips
The following tests no longer fail with ROCm 7.14:

- `test/test_optim.py::TestOptimRenewed::test_rosenbrock_sparse[SGD,cuda,float64,with_lrsched=False]`
- `test/test_cuda.py::TestCudaAllocator::test_nvml_get_handler`
- `test/test_cuda.py::TestCudaAllocator::test_temperature`
- `test/test_cuda.py::TestCudaAllocator::test_device_memory_used`
- `test/test_cuda.py::TestCudaAllocator::test_power_draw`
- `test/test_cuda.py::TestCudaAllocator::test_clock_speed`
- `test/test_cuda.py::TestCudaAllocator::test_raw_amdsmi_device_count`
- `test/distributed/_composable/fsdp/test_fully_shard_training.py::TestFullyShard1DTrainingCore::test_post_optim_event`
- `test/distributed/_composable/test_replicate_with_compiler.py::ReplicateTest::test_compile_gpu`
- `test/distributed/_composable/test_replicate_with_compiler.py::ReplicateTest::test_compile_fp16`
- `test/distributed/tensor/test_attention.py::CPFlexAttentionTest::test_cp_flex_attention_causal_mask`
- `test/distributed/tensor/test_attention.py::CPFlexAttentionTest::test_cp_flex_attention_document_mask`
- `test/test_torch.py::TestTorch::test_cxx_flags`
## ROCm/CUDA CI evidence

The PR head (`6d80a47`) was tested in run [31399645566](https://github.com/pytorch/pytorch/actions/runs/31399645566). CI verified 20 of the 21 re-enabled tests; the remaining dynamic-shapes CPU test was not scheduled in the available TD shards.

- Multiprocessing (`test_fs_sharing`, `test_fs_preserve_sharing`, `test_fs_pool`, `test_fs`, `test_fs_is_shared`) passed on CUDA 13.0 default shard 3/14: `test_multiprocessing 1/1 was successful` ([job 93495192855, lines 6970-6971](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93495192855#step:10:6970)).
- `test_load_standalone` passed on CUDA 13.0 default shard 2/14: `test_utils 1/1 was successful` ([job 93495192828, line 6966](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93495192828#step:10:6966)).
- `test_cuda_cpp_wrapper_keeps_vec_isa_for_host_vectorized_code` passed on CUDA 13.0 default shard 10/14: `inductor/test_gpu_cpp_wrapper 2/2 was successful` ([job 93495192873, line 7404](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93495192873#step:10:7404)); the shard list includes the test ([line 7894](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93495192873#step:10:7894)).
- `test_tmp_not_defined_issue3_dynamic_shapes_cpu`: not found in the downloaded CUDA/ROCm TD shard lists for this run. The inductor CPU run [31399645147](https://github.com/pytorch/pytorch/actions/runs/31399645147) explicitly excludes `inductor/test_torchinductor_dynamic_shapes`; this test needs separate validation.
- `test_rosenbrock_sparse[SGD,cuda,float64,with_lrsched=False]` passed on ROCm default shard 7/8: `test_optim 1/2 was successful` ([job 93498959456, lines 9052-9053](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93498959456#step:10:9052)).
- The six CUDA allocator/AMD SMI tests (`test_nvml_get_handler`, `test_temperature`, `test_device_memory_used`, `test_power_draw`, `test_clock_speed`, `test_raw_amdsmi_device_count`) passed on ROCm default shard 1/8: `test_cuda 1/1 was successful` ([job 93498959446, lines 9442-9443](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93498959446#step:10:9442)).
- `test_post_optim_event` passed on ROCm distributed shard 1/3: `distributed/_composable/fsdp/test_fully_shard_training 1/1 was successful` ([job 93498959453, line 9041](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93498959453#step:10:9041)).
- `test_compile_gpu` and `test_compile_fp16` passed on ROCm distributed shard 2/3: `distributed/_composable/test_replicate_with_compiler 1/1 was successful` ([job 93498959538, line 9060](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93498959538#step:10:9060)).
- `test_cp_flex_attention_causal_mask` and `test_cp_flex_attention_document_mask` passed on CUDA 13.2 distributed shard 3/3: `distributed/tensor/test_attention 1/1 was successful` ([job 93495192213, lines 6919-6920](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93495192213#step:10:6919)).
- `test_cxx_flags` passed on the ROCm inductor shard: `test_torch 1/3 was successful` ([job 93498959536, line 8650](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93498959536#step:10:8650)).

Individual `PASSED` lines are in the pytest artifacts referenced by these module-level success lines.

Pull Request resolved: #192674
Approved by: https://github.com/jeffdaily

Co-authored-by: Cursor <[email protected]>
pytorchmergebot pushed a commit that referenced this pull request Aug 14, 2026
…14 (#189646)

ROCm 7.14+ ck_tile headers changed UniversalGemmPipelineProblem: the simplified API no longer passes has_hot_loop / tail_number into the pipeline problem, and the generated kernel type is no longer templated on those values.
Inductor still emitted the legacy signature, so CK-Tile GEMM codegen failed to compile against newer ROCm installs.

Detect the API at codegen time rather than from torch.version.hip, which is frozen when PyTorch is built and says nothing about the headers these kernels actually compile against. The probe resolves ck_tile/ops/gemm/pipeline/gemm_pipeline_problem.hpp through the same ordered include list the compiler uses (the CK directory, then $ROCM_HOME), anchors on struct UniversalGemmPipelineProblem, scans backward to the preceding template clause, and compares AElementWise_ against HasHotLoop_ after GemmPipelineScheduler Scheduler_. torch.version.hip >= 7.14 remains a fallback for when the header is missing or unrecognized, but every path reaching it now logs a warning naming the reason, and an unparsable version string degrades to the legacy API instead of raising out of choice generation.

Emit the legacy TailHandler / templated-kernel path for v1 headers and the simplified UniversalGemmPipelineProblem + non-templated GemmKernel path for v2, sharing one launch template between both paths.

CShuffle needed two fixes. ELayout was written as an invalid constexpr assignment instead of a type alias, a pre-existing bug that made every CShuffle instance fail to compile and be silently pruned during autotune. Once they compile, they still cannot be offered against pre-v2 headers, where CShuffleEpilogueProblem takes a memory_operation_enum argument with no default whose value depends on kBatch. Emitting that argument would mean resolving kBatch before the split-K choice is made, so filter_op drops CShuffle unless the v2 probe succeeds instead; that keeps the instances out of autotuning rather than spending a failed compile on each. ck_tile removed the argument one release after it simplified the pipeline problem, so a snapshot taken between the two would be misclassified here. Both shipped ROCm releases fall on one side or the other, so this is accepted rather than adding a second probe.

Review in the order the codegen runs: the include-path plumbing in compile_command.py and the header probe, then the v1/v2 emission split, then the CShuffle gate, then the tests.

Patch ck4inductor's pyproject.toml at wheel-build time to package the ck_tile headers, which ROCm no longer installs system-wide. The patch is a no-op once the fix lands upstream in composable_kernel.

Unskip CK Tile inductor tests which were skipped as part of #188593

Test Plan:
PYTORCH_TEST_WITH_ROCM=1 python3 test/inductor/test_ck_backend.py -k standalone_cktile -v
PYTORCH_TEST_WITH_ROCM=1 python3 test/inductor/test_ck_backend.py TestCKTileUniversalGemmTemplate -v

Authored with Opus 5.

Pull Request resolved: #189646
Approved by: https://github.com/jeffdaily

Co-authored-by: Jeff Daily <[email protected]>
orrangetabby17 pushed a commit to orrangetabby17/pytorch that referenced this pull request Sep 2, 2026
## Summary
Remove 21 temporary ROCm 7.14 test skips added by pytorch#188593.  ROCm trunk now uses ROCm 7.14. These failures no longer reproduce.

## Child loader fixes
pytorch#188429 fixed the ROCm wheel environment and library search paths. Child processes can now load the required ROCm libraries.
Remove the skips for:
- `test/test_multiprocessing.py::TestMultiprocessing::test_fs_sharing`
- `test/test_multiprocessing.py::TestMultiprocessing::test_fs_preserve_sharing
- `test/test_multiprocessing.py::TestMultiprocessing::test_fs_pool`
- `test/test_multiprocessing.py::TestMultiprocessing::test_fs`
- `test/test_multiprocessing.py::TestMultiprocessing::test_fs_is_shared`
- `test/test_utils.py::TestStandaloneCPPJIT::test_load_standalone`
- `test/inductor/test_gpu_cpp_wrapper.py::TestGpuWrapper::test_cuda_cpp_wrapper_keeps_vec_isa_for_host_vectorized_code`
- `test/inductor/test_torchinductor_dynamic_shapes.py::DynamicShapesCpuTests::test_tmp_not_defined_issue3_dynamic_shapes_cpu`

## Other obsolete skips
The following tests no longer fail with ROCm 7.14:

- `test/test_optim.py::TestOptimRenewed::test_rosenbrock_sparse[SGD,cuda,float64,with_lrsched=False]`
- `test/test_cuda.py::TestCudaAllocator::test_nvml_get_handler`
- `test/test_cuda.py::TestCudaAllocator::test_temperature`
- `test/test_cuda.py::TestCudaAllocator::test_device_memory_used`
- `test/test_cuda.py::TestCudaAllocator::test_power_draw`
- `test/test_cuda.py::TestCudaAllocator::test_clock_speed`
- `test/test_cuda.py::TestCudaAllocator::test_raw_amdsmi_device_count`
- `test/distributed/_composable/fsdp/test_fully_shard_training.py::TestFullyShard1DTrainingCore::test_post_optim_event`
- `test/distributed/_composable/test_replicate_with_compiler.py::ReplicateTest::test_compile_gpu`
- `test/distributed/_composable/test_replicate_with_compiler.py::ReplicateTest::test_compile_fp16`
- `test/distributed/tensor/test_attention.py::CPFlexAttentionTest::test_cp_flex_attention_causal_mask`
- `test/distributed/tensor/test_attention.py::CPFlexAttentionTest::test_cp_flex_attention_document_mask`
- `test/test_torch.py::TestTorch::test_cxx_flags`
## ROCm/CUDA CI evidence

The PR head (`6d80a47`) was tested in run [31399645566](https://github.com/pytorch/pytorch/actions/runs/31399645566). CI verified 20 of the 21 re-enabled tests; the remaining dynamic-shapes CPU test was not scheduled in the available TD shards.

- Multiprocessing (`test_fs_sharing`, `test_fs_preserve_sharing`, `test_fs_pool`, `test_fs`, `test_fs_is_shared`) passed on CUDA 13.0 default shard 3/14: `test_multiprocessing 1/1 was successful` ([job 93495192855, lines 6970-6971](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93495192855#step:10:6970)).
- `test_load_standalone` passed on CUDA 13.0 default shard 2/14: `test_utils 1/1 was successful` ([job 93495192828, line 6966](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93495192828#step:10:6966)).
- `test_cuda_cpp_wrapper_keeps_vec_isa_for_host_vectorized_code` passed on CUDA 13.0 default shard 10/14: `inductor/test_gpu_cpp_wrapper 2/2 was successful` ([job 93495192873, line 7404](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93495192873#step:10:7404)); the shard list includes the test ([line 7894](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93495192873#step:10:7894)).
- `test_tmp_not_defined_issue3_dynamic_shapes_cpu`: not found in the downloaded CUDA/ROCm TD shard lists for this run. The inductor CPU run [31399645147](https://github.com/pytorch/pytorch/actions/runs/31399645147) explicitly excludes `inductor/test_torchinductor_dynamic_shapes`; this test needs separate validation.
- `test_rosenbrock_sparse[SGD,cuda,float64,with_lrsched=False]` passed on ROCm default shard 7/8: `test_optim 1/2 was successful` ([job 93498959456, lines 9052-9053](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93498959456#step:10:9052)).
- The six CUDA allocator/AMD SMI tests (`test_nvml_get_handler`, `test_temperature`, `test_device_memory_used`, `test_power_draw`, `test_clock_speed`, `test_raw_amdsmi_device_count`) passed on ROCm default shard 1/8: `test_cuda 1/1 was successful` ([job 93498959446, lines 9442-9443](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93498959446#step:10:9442)).
- `test_post_optim_event` passed on ROCm distributed shard 1/3: `distributed/_composable/fsdp/test_fully_shard_training 1/1 was successful` ([job 93498959453, line 9041](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93498959453#step:10:9041)).
- `test_compile_gpu` and `test_compile_fp16` passed on ROCm distributed shard 2/3: `distributed/_composable/test_replicate_with_compiler 1/1 was successful` ([job 93498959538, line 9060](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93498959538#step:10:9060)).
- `test_cp_flex_attention_causal_mask` and `test_cp_flex_attention_document_mask` passed on CUDA 13.2 distributed shard 3/3: `distributed/tensor/test_attention 1/1 was successful` ([job 93495192213, lines 6919-6920](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93495192213#step:10:6919)).
- `test_cxx_flags` passed on the ROCm inductor shard: `test_torch 1/3 was successful` ([job 93498959536, line 8650](https://github.com/pytorch/pytorch/actions/runs/31399645566/job/93498959536#step:10:8650)).

Individual `PASSED` lines are in the pytest artifacts referenced by these module-level success lines.

Pull Request resolved: pytorch#192674
Approved by: https://github.com/jeffdaily

Co-authored-by: Cursor <[email protected]>
orrangetabby17 pushed a commit to orrangetabby17/pytorch that referenced this pull request Sep 2, 2026
…14 (pytorch#189646)

ROCm 7.14+ ck_tile headers changed UniversalGemmPipelineProblem: the simplified API no longer passes has_hot_loop / tail_number into the pipeline problem, and the generated kernel type is no longer templated on those values.
Inductor still emitted the legacy signature, so CK-Tile GEMM codegen failed to compile against newer ROCm installs.

Detect the API at codegen time rather than from torch.version.hip, which is frozen when PyTorch is built and says nothing about the headers these kernels actually compile against. The probe resolves ck_tile/ops/gemm/pipeline/gemm_pipeline_problem.hpp through the same ordered include list the compiler uses (the CK directory, then $ROCM_HOME), anchors on struct UniversalGemmPipelineProblem, scans backward to the preceding template clause, and compares AElementWise_ against HasHotLoop_ after GemmPipelineScheduler Scheduler_. torch.version.hip >= 7.14 remains a fallback for when the header is missing or unrecognized, but every path reaching it now logs a warning naming the reason, and an unparsable version string degrades to the legacy API instead of raising out of choice generation.

Emit the legacy TailHandler / templated-kernel path for v1 headers and the simplified UniversalGemmPipelineProblem + non-templated GemmKernel path for v2, sharing one launch template between both paths.

CShuffle needed two fixes. ELayout was written as an invalid constexpr assignment instead of a type alias, a pre-existing bug that made every CShuffle instance fail to compile and be silently pruned during autotune. Once they compile, they still cannot be offered against pre-v2 headers, where CShuffleEpilogueProblem takes a memory_operation_enum argument with no default whose value depends on kBatch. Emitting that argument would mean resolving kBatch before the split-K choice is made, so filter_op drops CShuffle unless the v2 probe succeeds instead; that keeps the instances out of autotuning rather than spending a failed compile on each. ck_tile removed the argument one release after it simplified the pipeline problem, so a snapshot taken between the two would be misclassified here. Both shipped ROCm releases fall on one side or the other, so this is accepted rather than adding a second probe.

Review in the order the codegen runs: the include-path plumbing in compile_command.py and the header probe, then the v1/v2 emission split, then the CShuffle gate, then the tests.

Patch ck4inductor's pyproject.toml at wheel-build time to package the ck_tile headers, which ROCm no longer installs system-wide. The patch is a no-op once the fix lands upstream in composable_kernel.

Unskip CK Tile inductor tests which were skipped as part of pytorch#188593

Test Plan:
PYTORCH_TEST_WITH_ROCM=1 python3 test/inductor/test_ck_backend.py -k standalone_cktile -v
PYTORCH_TEST_WITH_ROCM=1 python3 test/inductor/test_ck_backend.py TestCKTileUniversalGemmTemplate -v

Authored with Opus 5.

Pull Request resolved: pytorch#189646
Approved by: https://github.com/jeffdaily

Co-authored-by: Jeff Daily <[email protected]>
pytorchmergebot pushed a commit that referenced this pull request Sep 3, 2026
PR #188593 sets `IS_ROCM` from `torch.version.hip`. Import of `tools/testing/test_selections.py` then runs `rocminfo` to set `NUM_PROCS`. The Windows nightly job in ROCm/TheRock#7155 does not have `rocminfo` on PATH. `subprocess.check_output` raises `FileNotFoundError`, and `test/run_test.py` stops before any test starts.

This change keeps the current count method: count output lines that contain `" gfx"`. On Windows the first command is `hipInfo`. Each HIP device prints a `gcnArchName` line that contains `" gfx"`, so the count uses the same rule as Linux. If `hipInfo` is missing or returns a non-zero exit code, the code runs `rocminfo`. On Linux the code runs `rocminfo` only. If the command is missing or returns a non-zero exit code, `NUM_PROCS` is set to `1` and import continues.

This change does not disable GPU counting on Windows when `hipInfo` is present. This change does not use `torch.cuda.device_count()` for `NUM_PROCS`.

Pull Request resolved: #193594
Approved by: https://github.com/jeffdaily

Co-authored-by: Cursor <[email protected]>
Co-authored-by: Jeff Daily <[email protected]>
Sanskaaar1 pushed a commit to Sanskaaar1/pytorch that referenced this pull request Sep 8, 2026
PR pytorch#188593 sets `IS_ROCM` from `torch.version.hip`. Import of `tools/testing/test_selections.py` then runs `rocminfo` to set `NUM_PROCS`. The Windows nightly job in ROCm/TheRock#7155 does not have `rocminfo` on PATH. `subprocess.check_output` raises `FileNotFoundError`, and `test/run_test.py` stops before any test starts.

This change keeps the current count method: count output lines that contain `" gfx"`. On Windows the first command is `hipInfo`. Each HIP device prints a `gcnArchName` line that contains `" gfx"`, so the count uses the same rule as Linux. If `hipInfo` is missing or returns a non-zero exit code, the code runs `rocminfo`. On Linux the code runs `rocminfo` only. If the command is missing or returns a non-zero exit code, `NUM_PROCS` is set to `1` and import continues.

This change does not disable GPU counting on Windows when `hipInfo` is present. This change does not use `torch.cuda.device_count()` for `NUM_PROCS`.

Pull Request resolved: pytorch#193594
Approved by: https://github.com/jeffdaily

Co-authored-by: Cursor <[email protected]>
Co-authored-by: Jeff Daily <[email protected]>
jeffdaily added a commit to ROCm/pytorch that referenced this pull request Sep 10, 2026
Two of the re-enabled tests fail only on the gfx950 CI distributed runners, where the two visible devices are SR-IOV virtual functions: CommTest.test_intra_node_comm_all_reduce (both parametrizations) completes the symmetric-memory rendezvous and then hangs at the first device-side atomic on the peer's signal pad in one_shot_all_reduce (the first two collectives go through RCCL and pass), and SymmMemPoolTest.test_mempool_large_alloc_barrier completes rendezvous and then memory-faults in barrier_kernel's first atomic on the peer's signal pad (HSA aperture violation, address 0). HIP reports peer access as possible and the IPC import/map calls succeed on those runners, but kernel-side access to the peer's mapped memory does not work; every other cross-GPU symmetric-memory test on ROCm >= 7.14 is already skipped (pytorch#188593), so this is the first CI exposure of that path there. Both tests pass on the mi300 runners with the same ROCm 10.0 image and on gfx950 outside CI at world sizes 2 and 8. The "amdsmi_is_P2P_accessible failed" lines in the intra-node logs are a separate, harmless issue: getNvlMesh loops over kMaxDevices handles regardless of how many GPUs amdsmi enumerated, and under TEST_INTRA_NODE_COMM the result is discarded anyway. Skip both on MI350_ARCH so gfx942 keeps the coverage until the runner P2P path is understood.

Test plan: ciflow/trunk (gfx950) should show both as skipped and the three distributed shards green; ciflow/periodic-rocm-mi300 keeps running them. Locally (8x gfx950) the decorators evaluate to skipped.

Authored with the assistance of an AI agent (Claude).
pytorchmergebot pushed a commit that referenced this pull request Sep 25, 2026
…el and re-enable CI tests (#195658)

Advances the `rocm-composable-kernel` pin and generates the one CK header the wheel
does not ship. Restores CK autotuning in CI disabled due to stale pin.

## Motivation

ROCm 7.14 stopped installing the CK headers system-wide, so the inductor CK backends
now compile against what the `ck4inductor` wheel ships. Every header they `#include`
is checked into CK except one: `ck/config.h` is generated by CK's build from
`include/ck/config.h.in`, so it exists in neither ROCm nor the wheel's source tree.
Without it every CK choice fails to compile and is silently discarded, so the CK backends
contribute no autotune candidates at all rather than reporting a missing header.

Scope: this restores CK autotuning in CI. The ROCm CD path has routed through the
Python build pipeline since #182696 and has no CK step.

## Changes

**Generate `ck/config.h`** (`.ci/pytorch/rocm_utils.sh`, `.ci/pytorch/generate_ck_config_h.cmake`)

`build_rocm_ck_wheel()` now generates the header for `gfx90a;gfx942;gfx950` and packages it
with the rest of `include/ck`. This replaces the `ck_tile` `pyproject.toml` patch, which the new
pin makes a no-op.

CK's own CMake cannot produce it in the wheel-build container: `CMakeLists.txt` calls
`find_package(ROCM)`, `find_package(hip REQUIRED)` and `enable_language(HIP)`, and the
image has `hipcc` but no ROCm CMake packages. `config.h.in` substitutes only plain
variables, so the helper sets them and runs the same `configure_file` in `cmake -P`
script mode.

The helper mirrors CK's arch rules rather than referencing them, so it assigns every
variable unconditionally — `"ON"` or empty — instead of only in the true branch.
Leaving one undefined would be indistinguishable from a deliberate OFF, which both
defeats the drift check and makes the script reject any target list that does not
happen to enable everything.

> **Note for CI:** this step shells out to `cmake -P`, so the wheel-build image must
> provide `cmake`.

**Pin bump** `4266f867` → `e2daf442`

The outgoing pin is from February. The new one packages the `ck_tile` headers in
`pyproject.toml`, which makes the patch #189646 added to `rocm_utils.sh` a no-op. It
also makes instance enumeration deterministic and duplicate-free, so a given wheel
offers the same candidates on every machine instead of depending on filesystem order.

This pin is also a prerequisite for follow-up PRs adding gfx1250 WMMA support.

**Re-enable version-skipped tests** (`test/inductor/test_ck_backend.py`)

Removes seven `skipIfRocmVersionAtLeast([7, 14])` decorators, added in #188593 (and
one in #188429) for known 7.14 failures. The predicate is `>=`, so on ROCm 10.x it
evaluates true and these subtests are skipped on every current ROCm CI job rather than
only on the 7.14 release they were written for.

## Test plan

Verified on hardware with both wheels built from this branch — the CK wheel by the
real `build_rocm_ck_wheel()`, so the code under test is what produced the artifact.

| Arch | Collected | Result |
|---|---|---|
| gfx942 (MI300X) | 84 | 76 passed, 8 skipped |
| gfx942 (MI325X) | 84 | 76 passed, 8 skipped |

The 8 skips are the `scaled_mm` cells, skipped upstream for unrelated reasons.

@pytorchbot label "topic: not user facing"

Pull Request resolved: #195658
Approved by: https://github.com/jeffdaily
jeffdaily added a commit to ROCm/pytorch that referenced this pull request Sep 30, 2026
…93594) (#3661)

PR pytorch#188593 sets `IS_ROCM` from `torch.version.hip`. Import of
`tools/testing/test_selections.py` then runs `rocminfo` to set
`NUM_PROCS`. The Windows nightly job in ROCm/TheRock#7155 does not have
`rocminfo` on PATH. `subprocess.check_output` raises
`FileNotFoundError`, and `test/run_test.py` stops before any test
starts.

This change keeps the current count method: count output lines that
contain `" gfx"`. On Windows the first command is `hipInfo`. Each HIP
device prints a `gcnArchName` line that contains `" gfx"`, so the count
uses the same rule as Linux. If `hipInfo` is missing or returns a
non-zero exit code, the code runs `rocminfo`. On Linux the code runs
`rocminfo` only. If the command is missing or returns a non-zero exit
code, `NUM_PROCS` is set to `1` and import continues.

This change does not disable GPU counting on Windows when `hipInfo` is
present. This change does not use `torch.cuda.device_count()` for
`NUM_PROCS`.

Pull Request resolved: pytorch#193594
Approved by: https://github.com/jeffdaily

Co-authored-by: Chinmay Kuchinad <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Jeff Daily <[email protected]>
Co-authored-by: Artem Kuzmitckii <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-td Do not run TD on this PR ciflow/docker ciflow/dtensor Run DTensor specific tests ciflow/h100-symm-mem ciflow/inductor ciflow/rocm-nightly Trigger "default" config CI on a nightly build of ROCm from theRock on MI300 ciflow/trunk Trigger trunk jobs on your pull request keep-going Don't stop on first failure, keep running tests until the end Merged module: dynamo module: inductor module: rocm AMD GPU support for Pytorch open source release notes: distributed (checkpoint) release notes: distributed (fsdp) release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants