在 Ubuntu 18.10 上,我已成功安装了 Nvidia-410 驱动程序,CUDA 似乎运行正常。但 OpenCL 不起作用(我很确定它在升级到 18.10/410 之前可以正常工作)。
$ clinfo
Number of platforms 0
$ ldd /usr/bin/clinfo
linux-vdso.so.1 (0x00007fff3f1c4000)
libOpenCL.so.1 => /usr/local/cuda-10.0/targets/x86_64-linux/lib/libOpenCL.so.1 (0x00007f5034c55000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5034c4f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5034a65000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5034a44000)
/lib64/ld-linux-x86-64.so.2 (0x00007f50350c8000)
我已经仔细检查ocl-icd-libopencl1
并libnvidia-compute-410
安装好了
$ lsmod | grep nvidia
nvidia_uvm 815104 0
nvidia_drm 40960 9
nvidia_modeset 1040384 17 nvidia_drm
nvidia 16572416 772 nvidia_uvm,nvidia_modeset
drm_kms_helper 172032 2 nvidia_drm,i915
drm 458752 12 drm_kms_helper,nvidia_drm,i915
ipmi_msghandler 102400 2 ipmi_devintf,nvidia
令我困惑的是:
$ ls -la /usr/lib/x86_64-linux-gnu/ | grep opencl
lrwxrwxrwx 1 root root 26 Okt 25 20:29 libnvidia-opencl.so.1 -> libnvidia-opencl.so.410.73
-rw-r--r-- 1 root root 28455704 Okt 21 05:35 libnvidia-opencl.so.410.73
$ ls -la /usr/local/cuda-10.0/targets/x86_64-linux/lib | grep OpenCL
lrwxrwxrwx 1 root root 14 Sep 12 23:37 libOpenCL.so -> libOpenCL.so.1
lrwxrwxrwx 1 root root 16 Sep 12 23:37 libOpenCL.so.1 -> libOpenCL.so.1.1
-rw-r--r-- 1 root root 27096 Sep 12 23:35 libOpenCL.so.1.1
...但也许无关。