-
Notifications
You must be signed in to change notification settings - Fork 34
TST: fix cupy to_device
test on multiple devices
#326
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
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.
Pull Request Overview
This PR fixes the cupy to_device test so that it runs correctly on multiple devices. The key changes include replacing direct stream instantiation with lambda functions to lazily create stream objects within the device context and updating the loop variable name to reflect its callable nature.
Comments suppressed due to low confidence (1)
tests/test_cupy.py:20
- [nitpick] Consider renaming 'stream_gen' to 'stream_factory' to better reflect its purpose as a callable that returns a new stream instance.
for stream_gen in streams:
Thanks. I'll retest it later today. |
Actually, gave it a spin now:
|
@ev-br please try now |
|
looks good to me. Outstanding error is fixed by #325. |
Test failure is unrelated |
Merged, thanks. |
No. As per both the CuPy and the Array API spec, it needs to be a stream pointer, whatever that means on the backend. On CUDA, that means it must have been returned by |
Fix
to_device
test for cupy when there are multiple devices.UNTESTED, as I don't have multiple GPUs to try this on.
Partially fixes #324.