Parla.py
Parla.py copied to clipboard
Confirm CuPy's Device Management Interface Works For Numba
Flagging this more as a potential issue where we need to go through and check that things actually work as they should. Numba has an interface for managing device contexts. We should make sure that swapping the device using cupy's context managers actually works for numba kernels. The current device is a thread-local variable inside the cuda runtime, and numba appears to be using that (https://github.com/numba/numba/blob/b1258c82c0ed2845fce52508f439e29f729384a9/numba/cuda/cudadrv/driver.py#L411), but there's a lot of potential for something wrong to happen here, so we should confirm that it really works as it should.