OpenCL with Nvidia 390 on Ubuntu 18.04
19,974
Typical, after I resort to Askubuntu I manage to find the solution.
In 18.04 you need to manually install the ocl-icd-libopencl1
package. So a quick sudo apt install ocl-icd-libopencl1
fixed it.
Related videos on Youtube
Author by
Hadog
Updated on September 18, 2022Comments
-
Hadog over 1 year
On 16.04, OpenCL worked with my Nvidia 840M running the latest Nvidia drivers in the Ubuntu repos.
I've done a fresh install for 18.04, however using the 390 Nvidia drivers from the Ubuntu repos (not from any PPA). Now none of my OpenCL compatible applications are able to use it.
Am I wrong that OpenCL should just work once the Nvidia drivers are installed?
-
Hadog about 6 yearsThank you for the suggestion, but the CUDA Toolkit is not related to OpenCL and the driver in the PPA doesn't help.
-
Terrance about 6 yearsSorry, but that is incorrect information about CUDA Toolkit being related to OpenCL. Please see the updates to my answer: askubuntu.com/a/1030901/231142
-
Hadog about 6 yearsAn interesting read, thank you. What does the CUDA Toolkit provide over the ocl-icd-libopencl1 package combined with the Nvidia-390 driver for applications just using the OpenCL interface?
-
Terrance about 6 yearsAs far as the driver goes, you can use the
nvidia-390
without problems. I have used it and it worked fine. The only thing that my answer is actually pointing out is that the driver name has changed from Ubuntu 16.04 and thegraphics-drivers
ppa to Ubuntu 18.04 where it is nownvidia-driver-39x
where396.24
is the newest driver. Seems fairly stable. As far as CUDA goes I would suggest reading through the Wiki page on it for what it can give you: en.wikipedia.org/wiki/CUDA -
Hadog about 6 yearsI fear we might be going round in circles a bit here, but I cannot see any reason why anyone would install the CUDA Toolkit to get OpenCL support working. Thank you for you help..
-
Terrance about 6 yearsI can see it for compatibility reasons with NVIDIA GPUs. One that I can think of is Blender will use the CUDA, which is what that question in the link was about. But, each to their own. If you have no need for CUDA then that is fine. The CUDA answer was there to install all the support without the need to know what all the names are and to give you the application written by NVIDIA themselves for their own chips.
-
-
Pilot_51 almost 6 yearsThanks! I use GPU processing for SETI in BOINC and spent a couple hours trying to figure this out after a clean install of Mint 19. I like that this solution is simpler than any of the non-working answers I found.
-
0x0me almost 6 yearsThanks, darktable detects and uses opencl after installing the package.
-
runlevel0 about 5 years@0x0me : LOL, exactly the reason why I cheked in to this thread :) I just installed a new nvidia card and wanted to activate OpenCL for Darktable.