Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
AMD RX 460 GPU and OpenCL
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 522

PostPosted: Fri Sep 27, 2024 2:51 pm    Post subject: AMD RX 460 GPU and OpenCL Reply with quote

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:
$ 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
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1921

PostPosted: Fri Sep 27, 2024 11:52 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 522

PostPosted: Sat Sep 28, 2024 3:24 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1921

PostPosted: Sat Sep 28, 2024 4:00 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 522

PostPosted: Sun Sep 29, 2024 3:40 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
ritzmax72
Tux's lil' helper
Tux's lil' helper


Joined: 10 Aug 2014
Posts: 114

PostPosted: Sat Nov 02, 2024 10:16 am    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum