JuliaGPU / JuliaGPU/GPUArrays.jl
Support for qr factorizations
- Dominant language
- Julia
- Stars
- 450
- Forks
- 104
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 10
Description
Hello,
I am trying to convert the output packed Q output of the QR decomposition of a JLArray back into a JLArray but there is a constructor error being thrown.
```julia
julia> using JLArrays, LinearAlgebra
julia> A = JLArray(randn(8,4))
julia> Q,R = qr(A)
julia> convert(typeof(A), Q)
ERROR: MethodError: no method matching JLArray{Float64, 2}(::LinearAlgebra.QRCompactWYQ{Float64, JLArray{Float64, 2},
JLArray{Float64, 2}})
Closest candidates are:
JLArray{T, N}(::UndefInitializer, ::Tuple{Vararg{Int64, N}}) where {T, N}
@ JLArrays ~/.julia/packages/JLArrays/hD5YX/src/JLArrays.jl:168
JLArray{T, N}(::UndefInitializer, ::Tuple{Vararg{Integer, N}}) where {T, N}
@ JLArrays ~/.julia/packages/JLArrays/hD5YX/src/JLArrays.jl:207
JLArray{T, N}(::UndefInitializer, Integer...) where {T, N}
@ JLArrays ~/.julia/packages/JLArrays/hD5YX/src/JLArrays.jl:209
...
Stacktrace:
[1] convert(::Type{JLArray{Float64, 2}}, Q::LinearAlgebra.QRCompactWYQ{Float64, JLArray{Float64, 2}, JLArray{Float64, 2}})
@ LinearAlgebra ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/LinearAlgebra/src/abstractq.jl:49
[2] top-level scope
@ ~/.julia/dev/testing.jl:187
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with qr(A) followed by convert(typeof(A), Q), then inspect LinearAlgebra/src/abstractq.jl and the JLArray constructors implicated by the stack trace. The work is done when the packed QR Q output can be converted to a JLArray without the reported MethodError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100