Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

AMD RX 460 GPU and OpenCL

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
lars_the_bear
Guru
Guru
Posts: 537
Joined: Wed Jun 05, 2024 7:04 am

AMD RX 460 GPU and OpenCL

  • Quote

Post by lars_the_bear » Fri Sep 27, 2024 2:51 pm

Hi folks

I'm tearing my hair out here...

I have an old-ish Lenovo P710 workstation. I want OpenCL to work on it, so that Darktable will be faster. I don't really know what OpenCL is, but I know that it makes Darktable faster, because I have it on other machines. The P710 came with an ancient NVidia GPU which I was told in another thread would never support OpenCL.

I don't have a lot of money, so I bought a slightly more modern AMD RX 460, which seems to be generally well-supported by Linux. I rebuilt everything with

VIDEO_CARDS="amdgpu radeonsi

and, in general, it works fine. But I'm struggling to get OpenCL to work. I'm using the amdgpu driver and, according to the Gentoo documentation[1],

"OpenCL 2.0 is available via ROCm (dev-libs/rocm-opencl-runtime)"

So I installed this library and its stack of dependencies. But even 'clinfo' crashes:

Code: Select all

$ clinfo
free(): invalid pointer
Aborted
Looking at the various bits of Gentoo documentation, there seems to be a dozen different ways to get OpenCL support with AMD GPUs. There are closed-source and open-source GPU drivers. There are closed-source and open-source OpenCL implementations for AMD. There are completely (it seems to me) unrelated ways to get OpenCL using Mesa (and I have no clue what Mesa is).

I just want to know the way that works. It doesn't have to be the fastest or shiniest implementation, I don't need to understand it -- it just needs to not crash.

If anybody has got OpenCL working with this kind of GPU, could you please tell me how? Before I hurt myself beating my face on the desk, ideally.

BR, Lars.

[1] https://wiki.gentoo.org/wiki/AMDGPU
Top
grknight
Retired Dev
Retired Dev
Posts: 2552
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Fri Sep 27, 2024 11:52 pm

Disclaimer: I know very little about OpenCL or other GPU interfaces. This is just what works for me.

On my RX550, clinfo only worked with dev-libs/amdgpu-pro-opencl. It failed, from my POV, with ROCm and the AMD website has a very small list of supported cards for ROCm.

I don't know if the wiki is exaggerated or what.

I am not really using OpenCL so running clinfo is the limit of how I would interact with it.
Top
lars_the_bear
Guru
Guru
Posts: 537
Joined: Wed Jun 05, 2024 7:04 am

  • Quote

Post by lars_the_bear » Sat Sep 28, 2024 3:24 pm

grknight wrote: On my RX550, clinfo only worked with dev-libs/amdgpu-pro-opencl. It failed, from my POV, with ROCm and the AMD website has a very small list of supported cards for ROCm.
Thank you. If I wanted to try this, is it just a case of uninstalling rocm-opencl-runtime (and, presumably, it's stack of dependencies) and then installing amdgpu-pro-opencl instead? Or is there more to it than that?

BR, Lars.
Top
grknight
Retired Dev
Retired Dev
Posts: 2552
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Sat Sep 28, 2024 4:00 pm

lars_the_bear wrote:[If I wanted to try this, is it just a case of uninstalling rocm-opencl-runtime (and, presumably, it's stack of dependencies) and then installing amdgpu-pro-opencl instead?
Just this.
Top
lars_the_bear
Guru
Guru
Posts: 537
Joined: Wed Jun 05, 2024 7:04 am

  • Quote

Post by lars_the_bear » Sun Sep 29, 2024 3:40 pm

I'm pleased to report that, with amdgpu-pro-opencl installed, Darktable does OpenCL at last. Sadly, it doesn't make the same improvement in rendering performance as I found in another machine with an NVidia GPU, but it's definitely working. Maybe on this machine there is a bottleneck somewhere else.

Thank you to those who responded.

BR, Lars.
Top
ritzmax72
Tux's lil' helper
Tux's lil' helper
Posts: 131
Joined: Sun Aug 10, 2014 5:59 am

  • Quote

Post by ritzmax72 » Sat Nov 02, 2024 10:16 am

lars_the_bear wrote:I'm pleased to report that, with amdgpu-pro-opencl installed, Darktable does OpenCL at last. Sadly, it doesn't make the same improvement in rendering performance as I found in another machine with an NVidia GPU, but it's definitely working. Maybe on this machine there is a bottleneck somewhere else.

Thank you to those who responded.

BR, Lars.
Happy to know friend opencl is working. If the performance improvements aren't satisfactory then maybe look for any tuning on Darktable's side.
Then see if opencl itself has any configurations.
Check GPU metrics while running darktable and see if load is close to 100% or not; if not then certain tuning
on before-mentioned items has to be done. For GPU metrics you look for "amdgpu_metrics.py" on github which is also mentioned in
amdgpu gentoo page. But I believe this is not realtime, but you can run in bash loop to capture realtime.

If you are not confortable with this code just look for real-time amggpumetrics display (mangohud does for game, IDK if it will do the same for OpenCL load, you can try).
Top
Post Reply

6 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy