@@ -114,6 +114,7 @@ CuArray{T}(Q::AbstractQ) where {T} = CuMatrix{T}(Q)
114
114
CuMatrix (Q:: AbstractQ{T} ) where {T} = CuMatrix {T} (Q)
115
115
CuMatrix {T} (Q:: QRPackedQ{S} ) where {T,S} =
116
116
CuMatrix {T} (lmul! (Q, CuMatrix {S} (I, size (Q, 1 ), min (size (Q. factors)... ))))
117
+ CuMatrix {T, B} (Q:: QRPackedQ{S} ) where {T, B, S} = CuMatrix {T} (Q)
117
118
CuMatrix {T} (Q:: QRCompactWYQ ) where {T} = error (" QRCompactWY format is not supported" )
118
119
# avoid the CPU array in the above mul!
119
120
Matrix {T} (Q:: QRPackedQ{S,<:CuArray,<:CuArray} ) where {T,S} = Array (CuMatrix {T} (Q))
@@ -161,7 +162,8 @@ CuQRPackedQ(factors::AbstractMatrix{T}, τ::CuVector{T}) where {T} =
161
162
# AbstractQ's `size` is the size of the full matrix,
162
163
# while `Matrix(Q)` only gives the compact Q.
163
164
# See JuliaLang/julia#26591 and JuliaGPU/CUDA.jl#969.
164
- CuMatrix {T} (Q:: AbstractQ{S} ) where {T,S} = convert (CuArray, Matrix {T} (Q))
165
+ CuMatrix {T} (Q:: AbstractQ{S} ) where {T,S} = convert (CuArray{T}, Matrix (Q))
166
+ CuMatrix {T, B} (Q:: AbstractQ{S} ) where {T, B, S} = CuMatrix {T} (Q)
165
167
CuMatrix (Q:: AbstractQ{T} ) where {T} = CuMatrix {T} (Q)
166
168
CuArray {T} (Q:: AbstractQ ) where {T} = CuMatrix {T} (Q)
167
169
CuArray (Q:: AbstractQ ) = CuMatrix (Q)
0 commit comments