cudaGetDeviceCount returned 35 -> CUDA driver version is insufficient for CUDA runtime version

I followed the instructions to install the CUDA on WSL, but when I tried to ./deviceQuery only got like below:
./deviceQuery Starting…

CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35
→ CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

  1. windows version: 20161.1000 (got from winver)
  2. got WSL2 runnig properly: (checked by wsl -l -v)
    NAME STATE VERSION
    Ubuntu-18.04 Running 2
  3. nvidia driver version : 455.41 (checked on nvidia control panel)
  4. followed these steps : CUDA on WSL :: CUDA Toolkit Documentation , successfully installed driver but failed to run sample.
  5. then found this: Failure to install CUDA on WSL 2 Ubuntu - #6 by davidhsv , tried still failed on sample. the same error, seems not finding GPU.
2 Likes

I checked the wsl kernel version, should be I got too old kernel version, I’m trying to update my wsl kernel version.
refer to: Stderr: nvidia-container-cli: initialization error: driver error: failed to process request\\\\n\\\"\"": unknown - #16 by kmorozov