-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multidimensional reverse
#1126
Comments
reverse!
errors when dims
is a tuplereverse
only supports reversing a single dimension
Yeah, the kernel is currently written with only a single dimension in mind, and would need to be adapted. Reversing multiple times is pretty wasteful, and we should just need to update the index calculation in the current kernels. |
reverse
only supports reversing a single dimensionreverse
... just ran into the same issue. Any progress on this? |
No. Feel free to take a stab at it! Happy to help you with any issues. |
I made a revised version, which now should be able to handle this. Also found a way to kick out the empty threads. Should I make a pull request? |
Describe the bug
The
reverse!
API supports both a single value or a tuple, egreverse!(A, dims=(1, 2))
. I've noticed that CUDA errors for the tuple case.To reproduce
I'm on CUDA v3.4.2 (latest release), but it seems that even on the master branch this problem exists.
Relevant version info:
Expected behavior
I imagined that
reverse!(A, dims::Tuple{Vararg{Int}})
would work. I suspect a simple solution would be to just define it by calling the single dimension method for each dimension indims
, but I'm not sure how wasteful this would be.Version info
Details on Julia:
Details on CUDA:
The text was updated successfully, but these errors were encountered: