[SOLVED] AMD Radeon RX Vega (various) GPU cards on Slackware-current?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
AMD Radeon RX Vega (various) GPU cards on Slackware-current?
I'm trying to use an AMD Radeon RX Vega 64 (the Vega series is over a year old now) but wondering when it'd have full support on Slackware sort of like AMDGPU-PRO (available for Redhat/RHEL/CentOS, SUSE/SLED/SLES, Ubuntu GNU/Linuxes)... meaning letting you compute with the GPU, not just use for 2D (or 3D, which is not so necessary for me.) What I heard on freenode IRC is that unsupported distributions need a new Mesa so they can enable OpenCL. I looked at the Mesa website and it says it now supports the chip family name a.k.a. the Vega ones. If I install Slackware-current, is it possible to use the card with OpenCL, or will it be? I like to use it (forced to use a different OS on that PC, but I have a few PCs on my desktop) like for UC Berkeley's Open Infrastructure for Network Computing (BOINC) to support science and even get paid Gridcoin (GRC) doing that, but I'd like to eventually use OpenCL for such things on classic *BSD and/or Slackware, not other Linux, which are non-Unix-like (okay, it's maybe possible to setup Devuan, Gentoo and some obscure distributions on fsf.org more like Unix, but not always as much as Slackware, and the rest don't have a full development set of packages on the installation ISO/media.)
AMDGPU-PRO has been a running target that has been hit or miss. I believe the newer versions will work with -current, assuming you can get all the files put in the correct spots. I had done work on previous versions of AMDGPU-PRO to get a working Slackware package, but I was without supported hardware, so I relied on others reporting issues and trying to tweak my script as needed. It's been about a year since I've last worked on it, and with that, the 17.40 version required Xorg 1.19, which -current now runs 1.20. I just checked AMD's website, and it looks like they now have 18.40, which hopefully has support for 1.20, but I'm not sure how much tweaking my script would need and whether it'd require patching for the 4.19 kernel (I imagine it would since AMD tends to lag behind kernel releases).
I updated my gpu to a RX Vega 56 and it is working well in current so far, granted I am building libdrm, mesa and xorg from their respective git master branches. However the versions in current, llvm and the kernel should all be new enough.
I would suggest blacklisting the radeon kernel module (radeon.ko) so that it will use amdgpu and then configuring xorg to use DRI3 and modesetting (Not xf86-video-amdgpu). I don't have any test cases for opencl, but I imagine its supported and working. Current does have opencl support in mesa at the very least.
I would also suggest to not use AMDGPU-PRO when AMD supports the free radeonsi driver in mesa much better.
I updated my gpu to a RX Vega 56 and it is working well in current so far, granted I am building libdrm, mesa and xorg from their respective git master branches. However the versions in current, llvm and the kernel should all be new enough.
I would suggest blacklisting the radeon kernel module (radeon.ko) so that it will use amdgpu and then configuring xorg to use DRI3 and modesetting (Not xf86-video-amdgpu). I don't have any test cases for opencl, but I imagine its supported and working. Current does have opencl support in mesa at the very least.
I would also suggest to not use AMDGPU-PRO when AMD supports the free radeonsi driver in mesa much better.
Unless things have changed, OpenCL is not supported out of the box with the opensource AMDGPU. It is one of only a few reasons why someone might want to install the proprietary instead of sticking with the (much easier) opensource drivers.
Arch does have a PKGBUILD where they extract certain things out of the AMDGPU-PRO driver, but I haven't looked into it.
I still don't have a test case, but the gallium documentation claims that Evergreen through Sea Islands GPU familes currently support opencl, I think this is out of date and Volcanic Islands is likely supported too.
If you have a trivial way of testing opencl I can see how well it works or not here. Regardless there is clearly active opencl development for AMD and gallium on irc.
I'm still a newbie in regards to OpenCL, never having dabbled with it myself, so my information could be wrong.
But, from my understanding, to use OpenCL requires installable client drivers (icd files). Those files are not present in Slackware and can be provided by the AMDGPU-PRO driver for amdgpu-enabled hardware. They may also be able to be provided using ROCm (AMD's open source implementation of OpenCL, but it is not fully feature complete with OpenCL -- although ROCm 2.0 should be fully feature complete to OpenCL 2.0), but the instructions look to be quite the maze to get through.
Based on AUR's rocm PKGBUILD, I think you need at least these, and the second one has 6 additional repos it needs cloned into it to be able to build (see that in its opencl.xml file).
So, while GPUs may be able to use "OpenCL" with X and the opensource drivers, they would need ROCm first, and I'm unsure how many projects might use OpenCL features that aren't implemented in ROCm.
As for GalliumCompute, that doesn't seem to be available for any cards other than 5 year old cards (the R9 270 was released back in 2013), and it only "mostly" supports OpenCL 1.0 and 1.1.
I don't think mesa needs any of that, arch provides opencl-mesa for amdgpu which is already in Slackware current as part of mesa along with ocl-icd, libclc and opencl-headers.
The OP is asking about a newer card so I'm not sure what the R9 270 has to do with this thread and the gallium compute clearly says most of the recent cards are supported. I just don't think anyone has gone back to add volcanic islands to that list and I imagine the compatibility chart might also be out of date.
It sounds like I jumped into something that may work or not but maybe just if I do hours of unfamiliar configuration. I don't even mind compiling my own kernel but the AMDGPU-PRO needed for OpenCL has almost 100 dependencies... is it clear enough that they're already in Slackware-current, so I just need to upgrade, or I'd have to basically port one of the other distributions' drivers (lcd files, don't know how to do that) and make sure it has compatible versions of 100 libraries?
It would certainly be awesome if it doesn't need any of it, but that gallium compute page looks like it it is just for "Evergreen through Sea Islands GPU familes". It was last edited May 2018 and hadn't had any of the newer generations of cards added, so I don't think it applies. However, as you state, it could just be out of date. I mentioned that specific card because it was one of the highest end Southern Island cards, which is the highest generation listed in the Gallium Compute page.
According to Mesa's radeon table, OpenCL is a WIP for Evergreen through S.Islands (likely via Gallium Compute) and is implemented via ROCm for C.Islands through A.Islands. So this seems like it might confirm that Gallium Compute is not used for the newer generations of cards.
I asked in #radeon @ freenode and was told that the RX Vega 56/64 supports opencl about as well as previous cards using clover (mesa) and that CL 1.1 mostly works while some CL 1.2 features work. Of course the experience can vary based on the specific use case.
I suppose the gallium compute page is not completely abandoned, but also not fully up to date either.
Also the gentoo wiki is arguably more informative and helpful than the arch wiki when it comes to opencl or amd cards.
I asked in #radeon @ freenode and was told that the RX Vega 56/64 supports opencl about as well as previous cards using clover (mesa) and that CL 1.1 mostly works while some CL 1.2 features work. Of course the experience can vary based on the specific use case.
If that's accurate and it doesn't need ROCm like their own page states, then that's awesome! But then it is unfortunate that the information about this can't be found on official sources. All official sources say that either ROCm or AMDGPU-PRO is required for OpenCL for the newer cards, and all forum, blog, and wiki posts that I found seem to mirror that.
Quote:
Originally Posted by orbea
Also the gentoo wiki is arguably more informative and helpful than the arch wiki when it comes to opencl or amd cards.
Unfortunately, that page was last modified almost 1.5 years ago, and the Mesa section only mentions that in 2016 "almost all" cards are supported, but that wouldn't necessarily mean that the information has stayed the same with vega cards.
I know documentation is hard to keep up. I've neglected my fair share as well, so this isn't trying to complain about any lack of updates, just stating that it's hard to know the current state of things.
Last edited by bassmadrigal; 11-27-2018 at 01:23 AM.
If that's accurate and it doesn't need ROCm like their own page states, then that's awesome! But then it is unfortunate that the information about this can't be found on official sources. All official sources say that either ROCm or AMDGPU-PRO is required for OpenCL for the newer cards, and all forum, blog, and wiki posts that I found seem to mirror that.
That is why I asked the actual developers, I would consider them to be "official". Unfortunately looking for opencl test programs just returns a lot of not so useful windows, mac and nvidia documentation.
That is why I asked the actual developers, I would consider them to be "official".
Well, yeah, they are obviously official, it's just unfortunate that people would need to go into IRC to ask them about this when it would be more helpful if it was accessible by a Google search.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.