Skip to content

Commit 545ffa2

Browse files
authored
[CUSOLVER] Fix the dispatch for syevd! end heevd! (#2309)
1 parent 1a57e9f commit 545ffa2

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

lib/cusolver/dense.jl

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,18 +908,33 @@ for elty in (:Float32, :Float64, :ComplexF32, :ComplexF64)
908908
LinearAlgebra.LAPACK.orgqr!(A::StridedCuMatrix{$elty}, tau::CuVector{$elty}) = CUSOLVER.orgqr!(A, tau)
909909
LinearAlgebra.LAPACK.gebrd!(A::StridedCuMatrix{$elty}) = CUSOLVER.gebrd!(A)
910910
LinearAlgebra.LAPACK.gesvd!(jobu::Char, jobvt::Char, A::StridedCuMatrix{$elty}) = CUSOLVER.gesvd!(jobu, jobvt, A)
911-
LinearAlgebra.LAPACK.syev!(jobz::Char, uplo::Char, A::StridedCuMatrix{$elty}) = CUSOLVER.syevd!(jobz, uplo, A)
912911
end
913912
end
914913

915914
for elty in (:Float32, :Float64)
916915
@eval begin
916+
LinearAlgebra.LAPACK.syev!(jobz::Char, uplo::Char, A::StridedCuMatrix{$elty}) = CUSOLVER.syevd!(jobz, uplo, A)
917917
LinearAlgebra.LAPACK.sygvd!(itype::Int, jobz::Char, uplo::Char, A::StridedCuMatrix{$elty}, B::StridedCuMatrix{$elty}) = CUSOLVER.sygvd!(itype, jobz, uplo, A, B)
918918
end
919919
end
920920

921921
for elty in (:ComplexF32, :ComplexF64)
922922
@eval begin
923+
LinearAlgebra.LAPACK.syev!(jobz::Char, uplo::Char, A::StridedCuMatrix{$elty}) = CUSOLVER.heevd!(jobz, uplo, A)
923924
LinearAlgebra.LAPACK.sygvd!(itype::Int, jobz::Char, uplo::Char, A::StridedCuMatrix{$elty}, B::StridedCuMatrix{$elty}) = CUSOLVER.hegvd!(itype, jobz, uplo, A, B)
924925
end
925926
end
927+
928+
if VERSION >= v"1.10"
929+
for elty in (:Float32, :Float64)
930+
@eval begin
931+
LinearAlgebra.LAPACK.syevd!(jobz::Char, uplo::Char, A::StridedCuMatrix{$elty}) = CUSOLVER.syevd!(jobz, uplo, A)
932+
end
933+
end
934+
935+
for elty in (:ComplexF32, :ComplexF64)
936+
@eval begin
937+
LinearAlgebra.LAPACK.syevd!(jobz::Char, uplo::Char, A::StridedCuMatrix{$elty}) = CUSOLVER.heevd!(jobz, uplo, A)
938+
end
939+
end
940+
end

0 commit comments

Comments
 (0)