-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Milestone
Description
Users usually install the needed dependencies like this
!pip install numba-cuda[cu12]
in the first cell of a notebook, and then use it in the next cell
from numba import cuda, ...
However, this does not work with the .pth redirector that we add to overwrite the upstream CUDA target:
https://github.com/NVIDIA/numba-cuda/tree/main/site-packages
because the .pth files must be executed at the startup time of the Python interpreter, and this execution logic implies that Python is already started by the Jupyter kernel.
Based on the offline discussion with @shwina we don't think there is a fix. Once the upstream Numba drops the CUDA target, we can drop this redirector. Before that happens, we can apply any of the workarounds below:
- Restart the kernel after
!pip install
- Install the packages in terminal instead of cell, prior to starting a notebook
import _numba_cuda_redirector
beforeimport numba
orfrom numba import cuda
Metadata
Metadata
Assignees
Labels
No labels