How do I install OpenCL for AMD GPUs? I’ve been researching this and I’ve tried to install only OpenCL from the AMD drivers from their website, but to no avail. I’m using a VEGA 56. I’ve switched from MacOS to Linux only for the reason that Blender is dropping OpenCL on MacOS.
Hello @rawr1, and welcome to Ask Fedora! I assume you read the howtos so I’ll just get down to your question. I did a bit of digging and this is what I have found https://wiki.tiker.net/OpenCLHowTo which seems to be geared more towards using the GPU to aid in procession power. The second link here would seem more applicable for your question. As in here are the requirements for OpenCL to work with an AMD GPU of the VEGAxx variety.
Must have installed…
kernel-devel (provided by Fedora repository)
amdgpu-dkms
dkms
libopencl-amdgpu-pro
opencl-amdgpu-pro-icd
I do have an AMD video card so I can try this, but not exactly your card.
Or what I could get working with Silverblue was ‘xorg-x11-drv-amdgpu’
Hey @jakfrost, thanks for the reply. Sorry for what’s prob a simple question, but I’ve been using Linux for less than a month.
I installed dkms, but I don’t understand anything else. amdgpu-dkms? Is this a driver I download from amd’s website?
I have much to learn…
Hello @rawr1, I was away from my PC for a couple of days so sorry for the delayed response. From what I understand about this particular topic is the ‘D’ in ‘dkms’ is for dynamic as in ‘dynamic kernel module system’. Most hardware drivers are under the kernel module umbrella, especially video since we like to have video capabilities early on in the kernel load. Having said that there are subtle things like Xorg having a ‘part’ of the video drive, or CUPS having a ‘part’ of the driver for printers. I found a good place to get some of this confusion cleared up is opensource.com, information on all things opensource. Some good reading there!
Thank you so much @jakfrost. I’m gonna read this soon as I can.
Kind of off topic, but I know next to nothing of how the Linux OS works. Kernel? Should I simply Google one thing as soon as I learn this new fantastic thing exists, or is there a website that will explain most things I need to know?
Hello @rawr1,
For sure I would start with the Fedora documentation proper, Fedora Documentation, Then maybe look at The Linux.org forum for general Linux information. To maybe clarify a bit, modern OS’s such as Windows 10, OSx, and Linux are comprised (generically speaking) of a Kernel and Shell, on top of which the applications including the GUI are run. When you open a terminal, you are “in the shell” at the prompt, normally this is bash in the case of Fedora. Also, it would be negligent of me not to point out GNU which most Linux distributions are arguably based on. One more place for info off the top of my head is Linux Kernel Doc’s to get the latest on the kernel itself.
Hey @jakfrost,
Thanks again for all of the info. I can use all I get lol. I’m still a little loss tho. If i need to get the amdgpu as a tar file and then a instruction file for dkms, where do I go? I see other posts of people installing it but I can’t find any sources.
or am I still confused
Hello @rawr1, you’re welcome! All drivers are pretty much a part of the kernel, so no usually they are installed out of the box, the caveat being that if your particular device was not recognized, or the kernel module doesn’t load automatically, then you would need to configure it yourself. A good place to start is with commands like lspci
which will give you a listing of all PCI devices connected to your system, this is likely where your GPU will show up. So you likely should look at the date on those posts as they sound as if they are out of date. Another thing to keep in mind about using Fedora is it is near bleeding edge so it changes steadily over time, getting better. You may need to download a tar file from some site, but in this case I would ask what AMD GPU (video card) are you trying to get going? The file(s) are very likely already there, and we just have to work through how to activate them on your system.
I might add that I’ve heard a number of first-hand reports from people owning AMD GPUs that they are working great on Fedora with open-source driver out of the box – without user needing to to anything (or download something anywhere else).
I’m not sure about OpenCL part though – is it a feature of the driver or some separate library/capability (like CUDA for NVidia, for example)? Is it provided by open-source AMD driver or not?
So, the open source drivers from AMD for my Vega 56 work out of the box. This is simply OpenCL I’m trying to setup. I’ve read that some people will install only the OpenCL package (package yes?) from AMD’s driver download. However, AMD doesn’t support Fedora so it doesn’t work.
OpenCL is like CUDA yes. Although much easier as CUDA requires an update based on every driver update and OS update. It’s a pain when I was on MacOS (which used to support it) because nothing was native so I had to access my computer remotely to update CUDA drivers and restart to get a screen. OpenCL does not need an update to work with different driver versions from AMD. It is beautiful…
I do not know if OpenCL is open-source or not. I’m sure it is though because MacOS used to come with it built in. Until they stopped and only support Metal (they’re version which apparently is much faster and only comes with MacOS) which is why I’m switching to Linux. I’m learning game development with Blender and Unreal. If I want to render something in Blender it is soooo much faster with a GPU. But AMD requires OpenCL to do this.
@rawr1, please check this page:
https://fedoraproject.org/wiki/Changes/OpenCL
It says that at least some parts/features of OpenCL are already awailable.
You can (maybe) try to solve this from another side. You want to use some application which wants some OpenCL features. It’s quite likely that this application will require some libraries to do so.
You can find out, which libraries are required and are they available from the repositories or do you need to install them from somewhere else.
If any are available, it must not be the complete package. I don’t have the option to use OpenCL in Blender. @jakfrost sent a link which gives very very very basic installation steps to get it working with Blender. But they describe using amdgpu dkms. Which is where I’m loss currently.
I’ll dig deeper in the the link you sent once I get home in front of my Linux Machine
@rawr1, It looks like OpenCL rendering on open-source drivers aren’t supported by Blender:
So if you want it, you’ll have to install proprietary / closed source amd-pro driver. Here’s people discussing it a bit for an Arch Linux. There’s bugs that can be specific to Arch in the discussion, but they name the driver and second component needed fro OpenCL support.
Keep in mind though, that with proprietary driver you can have some bugs/glitches in your day-to-day Fedora usage. Someone here on Ask Fedora described it as “hit or miss” (you can search for AMD driver topics and read it yourself).
So as far as I understand it – and I don’t own AMD GPUs, it’s entirely from thing I’ve read here and in a couple more places – you have to chose between
- Fedora and games working ok without trouble with open source driver.
- Be adventurous and test if proprietary driver works ok for you.
I can be wrong of course, and it would be wonderful to hear from someone who actually uses AMD hardware.
I am running an RX580 card with Fedora 30. OpenCL 1.1 is available in the standard Fedora install using the Clover platform via the mesa-libOpenCL package (use clinfo command to verify). You can also install the AMD package which provides OpenCL 1.2 by following instructions at https://leanderhutton.com/posts/2019/08/amdgpu-pro-fedora-debian.html and grabbing the latest package from AMD “Drivers & Support” section.
Hope this helps!