-
Notifications
You must be signed in to change notification settings - Fork 915
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
Ensure objects with __interface__ are converted to cupy/numpy arrays #16436
Conversation
@mroeschke Is there a way we can test this effectively? |
I am having trouble thinking how we could unit test this exactly, but I added a benchmark and a mypy type annotation in |
@mroeschke Do you think this should go into 24.08? |
I'm not sure how often users call |
I am okay with retargeting this to 24.08 to avoid perf regressions. |
@mroeschke You'll need to rebase to remove the branch-24.10 changes. |
37ea7a6
to
6a5864b
Compare
Think we need an admin merge |
Thanks all! 🙏 |
Description
#16277 removed a universal cast to a
cupy.array
in_from_array
. Although the typing suggested this method should only acceptnp.ndarray
orcupy.ndarray
, this method is called on any object implementing the__cuda_array_inferface__
or__array_interface__
(e.g.numba.DeviceArray
) which caused a performance regression in cuspatial rapidsai/cuspatial#1413closes #16434
Checklist