This repository was archived by the owner on Mar 12, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 80
Non-contiguous indexing #1
Comments
This actually works if the index is a CuArray: julia> xs[cu[1,2], :]
2×3 CuArray{Float64,2}:
0.213428 0.977906 0.12309
0.416557 0.371804 0.730723 Should be pretty easy to do that conversion automatically. |
Actually, I remember why I didn't add this earlier: Base uses scalar indexing to check bounds, so converting to CuArray will be bad for performance. Easy to fix by doing the conversion after bounds checking; for now, ironically, cpu-array indexing will be faster, but we can fix that if cuarray indexing is needed. |
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Hi Mike,
Thanks for such an effort! I think non-contiguous array indexing is the only missing feature in CuArray where we use in our models heavily. Example code snippet:
I think if the last case works, the other is not hard to implement. I will try to test CuArrays with my dynamic neural net benchmark examples (for now, without indexing).
The text was updated successfully, but these errors were encountered: