Fixed reducedim operations for CuQRPackedQ
Applying Base.sum/prod/maximum/minimum to CuQRPackedQ raises ERROR: Scalar indexing is disallowed Casting to CuArray fixes the issue. Also, Base.similar returned a CPU matrix when applied to CuQRPackedQ @DhairyaLGandhi
I understand your motivation, but I don't like the fix :stuck_out_tongue: What's special about sum, or the other reduction operators you've selected? I guess we don't really have another way to make those operations dispatch to the existing implementations (which would also require making CuQRPackedQ device compatible so that it can use the existing sum kernel as is).
Those four reduction operators are all dispatched in a similar manner: https://github.com/JuliaLang/julia/blob/bb2d8630f3aeb99c38c659a35ee9aa57bb71012a/base/reducedim.jl#L885
So I thought to handle them all equally. Feel free to close this if it's not needed.
Codecov Report
Merging #1118 (0e0dc5d) into master (afe8179) will decrease coverage by
0.06%. The diff coverage is0.00%.
@@ Coverage Diff @@
## master #1118 +/- ##
==========================================
- Coverage 79.44% 79.37% -0.07%
==========================================
Files 118 118
Lines 8001 8006 +5
==========================================
- Hits 6356 6355 -1
- Misses 1645 1651 +6
| Impacted Files | Coverage Δ | |
|---|---|---|
| lib/cusolver/linalg.jl | 79.71% <0.00%> (-6.23%) |
:arrow_down: |
| src/pool.jl | 75.52% <0.00%> (-0.43%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update afe8179...0e0dc5d. Read the comment docs.
So I thought to handle them all equally.
I meant: why sum in the first place, just because of your needs or is this a common operation to perform on qr(...).Q?