Skip to content

[release/2.14] Carry-forward ROCm cherry-picks from release/2.13 - #3593

Closed
pablo-garay wants to merge 9 commits into
release/2.14from
pablo-garay/release-2.14-cherrypick-dedup
Closed

pablo-garay wants to merge 9 commits into
release/2.14from
pablo-garay/release-2.14-cherrypick-dedup

Conversation

@pablo-garay

Copy link
Copy Markdown

Summary

Carry-forward of ROCm-specific commits from release/2.13 onto release/2.14 — the 2.14 analog of the 2.13 "IFU dedup" (PR #3503).

Starting point was the IFU delta surfaced by PR #3591 (release/2.13release/2.14): 74 commits in release/2.13 that are not in release/2.14. Each was analyzed and either dropped (already in 2.14, or 2.13-only plumbing) or cherry-picked here.

Method

Applied the same rules as the release/2.13 cherry-pick process:

  • Drop – already in 2.14: detected by patch-id equivalence (git cherry), by upstream PR number already present, or by content (e.g. an upstream PR backported to 2.13 that 2.14 already carries natively).
  • Drop – 2.13-only: version bump, related_commits, dependency/requirements pins, and release-line CD/build changes (CUDA 12.9 revival, docker image pins, binary-build timeout, RC/PTX strip, etc.).
  • Carry-forward: ROCm-specific fixes not present in 2.14 in any form.

Of the 74: 42 already in 2.14, 20 dropped as 2.13-only (incl. 2 release-line reverts that 2.14 intentionally keeps active), and 12 carry-forward candidates. During cherry-pick, 4 candidates were found to be already in 2.14 (their content had been relocated/absorbed by upstream) and were dropped, leaving 9 commits here.

Commits carried forward (9)

Source Notes
Fix reentrant deadlock in torch.cuda._lazy_call (#3496) clean
Skip ROCm-failing tests in test_cuda/test_nn (#3504) conflict resolved — kept 2.14's test_graph_capture_error... cleanup body + took the @skipIfRocm; kept 2.14's test_allocator_backend (it already fixes the LD_LIBRARY_PATH root cause via subprocess_env(), so the 2.13 blanket skip was dropped)
skip test_hip_device_count (rocprofiler-sdk) clean
skip flaky test_Embedding_discontiguous_cuda clean
[RELEASE_ONLY] skip test_autoheuristic in-code (pytorch#180927) clean
Skip profiler check for foreach tests on ROCm (#3262) clean
Skip test_is_pinned_no_context on python 3.14+ clean
Skip flaky test_reentrant_parent_error_on_cpu clean
Filter out CK gemms for gfx1250-only arch (#3545) clean

Candidates dropped during cherry-pick (already in 2.14)

Test plan

  • TheRock CI wheel build + tests on gfx94X for Python 3.10–3.14

iupaikov-amd and others added 9 commits August 21, 2026 11:53
This fixes deadlock with torch.compile while running bigger models in
MAD engine.

This is a cherry-pick of upstream PR:
pytorch#182948

Made with [Cursor](https://cursor.com)

(cherry picked from commit 24cf333)
Adds @skipIfRocm to 4 tests that consistently fail in the TheRock wheel
test lane (test_pytorch_wheels.yml) on gfx94X/MI300 with
torch==2.13.0a0+rocm7.14.0.

  - test_allocator_backend
  - test_graph_capture_error_releases_reserved_segments
  - test_lazy_call_reentrant_set_rng_state_does_not_deadlock
  - test_linear_cross_entropy_loss_default

Also removes the now-dead @skipIfRocmVersionLessThan((7, 14)) from
test_graph_capture_error_releases_reserved_segments — with @skipIfRocm
on top it is unreachable on ROCm.

  Test plan

- Validated via ROCm/TheRock test_pytorch_wheels.yml run #30218037322 on
gfx94X-dcgpu with torch==2.13.0a0+rocm7.14.0 — all 4 tests
  now SKIPPED, run passes
- Core UTs passing on 2.13:
https://github.com/ROCm/TheRock/actions/runs/30218037322

(cherry picked from commit 523576b)
Cherry-pick of #3505

Co-authored-by: Dmitry Nikolaev <139769634+dnikolaev-amd@users.noreply.github.com>
(cherry picked from commit ae1ef9e)
Cherry-pick of #3513

Co-authored-by: Dmitry Nikolaev <139769634+dnikolaev-amd@users.noreply.github.com>
(cherry picked from commit 2396d45)
…d via issue) (pytorch#180927)

[ROCm] skip test_autoheuristic in-code (already disabled via issue)

(cherry picked from commit 366eac9)
(cherry picked from commit 2a5642e)
…OCM-21749) (#3262)

## Summary

Fixes ROCM-21749: `test_big_num_tensors__foreach_norm` fails on all ROCm
GPUs.

## Root Cause

`ForeachFuncWrapper.__call__` profiles a `_foreach_norm` call and checks
for `multi_tensor_apply_kernel` in profiler output to verify the
multi-tensor fast-path was taken. On CUDA, Kineto captures demangled
kernel names like `multi_tensor_apply_kernel[...]`. On ROCm,
ROCTracer/rocprofiler captures different symbols (`hipLaunchKernel`,
`vectorized_elementwise_kernel`, etc.), so `mta_called` is always
`False` and the assertion fails.

## Fix

Add `or TEST_WITH_ROCM` to `skip_profiler_check` so the profiler-based
assertion is bypassed on ROCm, consistent with the existing skip for
CUDA 12.6/12.8 flakiness.

## Test Plan

- `test_big_num_tensors__foreach_norm_*` should now pass on ROCm GPUs
(MI210, MI300X, MI350X)
- No change in behavior on CUDA

Jira: https://amd-hub.atlassian.net/browse/ROCM-21749

Co-authored-by: Subramanian <ssubrama1@amd.com>
(cherry picked from commit f8efdb3)
(cherry picked from commit e143818)
…behavior change

Cherry-pick of #3394

Co-authored-by: zjliu-amd <zhuojin.liu@amd.com>
(cherry picked from commit 618bbf8)
(cherry picked from commit 16fa274)
Cherry-pick of #3521

Co-authored-by: Dmitry Nikolaev <139769634+dnikolaev-amd@users.noreply.github.com>
(cherry picked from commit d0fcdf9)
…3545)

Fixes empty HIP_ARCHITECTURE build failure when gfx1250 is the only
provided value to PYTORCH_ROCM_ARCH

(cherry picked from commit bdbef9c)
@pablo-garay

Copy link
Copy Markdown
Author

has a mistake; close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants