0

Installing rapids and cuML is not working

I have Cuda installed (Cuda compilation tools, release 11.8, V11.8.89) in a Python 3.10.11 env in JN in VSC on wsl2 on a desktop running Windows 11, with the latest nvidia drivers.

This is what nvidia-smi shows

NVIDIA-SMI 535.54.04              Driver Version: 536.23       CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 4090        On  | 00000000:09:00.0  On |                  Off |
| 33%   46C    P8              28W / 450W |   1173MiB / 24564MiB |      3%      Default |
|                                         |                      |                  N/A 

But when I run

conda create -n rapids -c rapidsai -c conda-forge -c nvidia  \
    cudf=23.04 cuml=23.04 cugraph=23.04 cuspatial=23.04 cuxfilter=23.04 cusignal=23.04 cucim=23.04 python=3.10 cudatoolkit=11.8

everything seems to install without any errors

But when I then check the installation with the recommended...

 import cudf
 print(cudf.Series([1, 2, 3]))

...I get this:

raise CudaSupportError(f"Error at driver init: {description}")
numba.cuda.cudadrv.error.CudaSupportError: Error at driver init: Call to cuInit results in CUDA_ERROR_NO_DEVICE (100)

And again, my nvidia-smi clearly shows that CUDA is properly installs and correctly identified my GPU.

Any suggestions for how to fix this?

Dai
  • 141,631
  • 28
  • 261
  • 374
  • Have you read this? https://docs.nvidia.com/cuda/wsl-user-guide/index.html - I note that CUDA 11.8 is somewhat out-of-date now - do you need to use WSL2? Can't your Python+CUDA program run directly on Windows? – Dai Jun 16 '23 at 22:29

1 Answers1

2

This may indicates a misconfiguration in your CUDA WSL setup. Some users have had success by uninstalling and reinstalling the CUDA Toolkit in WSL. Note that WSL users should not install CUDA drivers (the driver is supplied by Windows, not WSL) -- this is a common mistake for WSL users in my experience. If you're running Ubuntu, you want the apt package "cuda-toolkit" and not "cuda", which includes the driver. I recommend testing with another CUDA application to verify your setup, because the issue is probably not specific to cuML or cuDF.

See these related issues for more ideas:

  • @Stephan De Spiegeleire, did you install CUDA as part of your pre-RAPIDS set up of WSL2? As Bradley said, especially for the conda and docker installs, https://docs.rapids.ai/install#wsl2-conda, you should not install CUDA into your WSL2 instance, as that is taken care of in the windows driver. If you did that, you can try uninstalling CUDA or redoing the WSL2 instance. – TaureanDyerNV Jun 21 '23 at 18:06