Skip to content
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

CuPy support #128

Open
dcherian opened this issue Aug 2, 2022 · 4 comments
Open

CuPy support #128

dcherian opened this issue Aug 2, 2022 · 4 comments
Labels
array-types enhancement New feature or request help wanted Extra attention is needed

Comments

@dcherian
Copy link
Collaborator

dcherian commented Aug 2, 2022

  1. We should test with numpy-groupies. CuPy provides bincount, Dispatch ufunc.at methods cupy/cupy#7561
  2. We'd have to avoid factorizing with Pandas unfortunately and use np.searchsorted or np.digitize; or use CuDF?
@dcherian
Copy link
Collaborator Author

Turns out scatter_* are a repacement for ufunc.at not ufunc.reduceat. The former does not take an axis kwarg so we can't use it for now.

cupy 12 might have more ufunc support, so let's wait and see

@dcherian dcherian mentioned this issue Aug 16, 2022
2 tasks
@kmaehashi
Copy link

Hi, CuPy maintainer here! We've created a dedicated tracker for ufunc features: cupy/cupy#7082
Do you need reduceat for specific ufuncs or all ufuncs?

@dcherian
Copy link
Collaborator Author

dcherian commented Oct 4, 2022

Thanks for checking in @kmaehashi

Technically we could use

  • add.reduceat, multiply.reduceat, maximum.reduceat, and minimum.reduceat (with engine="flox") and
  • multiply.at, maximum.at, and minimum.at (for engine="numpy" which uses numpy_groupies)

The second one is the default now, supporting .at would be most helpful

For reduceat, add.reduceat would be the most useful since that lets us do sum, mean, var and std

@kmaehashi
Copy link

Thanks! Sounds it aligns with our v12 target 😄
cc/ @asi1024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
array-types enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants