Starting with CUDA 13 driver does not require the current device to match the stream's device. We should be able to remove the __ensure_current_context in launch for CUDA 13+, but we currently use CUfunction internally, which is device specific. We should be able to refactor the code to use CUkernel for CUDA 13+ compilation and avoid setting the current context.
This won't make it to 3.2, filing an issue to look into it for 3.3
Starting with CUDA 13 driver does not require the current device to match the stream's device. We should be able to remove the
__ensure_current_contextin launch for CUDA 13+, but we currently useCUfunctioninternally, which is device specific. We should be able to refactor the code to use CUkernel for CUDA 13+ compilation and avoid setting the current context.This won't make it to 3.2, filing an issue to look into it for 3.3