We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getrf!
getrs!
Test case:
using LinearSolve, LinearAlgebra # using MKL_jll n = 100 A = rand(n, n) b1 = rand(n); b2 = rand(n); function f(A, b1, b2; alg = LUFactorization()) prob = LinearProblem(A, b1) linsolve = init(prob, alg) sol1 = solve!(linsolve) s1 = copy(sol1.u) linsolve.b = b2 sol2 = solve!(linsolve) s2 = copy(sol2.u) norm(s1 + s2) end f(A, b1, b2) # Uses BLAS f(A, b1, b2; alg=RFLUFactorization()) # Uses loops f(A, b1, b2; alg=MKLLUFactorization()) # Requires `using MKL_jll` using Enzyme dA = zero(A) db1 = zero(b1) db2 = zero(b2) Enzyme.autodiff(Reverse, f, Duplicated(A,dA), Duplicated(b1, db1), Duplicated(b2, db2))
The LUFactorization() version uses OpenBLAS, the RFLUFactorization() version uses a pure Julia implementation https://github.com/JuliaLinearAlgebra/RecursiveFactorization.jl/blob/master/src/lu.jl (no BLAS), and MKLLUFactorization swaps to an alternative BLAS with wrappers fully written here: https://github.com/SciML/LinearSolve.jl/blob/main/ext/LinearSolveMKLExt.jl. I assume RFLUFactorization will just work, it's just scalar mutating code, but LUFactorization makes sure base Julia is working and the MKL one is a good test that it's at the right level of libblastrampoline
LUFactorization()
RFLUFactorization()
MKLLUFactorization
RFLUFactorization
The text was updated successfully, but these errors were encountered:
Closing, as the LinearSolve package used above should be fine now
Sorry, something went wrong.
No branches or pull requests
Test case:
The
LUFactorization()
version uses OpenBLAS, theRFLUFactorization()
version uses a pure Julia implementation https://github.com/JuliaLinearAlgebra/RecursiveFactorization.jl/blob/master/src/lu.jl (no BLAS), andMKLLUFactorization
swaps to an alternative BLAS with wrappers fully written here: https://github.com/SciML/LinearSolve.jl/blob/main/ext/LinearSolveMKLExt.jl. I assumeRFLUFactorization
will just work, it's just scalar mutating code, but LUFactorization makes sure base Julia is working and the MKL one is a good test that it's at the right level of libblastrampolineThe text was updated successfully, but these errors were encountered: