-
Notifications
You must be signed in to change notification settings - Fork 85
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
fix: slicing on GPU #3248
base: main
Are you sure you want to change the base?
fix: slicing on GPU #3248
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpivarski - found the issue :-)
The numpy.ndarray
head that is 0
is not passed to the GPU kernel!
awkward/src/awkward/contents/listarray.py
Line 731 in ba9b4d1
head, |
in
awkward/src/awkward/contents/listarray.py
Lines 710 to 733 in ba9b4d1
elif is_integer_like(head): | |
assert advanced is None | |
nexthead, nexttail = ak._slicing.head_tail(tail) | |
lenstarts = self._starts.length | |
nextcarry = ak.index.Index64.empty(lenstarts, self._backend.index_nplike) | |
assert ( | |
nextcarry.nplike is self._backend.index_nplike | |
and self._starts.nplike is self._backend.index_nplike | |
and self._stops.nplike is self._backend.index_nplike | |
) | |
self._maybe_index_error( | |
self._backend[ | |
"awkward_ListArray_getitem_next_at", | |
nextcarry.dtype.type, | |
self._starts.dtype.type, | |
self._stops.dtype.type, | |
]( | |
nextcarry.data, | |
self._starts.data, | |
self._stops.data, | |
lenstarts, | |
head, | |
), | |
slicer=head, |
head in this case can be an array and it can be regularized to a proper backend, then the GPU kernel needs to be updated to handle a 'cp.array(0)'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@martindurant - as discussed at today's awkward-uproot meeting this is a temporary fix. I will rewrite the way we handle this CUDA kernel wrapping it in a Python function and handling the 'at' type correctly.
+1, please let me know when this is out. |
Any chance of a few more test cases like [:, 1:], [:, :1], [:, 1::2], [:, ::-1] ? |
No description provided.