6
votes

I am trying to @vectorize some python through CUDA. I'm running Python3 in atom with Cuda9.1, Anaconda3, and have a similar problem to this:

Cuda: library nvvm not found

but that solution is for linux and I'm on windows.

I gather from that solution above I need to add an Environment Variable. I tried to do just that by searching from the nvvm file which i found in:

C:\Users\ME\AppData\Local\Programs\Python\Python36\Lib\site-packages\numba\cuda\tests\cudadrv__pycache__

but adding that didn't help. I tried 'conda install cudatoolkit' as well as updating it.

Is my problem that the OS doesn't know where this library is? How to I point python to the library that it needs?

4

4 Answers

6
votes

I had this problem in late 2019 on CUDA 10.1 without Anaconda (everything installed through pip). The numba documentation said that it looks for CUDA first as configured by a conda package called cudatoolkit, but that wasn't applicable as I hadn't installed anything using conda. The second place it looks for CUDA is in the environment variable CUDA_HOME, and setting this to "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1" did the trick for me:

enter image description here

Thereafter, the errors go away and numba code runs.

5
votes

These are the environmental variables I set to get some pyCUDA example code running on Windows:

NUMBAPRO_NVVM = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\nvvm\bin\nvvm64_32_0.dll

NUMBAPRO_LIBDEVICE = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\nvvm\libdevice\

2
votes

You must remove the bar from the end.

NUMBAPRO_LIBDEVICE = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\nvvm\libdevice
2
votes

Python 3.7.0(x64 on AMD) on Windows 10(x64). Cuda 10

pip install --upgrade pip  
pip install numba
pip install numpy
pip install six

Also need to set system variable path as:

NUMBAPRO_NVVM=c:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\nvvm\bin\nvvm64_33_0.dll
NUMBAPRO_LIBDEVICE=c:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\nvvm\libdevice

Restart computer! (seems that is important for some reasons). This Works for me.