Skip to content

[ROCm] Merge test_norm_matrix_degenerate_shapes_old_numpy & test_norm_matrix_degenerate_shapes to run for older & newer Numpy versions - #187011

Closed
akashveramd wants to merge 3 commits into
pytorch:mainfrom
akashveramd:av_merge_test_norm_matrix_degenerate_shapes
Closed

akashveramd wants to merge 3 commits into
pytorch:mainfrom
akashveramd:av_merge_test_norm_matrix_degenerate_shapes

Conversation

@akashveramd

@akashveramd akashveramd commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

This PR merged test_norm_matrix_degenerate_shapes_old_numpy & test_norm_matrix_degenerate_shapes linalg tests so that it can run for both older & newer Numpy versions.

Tested locally with rocm-nightly docker image ghcr.io/pytorch/ci-image:pytorch-linux-noble-rocm-nightly-py3. The test passed for Numpy versions 1.26.2 (older) & 2.3.0 (newer).

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang

@pytorch-bot

pytorch-bot Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⚠️ 1 Awaiting Approval, 37 Pending, 4 Unrelated Failures

As of commit 99cb7e8 with merge base 332fabd (image):

AWAITING APPROVAL - The following workflow needs approval before CI can run:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

UNSTABLE - The following jobs are marked as unstable, possibly due to flakiness on trunk:

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

@pytorch-bot pytorch-bot Bot added module: rocm AMD GPU support for Pytorch topic: not user facing topic category labels Jun 11, 2026
@akashveramd akashveramd changed the title [ROCm] Merge test_norm_matrix_degenerate_shapes_old_numpy & test_norm_matrix_degenerate_shapes for old & new Numpy versions [ROCm] Merge test_norm_matrix_degenerate_shapes_old_numpy & test_norm_matrix_degenerate_shapes to run for old & new Numpy versions Jun 11, 2026
@akashveramd akashveramd changed the title [ROCm] Merge test_norm_matrix_degenerate_shapes_old_numpy & test_norm_matrix_degenerate_shapes to run for old & new Numpy versions [ROCm] Merge test_norm_matrix_degenerate_shapes_old_numpy & test_norm_matrix_degenerate_shapes to run for older & newer Numpy versions Jun 11, 2026
@jithunnair-amd jithunnair-amd added ci-no-td Do not run TD on this PR 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 open source ciflow/rocm-mi200 Trigger "default" config CI on ROCm MI200 ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 labels Jun 11, 2026
@akashveramd
akashveramd force-pushed the av_merge_test_norm_matrix_degenerate_shapes branch from e78342a to 52194e5 Compare June 11, 2026 21:07
@pytorch-bot

pytorch-bot Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

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

…rm_matrix_degenerate_shapes test that runs for old & new numpy versions.
@akashveramd
akashveramd force-pushed the av_merge_test_norm_matrix_degenerate_shapes branch from 52194e5 to b33c194 Compare June 29, 2026 18:27

@jithunnair-amd jithunnair-amd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, but please resolve lint errors

@jithunnair-amd
jithunnair-amd requested a review from jeffdaily July 1, 2026 01:30

@jeffdaily jeffdaily left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

approved, fix lint errors

@akashveramd

Copy link
Copy Markdown
Contributor Author

@jeffdaily: Lint is fixed now.

@jithunnair-amd
jithunnair-amd marked this pull request as ready for review July 1, 2026 12:35
@jithunnair-amd

Copy link
Copy Markdown
Collaborator

@pytorchbot merge -f "Relevant tests passed. Unrelated failures. Lint clean"

@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

vishalgoyal316 pushed a commit to vishalgoyal316/pytorch that referenced this pull request Jul 16, 2026
…_matrix_degenerate_shapes to run for older & newer Numpy versions (pytorch#187011)

This PR merged test_norm_matrix_degenerate_shapes_old_numpy & test_norm_matrix_degenerate_shapes linalg tests so that it can run for both older & newer Numpy versions.

Tested locally with rocm-nightly docker image ghcr.io/pytorch/ci-image:pytorch-linux-noble-rocm-nightly-py3. The test passed for Numpy versions 1.26.2 (older) & 2.3.0 (newer).

Pull Request resolved: pytorch#187011
Approved by: https://github.com/jithunnair-amd, https://github.com/jeffdaily
DamJanusz pushed a commit to DamJanusz/pytorch that referenced this pull request Jul 21, 2026
…_matrix_degenerate_shapes to run for older & newer Numpy versions (pytorch#187011)

This PR merged test_norm_matrix_degenerate_shapes_old_numpy & test_norm_matrix_degenerate_shapes linalg tests so that it can run for both older & newer Numpy versions.

Tested locally with rocm-nightly docker image ghcr.io/pytorch/ci-image:pytorch-linux-noble-rocm-nightly-py3. The test passed for Numpy versions 1.26.2 (older) & 2.3.0 (newer).

Pull Request resolved: pytorch#187011
Approved by: https://github.com/jithunnair-amd, https://github.com/jeffdaily
akashveramd added a commit to akashveramd/pytorch that referenced this pull request Jul 21, 2026
…hapes for older & newer NumPy

Raw cherry-pick of upstream commit c5bf344.
Conflicts in test/test_linalg.py left unresolved (conflict markers present).

Co-authored-by: Cursor <[email protected]>
akashveramd pushed a commit to akashveramd/pytorch that referenced this pull request Jul 21, 2026
…nerate_shapes for older & newer NumPy

One conflict in test/test_linalg.py resolved:

Import line (line ~34): PR removes 'skipIf' and 'skipCUDAIfNoMagma' from import
(in upstream context these were already handled by prior PRs). In release/2.11,
'skipCUDAIfNoMagma' is still used at 10+ test sites, so it must be kept.
'skipIf' from common_device_type is unused (only unittest.skipIf is used), so
it is safely dropped per the PR.

Resolution: kept skipCUDAIfNoMagma, removed skipIf.
Co-authored-by: Cursor <[email protected]>
akashveramd added a commit to akashveramd/pytorch that referenced this pull request Jul 21, 2026
…_matrix_degenerate_shapes to run for older & newer Numpy versions (pytorch#187011)

This PR merged test_norm_matrix_degenerate_shapes_old_numpy & test_norm_matrix_degenerate_shapes linalg tests so that it can run for both older & newer Numpy versions.

Tested locally with rocm-nightly docker image ghcr.io/pytorch/ci-image:pytorch-linux-noble-rocm-nightly-py3. The test passed for Numpy versions 1.26.2 (older) & 2.3.0 (newer).

Pull Request resolved: pytorch#187011
Approved by: https://github.com/jithunnair-amd, https://github.com/jeffdaily
jithunnair-amd pushed a commit to ROCm/pytorch that referenced this pull request Jul 27, 2026
…ma dependency (#3455)

## Summary

Backports 6 upstream PyTorch PRs to `release/2.13` that enable ROCm
linear algebra tests and remove the Magma dependency by routing through
hipSOLVER (ROCm >= 7.14):

- **pytorch#180303** – Replace `skipCUDAIfNoMagmaAndNoCusolver` with
`skipCUDAIfNoMagmaAndNoLinalgsolver` across linalg tests and OpInfo
definitions, enabling tests on ROCm via hipSOLVER
- **pytorch#187703** – Re-enable `test_preferred_linalg_library` test for ROCm
- **pytorch#185557** – Enable `linalg.eig` / `ldl_solve` via hipSOLVER `xgeev`
(ROCm >= 7.14); enable `test_linalg_solve` and `test_triangular_solve`
via cuBLAS path
- **pytorch#187011** – Merge `test_norm_matrix_degenerate_shapes` variants into
a single test that handles both old and new NumPy behavior
- **pytorch#186122** – Enable `test_inverse_errors_large` and
`test_lu_solve_batched_many_batches` linalg tests on ROCm
- **pytorch#188720** – Enable `cholesky_ex` via hipSOLVER and remove Magma
dependency for autogenerated linalg tests

## Key C++ changes
- `BatchLinearAlgebraLib.cpp/h`, `CUDASolver.cpp/h`: extend `xgeev`,
`xpotrs`, `ldl_solve` and related 64-bit solver paths to compile and run
on ROCm >= 7.14 (`USE_ROCM && ROCM_VERSION >= 71400`)
- `BatchLinearAlgebra.cpp`: route `linalg_eig_kernel` through hipSOLVER
`xgeev` on ROCm >= 7.14 instead of Magma
- `cuda_to_hip_mappings.py`: add hipify mappings for `cusolverDnXgeev`,
`cusolverDnCreateParams`/`DestroyParams`, and related symbols

## Test changes
- Replace `@skipCUDAIfNoMagma` / `@skipCUDAIfNoMagmaAndNoCusolver` with
`@skipCUDAIfNoMagmaAndNoLinalgsolver` across `test_linalg.py`,
`common_methods_invocations.py`, and `opinfo/definitions/linalg.py`
- Remove ROCm-specific `skipIf` skips for
`test_linalg_eig_stride_consistency` in inductor tests
- Add ROCm version guard (`ROCM_VERSION < (7, 14)`) for `linalg.eig` /
`linalg.eigvals` OpInfos on older ROCm without hipSOLVER `xgeev` support

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

Co-authored-by: Akash Verma <[email protected]>
Co-authored-by: Cursor <[email protected]>
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…_matrix_degenerate_shapes to run for older & newer Numpy versions (pytorch#187011)

This PR merged test_norm_matrix_degenerate_shapes_old_numpy & test_norm_matrix_degenerate_shapes linalg tests so that it can run for both older & newer Numpy versions.

Tested locally with rocm-nightly docker image ghcr.io/pytorch/ci-image:pytorch-linux-noble-rocm-nightly-py3. The test passed for Numpy versions 1.26.2 (older) & 2.3.0 (newer).

Pull Request resolved: pytorch#187011
Approved by: https://github.com/jithunnair-amd, https://github.com/jeffdaily
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/rocm-mi200 Trigger "default" config CI on ROCm MI200 ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 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: rocm AMD GPU support for Pytorch open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants