Repository navigation
[ROCm] Enabled test_linalg tests that were skipped due to skipCUDAIfNoMagmaAndNoCusolver - #180303
akashveramd wants to merge 5 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/180303
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 7 Unrelated FailuresAs of commit 04cad3d with merge base f0780d0 ( NEW FAILURES - The following jobs have failed:
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. |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
@pytorchbot rebase -b main |
|
@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here |
|
Successfully rebased |
f09ead5 to
bfddc37
Compare
|
@pytorchbot run ciflow/rocm-mi200 |
|
❌ 🤖 pytorchbot command failed: Try |
|
@pytorchbot label ciflow/rocm-mi200 |
|
@pytorchbot label ciflow/rocm-mi300 |
|
Didn't find following labels among repository labels: ciflow/rocm-mi350 |
|
@pytorchbot label ciflow/rocm-mi355 |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
…ndNoCusolver decorator.
…DAIfNoMagmaAndNoLinalgsolver decorator.
|
Successfully rebased |
c25dce2 to
04cad3d
Compare
|
@pytorchbot merge -f "unrelated failures; all cuda and lint passing" |
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 |
…oMagmaAndNoCusolver (pytorch#180303) In this PR, we have enabled test_linalg tests that were skipped due to skipCUDAIfNoMagmaAndNoCusolver decorator on environments without Magma. It currently uses hipsolver via skipCUDAIfNoMagmaAndNoLinalgsolver decorator. These linalg tests are now passing for ROCm- **test_matrix_norm test_inverse test_inv_ex_info_device test_inv_ex_singular test_inverse_many_batches test_inverse_errors test_inv_errors_and_warnings test_solve_batched_broadcasting test_matrix_power_non_negative** Pull Request resolved: pytorch#180303 Approved by: https://github.com/jeffdaily
…oMagmaAndNoCusolver (pytorch#180303) In this PR, we have enabled test_linalg tests that were skipped due to skipCUDAIfNoMagmaAndNoCusolver decorator on environments without Magma. It currently uses hipsolver via skipCUDAIfNoMagmaAndNoLinalgsolver decorator. These linalg tests are now passing for ROCm- **test_matrix_norm test_inverse test_inv_ex_info_device test_inv_ex_singular test_inverse_many_batches test_inverse_errors test_inv_errors_and_warnings test_solve_batched_broadcasting test_matrix_power_non_negative** Pull Request resolved: pytorch#180303 Approved by: https://github.com/jeffdaily
…oMagmaAndNoCusolver (pytorch#180303) In this PR, we have enabled test_linalg tests that were skipped due to skipCUDAIfNoMagmaAndNoCusolver decorator on environments without Magma. It currently uses hipsolver via skipCUDAIfNoMagmaAndNoLinalgsolver decorator. These linalg tests are now passing for ROCm- **test_matrix_norm test_inverse test_inv_ex_info_device test_inv_ex_singular test_inverse_many_batches test_inverse_errors test_inv_errors_and_warnings test_solve_batched_broadcasting test_matrix_power_non_negative** Pull Request resolved: pytorch#180303 Approved by: https://github.com/jeffdaily
…gmaAndNoCusolver) Raw cherry-pick of upstream commit 868bcb1. Conflicts in test/test_linalg.py left unresolved (conflict markers present). Co-authored-by: Cursor <[email protected]>
…DAIfNoMagmaAndNoCusolver) Two conflicts in test/test_linalg.py resolved: 1. Import line (line ~35): Added 'skipCUDAIf' import and replaced 'skipCUDAIfNoMagmaAndNoCusolver' with 'skipCUDAIfNoMagmaAndNoLinalgsolver' (the new unified decorator introduced by this PR). 2. test_eigh decorator + new test (line ~1054): Accepted both changes from the PR — inserted new test_det_backward function and replaced '@skipCUDAIfNoMagma' with '@skipCUDAIfNoMagmaAndNoLinalgsolver' on test_eigh. Co-authored-by: Cursor <[email protected]>
…gmaAndNoCusolver) Co-authored-by: Cursor <[email protected]>
…DAIfNoMagmaAndNoCusolver) Kept both skipCUDAIfNoMagmaAndNoCusolver and skipCUDAIfNoMagmaAndNoLinalgsolver in imports (2.11 still has tests using the former). Added skipCUDAIf import. Dropped test_det_backward (requires C++ changes from two unrelated PRs pytorch#171225/pytorch#177498). All 22 decorator swaps from the upstream PR applied as-is. Co-authored-by: Cursor <[email protected]>
…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]>
…oMagmaAndNoCusolver (pytorch#180303) In this PR, we have enabled test_linalg tests that were skipped due to skipCUDAIfNoMagmaAndNoCusolver decorator on environments without Magma. It currently uses hipsolver via skipCUDAIfNoMagmaAndNoLinalgsolver decorator. These linalg tests are now passing for ROCm- **test_matrix_norm test_inverse test_inv_ex_info_device test_inv_ex_singular test_inverse_many_batches test_inverse_errors test_inv_errors_and_warnings test_solve_batched_broadcasting test_matrix_power_non_negative** Pull Request resolved: pytorch#180303 Approved by: https://github.com/jeffdaily
In this PR, we have enabled test_linalg tests that were skipped due to skipCUDAIfNoMagmaAndNoCusolver decorator on environments without Magma. It currently uses hipsolver via skipCUDAIfNoMagmaAndNoLinalgsolver decorator.
These linalg tests are now passing for ROCm-
test_det
test_eigh
test_norm_matrix
test_cond
test_cond_errors_and_warnings
test_norm_complex
test_matrix_norm
test_norm_extreme_values
test_norm_vector_degenerate_shapes
test_norm_matrix_degenerate_shapes_old_numpy
test_norm_old
test_norm_complex_old
test_nuclear_norm_axes_small_brute_force_old
test_nuclear_norm_exceptions_old
test_inverse
test_inv_ex_info_device
test_inv_ex_singular
test_inverse_many_batches
test_inverse_errors
test_inverse_errors_large
test_pinv
test_pinv_errors_and_warnings
test_inv_errors_and_warnings
test_solve
test_solve_batched_broadcasting
test_tensorsolve
test_tensorsolve_empty
test_tensorsolve_errors_and_warnings
test_tensorinv
test_tensorinv_empty
test_tensorinv_errors_and_warnings
test_tensorinv_singular_input
test_matrix_rank
test_matrix_rank_atol
test_matrix_rank_atol_rtol
test_matrix_rank_empty
test_matrix_rank_out_errors_and_warnings
test_matrix_rank_basic
test_lu_unpack_check_input
test_lobpcg_basic
test_pinverse
test_matrix_power_non_negative
test_matrix_power_negative
test_linalg_matrix_exp_utils
test_linalg_matrix_exp_boundary_cases
test_matrix_exp_backward_input_validation
test_linalg_matrix_exp_perverse_nan_values
test_linalg_matrix_exp_analytic
test_linalg_matrix_exp_batch
test_linalg_matrix_exp_compare_with_taylor
test_slogdet
test_slogdet_errors_and_warnings
test_nuclear_norm_out
test_lapack_empty
test_ldl_factor
test_ldl_solve
With the added changes the linalg tests are now passing for ROCm and it can be confirmed from the attached log
test_linalg_1.1_c58bd1f97bfa93ee_.log
cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang