Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ GenericSchur = "0.5.6"
JET = "0.9, 0.10"
LinearAlgebra = "1"
Mooncake = "0.4.183"
Random = "1"
SafeTestsets = "0.1"
StableRNGs = "1"
Test = "1"
TestExtras = "0.2,0.3"
TestExtras = "0.3.2"
Zygote = "0.7"
julia = "1.10"

Expand All @@ -47,11 +48,12 @@ ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestExtras = "5ed8adda-3752-4e41-b88a-e8b09835ee3a"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[targets]
test = ["Aqua", "JET", "SafeTestsets", "Test", "TestExtras", "ChainRulesCore", "ChainRulesTestUtils", "StableRNGs", "Zygote", "CUDA", "AMDGPU", "GenericLinearAlgebra", "GenericSchur", "Mooncake"]
test = ["Aqua", "JET", "SafeTestsets", "Test", "TestExtras", "ChainRulesCore", "ChainRulesTestUtils", "Random", "StableRNGs", "Zygote", "CUDA", "AMDGPU", "GenericLinearAlgebra", "GenericSchur", "Mooncake"]
4 changes: 2 additions & 2 deletions ext/MatrixAlgebraKitGenericLinearAlgebraExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function MatrixAlgebraKit.eigh_vals!(A::AbstractMatrix, D, ::GLA_QRIteration)
return eigvals!(Hermitian(A); sortby = real)
end

function MatrixAlgebraKit.default_qr_algorithm(::Type{T}; kwargs...) where {T <: StridedMatrix{<:Union{BigFloat, Complex{BigFloat}}}}
function MatrixAlgebraKit.default_qr_algorithm(::Type{T}; kwargs...) where {T <: StridedMatrix{<:Union{Float16, ComplexF16, BigFloat, Complex{BigFloat}}}}
return GLA_HouseholderQR(; kwargs...)
end

Expand Down Expand Up @@ -109,7 +109,7 @@ function _gla_householder_qr!(A::AbstractMatrix, Q, R; positive = false, blocksi
return Q, R
end

function MatrixAlgebraKit.default_lq_algorithm(::Type{T}; kwargs...) where {T <: StridedMatrix{<:Union{BigFloat, Complex{BigFloat}}}}
function MatrixAlgebraKit.default_lq_algorithm(::Type{T}; kwargs...) where {T <: StridedMatrix{<:Union{Float16, ComplexF16, BigFloat, Complex{BigFloat}}}}
return MatrixAlgebraKit.LQViaTransposedQR(GLA_HouseholderQR(; kwargs...))
end

Expand Down
4 changes: 2 additions & 2 deletions src/implementations/lq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ function _lapack_lq!(
computeL = length(L) > 0
inplaceQ = Q === A

if pivoted
throw(ArgumentError("LAPACK does not provide an implementation for a pivoted LQ decomposition"))
if pivoted && (blocksize > 1)
throw(ArgumentError("LAPACK does not provide a blocked implementation for a pivoted LQ decomposition"))
end
if inplaceQ && (computeL || positive || blocksize > 1 || n < m)
throw(ArgumentError("inplace Q only supported if matrix is wide (`m <= n`), L is not required, and using the unblocked algorithm (`blocksize=1`) with `positive=false`"))
Expand Down
8 changes: 6 additions & 2 deletions src/implementations/qr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,12 @@ function _gpu_unmqr!(
end

function _gpu_qr!(
A::AbstractMatrix, Q::AbstractMatrix, R::AbstractMatrix; positive = false, blocksize = 1
A::AbstractMatrix, Q::AbstractMatrix, R::AbstractMatrix; positive = false, blocksize = 1, pivoted = false
)
blocksize > 1 &&
throw(ArgumentError("CUSOLVER/ROCSOLVER does not provide a blocked implementation for a QR decomposition"))
pivoted &&
throw(ArgumentError("CUSOLVER/ROCSOLVER does not provide a pivoted implementation for a QR decomposition"))
m, n = size(A)
minmn = min(m, n)
computeR = length(R) > 0
Expand Down Expand Up @@ -309,10 +311,12 @@ function _gpu_qr!(
end

function _gpu_qr_null!(
A::AbstractMatrix, N::AbstractMatrix; positive = false, blocksize = 1
A::AbstractMatrix, N::AbstractMatrix; positive = false, blocksize = 1, pivoted = false
)
blocksize > 1 &&
throw(ArgumentError("CUSOLVER/ROCSOLVER does not provide a blocked implementation for a QR decomposition"))
pivoted &&
throw(ArgumentError("CUSOLVER/ROCSOLVER does not provide a pivoted implementation for a QR decomposition"))
m, n = size(A)
minmn = min(m, n)
fill!(N, zero(eltype(N)))
Expand Down
163 changes: 0 additions & 163 deletions test/amd/lq.jl

This file was deleted.

Loading