Repository navigation
oneMKL: return LAPACK info from potrf!/getrf!/sytrf! through LinearAlgebra.LAPACK - #754
Open
michel2323 wants to merge 1 commit into
Open
michel2323 wants to merge 1 commit into
michel2323 wants to merge 1 commit into
Conversation
…gebra.LAPACK The `LinearAlgebra.LAPACK` overloads returned `A` (potrf!) and `(A, ipiv)` (getrf!, sytrf!) instead of the stdlib shapes `(A, info)` and `(A, ipiv, info)`. `cholesky!` and `lu!` destructure those, so `cholesky(Hermitian(::oneArray))` and `lu(::oneArray)` failed with a scalar-indexing error. `getrf!` also lacked the stdlib's `check` keyword. The support-library shims already return oneMKL's `computation_error` info (-1 for a caught SYCL exception). The wrappers now keep it: internal `_potrf!`/`_getrf!`/`_sytrf!` return it, a SYCL failure throws, and the LAPACK overloads use them. `oneMKL.potrf!`/`getrf!`/`sytrf!` keep their return values. The scratchpads are freed after the call. Tests: LAPACK info, `cholesky` and `lu` on oneArrays, failing pivots. oneMKL 2026.1 on the Data Center GPU Max reports the failing column of potrf relative to its 32-column panel (column 50 comes back as 18, or 1042 for complex types); those cases are `@test_broken`, and the test checks that the factor's diagonal still marks column j.
Member
Author
|
The |
This was referenced Oct 28, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #754 +/- ##
==========================================
- Coverage 86.79% 86.61% -0.19%
==========================================
Files 55 55
Lines 5068 5022 -46
==========================================
- Hits 4399 4350 -49
- Misses 669 672 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LinearAlgebra.LAPACK.potrf!,getrf!andsytrf!ononeArrays returnedA/(A, ipiv)instead of the stdlib shapes(A, info)/(A, ipiv, info).cholesky!andlu!destructure those shapes, so the following failed with a scalar-indexing error:getrf!also lacked the stdlib'scheckkeyword, whichlu!passes.The support-library shims already return oneMKL's
computation_errorinfo, or -1 for a caught SYCL exception. The wrappers now keep it:_potrf!,_getrf!and_sytrf!return the info.LinearAlgebra.LAPACKoverloads call the internal functions and return the stdlib shapes.oneMKL.potrf!,getrf!andsytrf!keep their current return values, so this is not breaking.Tests. The new tests in
test/onemkl.jlcheck LAPACK info,choleskyandluononeArrays, and failing pivots against host LAPACK.oneMKL bug. oneMKL 2026.1 on the Intel Data Center GPU Max reports the failing column of
potrfrelative to its 32-column panel. For example, column 50 comes back as 18 for real types and as 1042 for complex types. Columns 1 to 32 are correct. The shim forwardscomputation_error::info()unchanged, so the wrong value comes from oneMKL. The tests mark these cases@test_brokenand check that the factor's diagonal still marks the true column, as LAPACK'spotf2does.Tested on a Data Center GPU Max 1100 with
oneAPI_Support_jll0.11.0: theonemkltests give 2,747 pass and 60 broken, including the 12 new broken cases.