Skip to content
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

CUSOLVER: support eigendecomposition #173

Closed
hayatoikoma opened this issue Mar 27, 2018 · 3 comments
Closed

CUSOLVER: support eigendecomposition #173

hayatoikoma opened this issue Mar 27, 2018 · 3 comments
Assignees
Labels
cuda libraries Stuff about CUDA library wrappers. enhancement New feature or request

Comments

@hayatoikoma
Copy link

I am currently trying to perform an eigendecomposition on GPU.
Is there any plan for CuArrays.jl to support it from CUSOLVER sometime soon?

@maleadt maleadt changed the title Feature request: Support of eigendecomposition from CUSOLVER CUSOLVER: support eigendecomposition Nov 6, 2018
@kshyatt
Copy link
Contributor

kshyatt commented Nov 12, 2018

With the merge of JuliaGPU/CuArrays.jl#170, we support these for sparse matrices - if you want the new dense solvers, I can try to add those?

@hayatoikoma
Copy link
Author

Thank you for making it available for sparse matrices.

It is no longer required for me, but I guess the dense solver will be useful for somebody else?

@maleadt maleadt transferred this issue from JuliaGPU/CuArrays.jl May 27, 2020
@maleadt maleadt added cuda libraries Stuff about CUDA library wrappers. enhancement New feature or request labels May 27, 2020
@kshyatt kshyatt self-assigned this Jul 10, 2020
@maleadt
Copy link
Member

maleadt commented Apr 27, 2024

These seem implemented:

# eigenvalues
function LinearAlgebra.eigen(A::Symmetric{T,<:CuMatrix}) where {T<:BlasReal}
A2 = copy(A.data)
Eigen(syevd!('V', 'U', A2)...)
end
function LinearAlgebra.eigen(A::Hermitian{T,<:CuMatrix}) where {T<:BlasComplex}
A2 = copy(A.data)
Eigen(heevd!('V', 'U', A2)...)
end
function LinearAlgebra.eigen(A::Hermitian{T,<:CuMatrix}) where {T<:BlasReal}
eigen(Symmetric(A))
end
function LinearAlgebra.eigen(A::CuMatrix{T}) where {T<:BlasReal}
A2 = copy(A)
issymmetric(A) ? Eigen(syevd!('V', 'U', A2)...) : error("GPU eigensolver supports only Hermitian or Symmetric matrices.")
end
function LinearAlgebra.eigen(A::CuMatrix{T}) where {T<:BlasComplex}
A2 = copy(A)
ishermitian(A) ? Eigen(heevd!('V', 'U', A2)...) : error("GPU eigensolver supports only Hermitian or Symmetric matrices.")
end

@maleadt maleadt closed this as completed Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda libraries Stuff about CUDA library wrappers. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants