Implementing scalar indexing for device-side sparse arrays#699
Implementing scalar indexing for device-side sparse arrays#699alonsoC1s wants to merge 10 commits intoJuliaGPU:masterfrom
Conversation
9ed35d8 to
5b81329
Compare
|
Any chance the rest of the TODOs here could be addressed soon? I'd like to get this in before the next tag :) |
|
@kshyatt of course! I'm working on logical indexing atm. I do need some help to get the tests added (and the checks passing), though |
a958ca9 to
1975f82
Compare
| nzind = nonzeroinds(v) | ||
| nzval = nonzeros(v) | ||
|
|
||
| ii = searchsortedfirst(nzind, convert(Ti, i)) |
There was a problem hiding this comment.
Will this conversion work? You might need to force i::Ti above, not sure...
There was a problem hiding this comment.
I haven't checked with less common number types. This is probably something that would come up naturally during the full testing suite
|
I finally managed to add initial testing functionality. Notably missing are the tests for any sparse format other than CSC. This is true not only for the proposed changes, but, if I'm not mistaken, formats such as COO are never used in the constructor, linalg, etc. tests
|
This PR addresses #694 by implementing scalar indexing for the mentioned array types. Only scalar indexing is implemented, since doing vectorized indexing would result in dynamic allocations on the device, which is not allowed
Remaining things to be fixed:
GPUSparseDeviceMatrixCOO(re-implementing it the way CUDA.jl does it doesn't work for some reason)