CUDA.jl icon indicating copy to clipboard operation
CUDA.jl copied to clipboard

Fixed reducedim operations for CuQRPackedQ

Open rkube opened this issue 4 years ago • 4 comments

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

rkube avatar Aug 26 '21 15:08 rkube

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).

maleadt avatar Aug 26 '21 15:08 maleadt

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.

rkube avatar Aug 26 '21 15:08 rkube

Codecov Report

Merging #1118 (0e0dc5d) into master (afe8179) will decrease coverage by 0.06%. The diff coverage is 0.00%.

Impacted file tree graph

@@            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 data Powered by Codecov. Last update afe8179...0e0dc5d. Read the comment docs.

codecov[bot] avatar Aug 26 '21 18:08 codecov[bot]

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?

maleadt avatar Aug 27 '21 11:08 maleadt