-
Notifications
You must be signed in to change notification settings - Fork 20
Add CuPy support #63
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
base: master
Are you sure you want to change the base?
Add CuPy support #63
Conversation
@@ -219,7 +219,7 @@ def _ravel_group_idx(group_idx, a, axis, size, order, method="ravel"): | |||
size = [] | |||
for ii, s in enumerate(a.shape): | |||
if method == "ravel": | |||
ii_idx = group_idx_in if ii == axis else np.arange(s) | |||
ii_idx = group_idx_in if ii == axis else np.arange(s, like=group_idx_in) |
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.
This is the only change; but requires numpy >= 1.20.0
. Shall we add that as the min version?
I could also add a version check to switch between the old and new version.
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.
The last available numpy for py2 is 1.16.6 as far as I know. This would basically mean to completely drop the weave implementation, which so far is still the best benchmark to compete with for the numba implementation. Dropping py2 completely is probably unavoidable at some point, but if there is a way around it, remaining downwards compatible would be nice. So +1 for the switch!
@dcherian what's the status of this PR? Shall we close it, or still WIP? |
This makes anything that only uses bincount work.
max., min etc are more complicated.