CUDA and OpenCL with vGPU driver

Hi folks,

I am trying to get CUDA and OpenCL working on an Ubuntu (22.04) KVM hypervisor when using the vGPU host driver. I’ve got 525.105.14 installed and working great. My Tesla P4 shows up in nvidia-smi and everything appears to be copacetic.

Next I installed cuda-keyring and cuda-toolkit-12-0 and all of its dependencies. (I can’t install cuda-12-0 because that will replace the vGPU driver.) It installed fine, and I added /usr/local/cuda-12.0/bin to PATH and /usr/local/cuda-12.0/lib64 to LD_LIBRARY_PATH.

However, CUDA is still not showing up e.g. in the output of nvidia-smi. I’ve also noticed that OpenCL isn’t working (i.e. clinfo shows 0 platforms)—even though the appropriate packages are installed it didn’t create the necessary symlinks in /etc/OpenCL/vendors. And it appears as though e.g. nvidia-persistenced is missing. On a “normal” system I’d simply install e.g. nvidia-compute-utils-525 and be off to the races, but that’d replace the vGPU driver so that’s not an option here.

I also tried installing via the runfile instead of the repo with the same results.

Any suggestions on what packages might be missing that would close the loop and get CUDA and OpenCL 100% working? Once that’s done my next step is to get the Docker container runtime working.

Thank you in advance!

$ nvidia-smi
Thu Jun  8 18:27:45 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.105.14   Driver Version: 525.105.14   CUDA Version: N/A      |
|-------------------------------+----------------------+----------------------+
<snip>
$ clinfo
Number of platforms                               0

there is a separate forum for vGPU questions.

support for CUDA/OpenCL is dependent on the vGPU profile you are using, which I can’t tell because you have snipped that out of the nvidia-smi output.

Thanks, I’ll ask over there.

This is on the hypervisor host, so there is no vGPU profile (to the best of my admittedly limited understanding). ETA: Ah, yes, I can see that I was very unclear about that. I’ll amend my post.