Skip to content

Commit 6325312

Browse files
authored
Woraround for brittle SVD on AMD GPUs (#1173)
1 parent 4ffb348 commit 6325312

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/DFTKAMDGPUExt.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ function LinearAlgebra.cholesky(A::Hermitian{T, <:AMDGPU.ROCArray}) where {T}
1313
LinearAlgebra.Cholesky(Acopy, A.uplo, info)
1414
end
1515

16+
# Temporary workaround for SVD. See https://github.com/JuliaGPU/AMDGPU.jl/issues/837
17+
function LinearAlgebra.LAPACK.gesdd!(jobz::Char, A::AMDGPU.ROCArray{T}) where {T}
18+
AMDGPU.rocSOLVER.gesvd!(jobz, jobz, A)
19+
end
20+
1621
# Ensure precompilation is only performed if an AMD GPU is available
1722
if AMDGPU.functional()
1823
# Precompilation block with a basic workflow

0 commit comments

Comments
 (0)