TST: fix cupy to_device test on multiple devices#326
Conversation
There was a problem hiding this comment.
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_devicetest for cupy when there are multiple devices.UNTESTED, as I don't have multiple GPUs to try this on.
Partially fixes #324.