Skip to content

[ROCm][release/2.12] Skip profiler check for foreach tests on ROCm (ROCM-21749) - #3262

Merged
pragupta merged 1 commit into
release/2.12from
fix/rocm-21749-skip-profiler-foreach-2.12
May 28, 2026
Merged

pragupta merged 1 commit into
release/2.12from
fix/rocm-21749-skip-profiler-foreach-2.12

Conversation

@srinivamd

Copy link
Copy Markdown

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

…749)

ROCm's profiler (ROCTracer/rocprofiler) uses different kernel naming
than CUDA's Kineto profiler. The multi_tensor_apply_kernel symbol
never appears in ROCm profiler output, causing test_big_num_tensors
to fail with spurious AssertionError on all ROCm GPUs.

Add TEST_WITH_ROCM to the skip_profiler_check guard so the profiler-
based fast-path assertion is bypassed on ROCm, matching the existing
skip for CUDA 12.6/12.8 flakiness.
@rocm-repo-management-api

rocm-repo-management-api Bot commented May 28, 2026 •

Copy link
Copy Markdown

Jenkins build for 305c71767a71be234bdd2014d09c8b8fe029118f commit finished as FAILURE
Links: Pipeline Overview / Build artifacts / Test Results

@pragupta
pragupta merged commit f8efdb3 into release/2.12 May 28, 2026
4 of 6 checks passed
@pragupta
pragupta deleted the fix/rocm-21749-skip-profiler-foreach-2.12 branch May 28, 2026 15:54
jithunnair-amd pushed a commit that referenced this pull request Jul 31, 2026
…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 <[email protected]>
(cherry picked from commit f8efdb3)
jithunnair-amd pushed a commit that referenced this pull request Jul 31, 2026
…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 <[email protected]>
(cherry picked from commit f8efdb3)
pablo-garay pushed a commit that referenced this pull request Aug 24, 2026
…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 <[email protected]>
(cherry picked from commit f8efdb3)
(cherry picked from commit e143818)
jithunnair-amd pushed a commit that referenced this pull request Aug 25, 2026
…l) (#3594)

## 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](#3503)).

Analyzes the full IFU delta from [PR
#3591](#3591) at `release/2.13`'s
tip (`6596a0d`): **81 commits** in `release/2.13` not in `release/2.14`,
each either dropped (already in 2.14, or 2.13-only) or cherry-picked
here.

## Method

Same rules as the [release/2.13 cherry-pick
process](https://amd.atlassian.net/wiki/spaces/MLSE/pages/1819593560):

- **Drop ? already in 2.14**: patch-id equivalence (`git cherry`),
upstream PR already present, or content already relocated/absorbed into
2.14 (verified during cherry-pick).
- **Drop ? 2.13-only**: version bump, `related_commits`,
dependency/requirements pins, release-line CD/build changes.
- **Carry-forward**: ROCm-specific fixes not present in 2.14 in any
form.

## Commits carried forward (13)

| 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 + took
`@skipIfRocm`; kept 2.14's `test_allocator_backend` (already fixes
LD_LIBRARY_PATH via `subprocess_env()`) |
| skip test_hip_device_count (rocprofiler-sdk) | clean |
| skip flaky test_Embedding_discontiguous_cuda | 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 |
| Fix hipify skipping sources under Windows subst drives (ROCM-29365)
(#3561) | clean |
| Fixed gfx1250_preferred_backend test (#3546) | clean |
| [ROCm] Optimize AMD normalization backward kernel (pytorch#189405) | clean |
| [release/2.13] Build rocSHMEM for the requested gfx target (#3582) |
clean |
| fix PicklingError handling for Python 3.14 | clean |

## Removed from this PR (per team)

- [RELEASE_ONLY] skip test_autoheuristic in-code (pytorch#180927) ? not needed
on 2.14. Upstream
[pytorch#180927](pytorch#180927)
is `RELEASE_ONLY`, merged to upstream `release/2.12` only (never on
`main` or upstream `release/2.14`).

## Reviewed and excluded (team decision: not needed for 2.14)

| Commit | Reason |
|--------|--------|
| Update composable_kernel submodule with gfx1033 support (#3499) |
2.14's CK pin already includes gfx1033; carrying would move the
submodule pointer **backward**. |
| Revert "Skip cudagraphs for kernel-free inductor graphs" (pytorch#187347) |
2.14 already has the fixed upstream **re-land** on top of the revert;
carrying = regressing 2.14. |
| Revert "[Reland] Port index_add fast path" (pytorch#188196) | 2.14 already
has the newer **re-land (pytorch#189506)** on top of the revert; carrying =
regressing 2.14. |

## Dropped as already in 2.14 (verified during cherry-pick)

- rocm-smi deprecation (#3434) ? 2.14 already has zero `rocm_smi` refs.
- Enable linalg via hipSOLVER, remove Magma (#3455) ? all 6 upstream PRs
already in 2.14.
- Stabilize ROCm 7.14 testing (#3525) ? 2.14 already carries the guards
+ skip messages.
- Add gfx1250 support in GroupedBlas (#3532) ? already in 2.14 via
upstream pytorch#190703 (`ScaledBlasDeviceUtils`).
- Fix uninitialized embedding indices `test_embedding_meta_indices`
(pytorch#188002) ? upstream already in 2.14.
- Unskip ROCSHMEM triton UTs on rocm 7.14 (#3578) ? targets a 2.13-only
7.14 module skip that 2.14 never had; tests already run on 2.14.

Remaining commits drop as 2.13-only (version/pins/related_commits/CD) or
as already-in-2.14 by patch-id/upstream.

## Test plan

- [x] TheRock full-stack dev build (torch + torchaudio + torchvision +
triton) on gfx94X-dcgpu for Python 3.10-3.14, all **Build** jobs green
(ROCm `10.1.0a20260822`, on the `aws-linux-scale-rocm-prod` pool), after
bringing the branch up to its base so `related_commits` resolves
torchaudio/torchvision:
  - py3.10  https://github.com/ROCm/TheRock/actions/runs/32863299013
  - py3.11  https://github.com/ROCm/TheRock/actions/runs/32863305363
  - py3.12  https://github.com/ROCm/TheRock/actions/runs/32863311391
  - py3.13  https://github.com/ROCm/TheRock/actions/runs/32863318109
  - py3.14  https://github.com/ROCm/TheRock/actions/runs/32863325370
- [x] TheRock CI wheel build on gfx94X-dcgpu for Python 3.10-3.14 all
green (ROCm `10.1.0a20260822`, torch-only, on the
`aws-linux-scale-rocm-prod` pool, ~1h40m each):
  - py3.10  https://github.com/ROCm/TheRock/actions/runs/32818564344
  - py3.11  https://github.com/ROCm/TheRock/actions/runs/32818568751
  - py3.12  https://github.com/ROCm/TheRock/actions/runs/32818572249
  - py3.13  https://github.com/ROCm/TheRock/actions/runs/32818576288
  - py3.14  https://github.com/ROCm/TheRock/actions/runs/32818580229



## Processed Commits List
Spreasheet with each commit evaluated for cherry-pick & resolution
(drop/include) with reasoning:


[pr3594-commit-outcomes.xlsx](https://github.com/user-attachments/files/31390971/pr3594-commit-outcomes.xlsx)

---------

Signed-off-by: pablo-garay <[email protected]>
Co-authored-by: Iurii Paikov <[email protected]>
Co-authored-by: Chinmay Dattanand Kuchinad <[email protected]>
Co-authored-by: rocm-repo-management-api-6[bot] <212817015+rocm-repo-management-api-6[bot]@users.noreply.github.com>
Co-authored-by: Dmitry Nikolaev <[email protected]>
Co-authored-by: srinivamd <[email protected]>
Co-authored-by: Subramanian <[email protected]>
Co-authored-by: zjliu-amd <[email protected]>
Co-authored-by: Andres Lugo <[email protected]>
Co-authored-by: pablo-garay <[email protected]>
Co-authored-by: Bo Li <[email protected]>
Co-authored-by: Anatoliy Litvinenko <[email protected]>
Co-authored-by: Jeff Daily <[email protected]>
Co-authored-by: Luca Bruni <[email protected]>
Co-authored-by: albmalamd <[email protected]>
jithunnair-amd pushed a commit that referenced this pull request Aug 25, 2026
…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 <[email protected]>
(cherry picked from commit f8efdb3)
(cherry picked from commit e143818)
jithunnair-amd pushed a commit that referenced this pull request Aug 27, 2026
…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 <[email protected]>
(cherry picked from commit f8efdb3)
(cherry picked from commit e143818)
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.

2 participants