OpenCL doesn't work with nvidia driver 410.xx/415.13 drivers for Linux

I’m running Fedora 29 kernel-4.18.x and tried several nvidia drivers, but neither drivers 410.xx nor 415.13 provides OpenCL capability, although graphics works fine. So the latest working OpenCL library is with NVIDIA-Linux-x86_64-396.54.run. My graphics cards are GeForce 1070 and 750ti.

So will you fix it in later releases?

Thanks in advance!!

BTW applications using OpenCL crashes with nvidia 410.xx or 415.13 drivers. They run well with 396.54. I want to upgrade it.

You broke your system. 410.73 does OpenCL just fine.

Nope. 410.xx doesn’t provide OpenCL for kernel 4.18.x. I saw some people use OpenCL with 410.xx, but they are running ubuntu 18 or 16 with kernel 4.15.x or older. nvidia 410.xx, 415.13 compile and work with kernel 4.18.x for graphics, but not for OpenCL. The OpenCL application crashes.

Your install is broken, try removing mesa-libOpenCL and install the nvidia OpenCL requirements (ocl-icd)

sudo dnf erase mesa-libOpenCL
sudo install ocl-icd

Works fine here

$ inxi -GS
System:
  Host: leigh.computer-desktop Kernel: 4.18.17-300.fc29.x86_64 x86_64 
  bits: 64 Desktop: Cinnamon 4.0.0 Distro: Fedora release 29 (Twenty Nine) 
Graphics:
  Device-1: NVIDIA GP107 [GeForce GTX 1050 Ti] driver: nvidia v: 415.13 
  Display: x11 server: Fedora Project X.org 1.20.3 driver: nvidia 
  unloaded: fbdev,modesetting,nouveau,vesa resolution: 3840x2160~60Hz 
  OpenGL: renderer: GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 415.13
$ ./jugCLer 
[OCLToy] JugCLer v1.0 (OCLToys: http://code.google.com/p/ocltoys)
[OCLToy] OpenCL devices select method: ALL_GPUS
[OCLToy] OpenCL Platform 0: NVIDIA Corporation
[OCLToy] OpenCL Platform 0: OpenCL 1.2 CUDA 10.0.132
[OCLToy]   OpenCL device 0: GeForce GTX 1050 Ti
[OCLToy]     Version: OpenCL 1.2 CUDA
[OCLToy]     Type: GPU
[OCLToy]     Units: 6
[OCLToy]     Global memory: 4136640Kbytes
[OCLToy]     Local memory: 48Kbytes
[OCLToy]     Local memory type: LOCAL
[OCLToy]     Constant memory: 64Kbytes
[OCLToy]     SELECTED
[OCLToy] OpenCL Platform 1: The pocl project
[OCLToy] OpenCL Platform 1: OpenCL 1.2 pocl 1.2 RelWithDebInfo, LLVM 7.0.0, SLEEF, DISTRO, POCL_DEBUG
[OCLToy]   OpenCL device 0: pthread-AMD FX(tm)-8350 Eight-Core Processor
[OCLToy]     Version: OpenCL 1.2 pocl HSTR: pthread-x86_64-unknown-linux-gnu-bdver2
[OCLToy]     Type: CPU
[OCLToy]     Units: 8
[OCLToy]     Global memory: 14289076Kbytes
[OCLToy]     Local memory: 1024Kbytes
[OCLToy]     Local memory type: GLOBAL
[OCLToy]     Constant memory: 1024Kbytes
[OCLToy]     NOT SELECTED
[OCLToy] Compile OpenCL kernel: trace.cl
[OCLToy] Using workgroup size: 256
[OCLToy] PixelsBuffer buffer size: 1875Kbytes
[OCLToy] SceneBuffer buffer size: 6848bytes

Thanks, leigh123linux,

Actually, jugCLer works also on my rig with nvidia 415.13 driver. I’ll try tomorrow…it’s now in the night here.

It has turned out the parameters of my application must be changed for nvidia driver 410.xx or later. My system itself was correct. I should have noticed earlier.

Thanks all.