-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
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
Matrix inversion for CuArray #116
Comments
A related issue is const CuOrAdj = Union{CuArray, LinearAlgebra.Adjoint{T, CuArray{T, 2}}} where {T<:AbstractFloat}
function Base.:\(_A::AT1, _B::AT2) where {AT1<:CuOrAdj, AT2<:CuOrAdj}
A, B = copy(_A), copy(_B)
A, ipiv = CuArrays.CUSOLVER.getrf!(A)
return CuArrays.CUSOLVER.getrs!('N', A, ipiv, B)
end PS: this is related because some matrix inversion could be replaced by |
Perhaps we should start with a patch that adds |
On it. |
I need |
inv
is not defined forCuArray
I attempted to use a wrap over
CuArrays.CUBLAS.matinv_batched
, i.e.Base.inv(x::CuArray{<:Real,2}) = CuArrays.CUBLAS.matinv_batched([x])[2][1]
. But this only supports matrix smaller than 32x32.Any idea how to support it formally?
The text was updated successfully, but these errors were encountered: