Repository navigation
[ROCm] Merge test_norm_matrix_degenerate_shapes_old_numpy & test_norm_matrix_degenerate_shapes to run for older & newer Numpy versions - #187011
Conversation
e78342a to
52194e5
Compare
|
|
…rm_matrix_degenerate_shapes test that runs for old & new numpy versions.
52194e5 to
b33c194
Compare
jithunnair-amd
left a comment
There was a problem hiding this comment.
LGTM, but please resolve lint errors
jeffdaily
left a comment
There was a problem hiding this comment.
approved, fix lint errors
|
@jeffdaily: Lint is fixed now. |
|
@pytorchbot merge -f "Relevant tests passed. Unrelated failures. Lint clean" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…_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
…_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
…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]>
…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]>
…_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
…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]>
…_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
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