You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ext/MatrixAlgebraKitAMDGPUExt/MatrixAlgebraKitAMDGPUExt.jl
+118Lines changed: 118 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,31 @@ end
24
24
function MatrixAlgebraKit.default_svd_algorithm(::Type{T}; kwargs...) where {T<:StridedROCMatrix}
25
25
returnROCSOLVER_QRIteration(; kwargs...)
26
26
end
27
+
function MatrixAlgebraKit.default_eig_algorithm(::Type{T}; kwargs...) where {T<:StridedROCMatrix}
28
+
throw(ErrorException("AMDGPU has no support for general eigensolving"))
29
+
end
27
30
function MatrixAlgebraKit.default_eigh_algorithm(::Type{T}; kwargs...) where {T <:StridedROCMatrix}
28
31
returnROCSOLVER_DivideAndConquer(; kwargs...)
29
32
end
30
33
34
+
# include for block sector support
35
+
function MatrixAlgebraKit.default_qr_algorithm(::Type{Base.ReshapedArray{T,2,SubArray{T,1,A,Tuple{UnitRange{Int}},true},Tuple{}}}; kwargs...) where {T<:BlasFloat, A<:ROCVecOrMat{T}}
36
+
returnROCSOLVER_HouseholderQR(; kwargs...)
37
+
end
38
+
function MatrixAlgebraKit.default_lq_algorithm(::Type{Base.ReshapedArray{T,2,SubArray{T,1,A,Tuple{UnitRange{Int}},true},Tuple{}}}; kwargs...) where {T<:BlasFloat, A<:ROCVecOrMat{T}}
39
+
qr_alg =ROCSOLVER_HouseholderQR(; kwargs...)
40
+
returnLQViaTransposedQR(qr_alg)
41
+
end
42
+
function MatrixAlgebraKit.default_svd_algorithm(::Type{Base.ReshapedArray{T,2,SubArray{T,1,A,Tuple{UnitRange{Int}},true},Tuple{}}}; kwargs...) where {T<:BlasFloat, A<:ROCVecOrMat{T}}
43
+
returnROCSOLVER_Jacobi(; kwargs...)
44
+
end
45
+
function MatrixAlgebraKit.default_eig_algorithm(::Type{Base.ReshapedArray{T,2,SubArray{T,1,A,Tuple{UnitRange{Int}},true},Tuple{}}}; kwargs...) where {T<:BlasFloat, A<:ROCVecOrMat{T}}
46
+
throw(ErrorException("AMDGPU has no support for general eigensolving"))
47
+
end
48
+
function MatrixAlgebraKit.default_eigh_algorithm(::Type{Base.ReshapedArray{T,2,SubArray{T,1,A,Tuple{UnitRange{Int}},true},Tuple{}}}; kwargs...) where {T<:BlasFloat, A<:ROCVecOrMat{T}}
0 commit comments