OpenCL installation not working (nvidia 455) for kernel 5.4

So I’m trying to setup OpenCL on my machine.

First I installed the CUDA Toolkit: sudo pacman -S cuda .
This prompted me to install opencl-nvidia which has several options for different drivers, I picked the 455 option (which I’m running).
After that I installed ocd-icd and opencl-headers .

Running ls /etc/OpenCL/vendors/ gives me nvidia.icd but running clinfo returns Number of platforms 0 .

and my kernel is 5.4.80.

It used to work for nvidia 440 driver

there is a similar post but the manjaro forum is not allowing me to add link to it. The suggested answer for that post says, it should work for kernel below 5.9

i’m running 5.4 and 455 and clinfo is correctly picking up my card. that combo DOES work, not sure what else is different about your setup

what is inside your /etc/OpenCL/vendors/nvidia.icd ?

libnvidia-opencl.so.1

the following command has the output for me:
locate libnvidia-opencl.so
/usr/lib/libnvidia-opencl.so.1
/usr/lib/libnvidia-opencl.so.440.100

i’m on testing, which may be affecting things: stable is about to have the nvidia drivers consolidated. so i don’t have opencl-nvidia-455xx installed, just opencl-nvidia which is currently at 455.

$ locate libnvidia-opencl.so
/usr/lib/libnvidia-opencl.so
/usr/lib/libnvidia-opencl.so.1
/usr/lib/libnvidia-opencl.so.455.45.01

this doesn’t match you saying you picked the 455 opencl package. check it got the right one?

I found the problem, my libnvidia is pointing(symlinked) to the wrong file

ls -l /usr/lib/libnvidia-opencl.so.1 0 < 20:13:13
lrwxrwxrwx 1 root root 27 Jun 29 03:06 /usr/lib/libnvidia-opencl.so.1 -> libnvidia-opencl.so.440.100*

But it’s weird, why I don’t have the 455 version of libnvidia-opencl

I have the 455 driver installed and cuda applications work on it. Doesn’t the 455 libnvidia-opencl gets installed when the 455 driver got installed

Is there a way to install the libnvidia-opencl.so.455 separately or should I reinstall the drivers?

repeat, please re-check you installed the correct opencl package

SOLVED
I just did “sudo pacman -Sy opencl-nvidia-455xx” and it replaced the 440 version. It’s weird though, why the driver update didn’t update this too

Thanks @steanne for the help

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.