Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't install amdgpu-pro-opencl
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 472

PostPosted: Sat Sep 28, 2024 4:36 pm    Post subject: Can't install amdgpu-pro-opencl Reply with quote

Hi all

I'm trying to install amdgpu-pro-opencl, in an attempt to get OpenCL support working with my AMQ Rx 460 GPU. I've already tried and failed with rocm-opencl-runtime, which I believe is supposed to work with the open-source amdgpu driver.

When I try to install amdgpu-pro-opencl I get this:

Code:
[ebuild  N F  ~] dev-libs/amdgpu-pro-opencl-20.40.1147286  ABI_X86="(64) -32"
Fetch instructions for dev-libs/amdgpu-pro-opencl-20.40.1147286:
 * Please download Radeon Software for Linux version 20.40 for Ubuntu 20.04.1 from
 *     https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-40
 * The archive should then be placed into your distfiles directory.


But the link given goes to a search page, not to a download, and I don't see any evidence of this 20.40 version of the Radeon software on the AMD website. And the Ubuntu support seems to be for 20.04.6.

The version numbers for the downloaded bits seem to be hard-coded into the .ebuild file.

The Gentoo documentation[1] for amdgpu-pro-opencl says:

"This package needs a new maintainer!"

I have to say I'm getting a bit frustrated here. I bought a new GPU -- one that I'm told works with OpenCL on Gentoo -- on the basis that I was advised that my old one stood no chance of working. Now it looks like the new one isn't going to work, either. I guess I could try to install the proprietary AMD driver stuff outside of Gentoo, but I really have no idea where to start, and I can't risk ending up with a system that doesn't work.

So, any suggestions gratefully accepted.

BR, Lars.

[1]https://packages.gentoo.org/packages/dev-libs/amdgpu-pro-opencl
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2691
Location: Here and Away Again

PostPosted: Sat Sep 28, 2024 5:43 pm    Post subject: Reply with quote

While the page is available via 'archive.org', the download itself does not seem to be, so that ebuild seems to be a lost cause unless AMD only moved the files somewhere else.

I did write an updated ebuild for it once, but that was a few years ago... and will not work as is either.

Additionally, Blender removed their OpenCL support, which would have been my main use for it, and HIP was becoming a thing replacing it (haven't tried that yet).

ROCm was also getting into the business, and I looked into it a bit but it did not quite work for me at the time... and from a quick look now, they officially only support cards starting from RDNA2 [1]... mine being from the previous genre I maybe guess (RX 5700 XT).

Looking at 'mesa', it seems that RX 460 might already be too new for OPenCL from there.

I'll try to look into this more soon(tm).

1. https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html#supported-distributions
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2127

PostPosted: Sat Sep 28, 2024 6:45 pm    Post subject: Reply with quote

I've an RX470, so IIUC a bit newer than the RX460, though both are old...
AFAIK I had it running until last month using rocm-opencl-runtime - I took it out 'cos something broke emerge (I think rocm-cmake moved, and I missed it in amongs Python/Ruby/Qt6/KDE6 and whatever).
I'm just trying to install it again, but it will take a little while - quite a large stack.

UPDATE
Just installed it, quicker than expected.
clinfo fails as reported above.
BUT
rocminfo produces lots of stuff - below.
AFAICT the first important messages in syslog are like the following:
Code:
 Sep 28 19:50:48 kernel: kfd kfd: amdgpu: Allocated 3969056 bytes on gart
 Sep 28 19:50:48 kernel: kfd kfd: amdgpu: Total number of KFD nodes to be created: 1
 Sep 28 19:50:48 kernel: kfd kfd: amdgpu: added device 1002:67df
Without that, IIUC the kernel hasn't contacted the GPU.

OK, lots of rocminfo, uing rocm-opencl-runtime and its pals:
Code:
packager@ryzen ~ $ rocminfo
=====================   
HSA System Attributes   
=====================   
Runtime Version:         1.1
Runtime Ext Version:     1.4
System Timestamp Freq.:  1000.000000MHz
Sig. Max Wait Duration:  18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)
Machine Model:           LARGE                             
System Endianness:       LITTLE                             
Mwaitx:                  DISABLED
DMAbuf Support:          YES

==========               
HSA Agents               
==========               
*******                 
Agent 1                 
*******                 
  Name:                    AMD Ryzen 9 5950X 16-Core Processor
  Uuid:                    CPU-XX                             
  Marketing Name:          AMD Ryzen 9 5950X 16-Core Processor
  Vendor Name:             CPU                               
  Feature:                 None specified                     
  Profile:                 FULL_PROFILE                       
  Float Round Mode:        NEAR                               
  Max Queue Number:        0(0x0)                             
  Queue Min Size:          0(0x0)                             
  Queue Max Size:          0(0x0)                             
  Queue Type:              MULTI                             
  Node:                    0                                 
  Device Type:             CPU                               
  Cache Info:             
    L1:                      32768(0x8000) KB                   
  Chip ID:                 0(0x0)                             
  ASIC Revision:           0(0x0)                             
  Cacheline Size:          64(0x40)                           
  Max Clock Freq. (MHz):   5084                               
  BDFID:                   0                                 
  Internal Node ID:        0                                 
  Compute Unit:            32                                 
  SIMDs per CU:            0                                 
  Shader Engines:          0                                 
  Shader Arrs. per Eng.:   0                                 
  WatchPts on Addr. Ranges:1                                 
  Features:                None
  Pool Info:               
    Pool 1                   
      Segment:                 GLOBAL; FLAGS: FINE GRAINED       
      Size:                    32770688(0x1f40a80) KB             
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                               
      Alloc Recommended Granule:4KB                               
      Alloc Alignment:         4KB                               
      Accessible by all:       TRUE                               
    Pool 2                   
      Segment:                 GLOBAL; FLAGS: KERNARG, FINE GRAINED
      Size:                    32770688(0x1f40a80) KB             
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                               
      Alloc Recommended Granule:4KB                               
      Alloc Alignment:         4KB                               
      Accessible by all:       TRUE                               
    Pool 3                   
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED     
      Size:                    32770688(0x1f40a80) KB             
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                               
      Alloc Recommended Granule:4KB                               
      Alloc Alignment:         4KB                               
      Accessible by all:       TRUE                               
  ISA Info:               
*******                 
Agent 2                 
*******                 
  Name:                    gfx803                             
  Uuid:                    GPU-XX                             
  Marketing Name:          AMD Radeon RX 570 Series           
  Vendor Name:             AMD                               
  Feature:                 KERNEL_DISPATCH                   
  Profile:                 BASE_PROFILE                       
  Float Round Mode:        NEAR                               
  Max Queue Number:        128(0x80)                         
  Queue Min Size:          64(0x40)                           
  Queue Max Size:          131072(0x20000)                   
  Queue Type:              MULTI                             
  Node:                    1                                 
  Device Type:             GPU                               
  Cache Info:             
    L1:                      16(0x10) KB                       
  Chip ID:                 26591(0x67df)                     
  ASIC Revision:           1(0x1)                             
  Cacheline Size:          64(0x40)                           
  Max Clock Freq. (MHz):   1280                               
  BDFID:                   2560                               
  Internal Node ID:        1                                 
  Compute Unit:            32                                 
  SIMDs per CU:            4                                 
  Shader Engines:          4                                 
  Shader Arrs. per Eng.:   1                                 
  WatchPts on Addr. Ranges:4                                 
  Coherent Host Access:    FALSE                             
  Features:                KERNEL_DISPATCH
  Fast F16 Operation:      TRUE                               
  Wavefront Size:          64(0x40)                           
  Workgroup Max Size:      1024(0x400)                       
  Workgroup Max Size per Dimension:
    x                        1024(0x400)                       
    y                        1024(0x400)                       
    z                        1024(0x400)                       
  Max Waves Per CU:        40(0x28)                           
  Max Work-item Per CU:    2560(0xa00)                       
  Grid Max Size:           4294967295(0xffffffff)             
  Grid Max Size per Dimension:
    x                        4294967295(0xffffffff)             
    y                        4294967295(0xffffffff)             
    z                        4294967295(0xffffffff)             
  Max fbarriers/Workgrp:   32                                 
  Packet Processor uCode:: 730                               
  SDMA engine uCode::      58                                 
  IOMMU Support::          None                               
  Pool Info:               
    Pool 1                   
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED     
      Size:                    4194304(0x400000) KB               
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                               
      Alloc Recommended Granule:2048KB                             
      Alloc Alignment:         4KB                               
      Accessible by all:       FALSE                             
    Pool 2                   
      Segment:                 GLOBAL; FLAGS: EXTENDED FINE GRAINED
      Size:                    4194304(0x400000) KB               
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                               
      Alloc Recommended Granule:2048KB                             
      Alloc Alignment:         4KB                               
      Accessible by all:       FALSE                             
    Pool 3                   
      Segment:                 GROUP                             
      Size:                    64(0x40) KB                       
      Allocatable:             FALSE                             
      Alloc Granule:           0KB                               
      Alloc Recommended Granule:0KB                               
      Alloc Alignment:         0KB                               
      Accessible by all:       FALSE                             
  ISA Info:               
    ISA 1                   
      Name:                    amdgcn-amd-amdhsa--gfx803         
      Machine Models:          HSA_MACHINE_MODEL_LARGE           
      Profiles:                HSA_PROFILE_BASE                   
      Default Rounding Mode:   NEAR                               
      Default Rounding Mode:   NEAR                               
      Fast f16:                TRUE                               
      Workgroup Max Size:      1024(0x400)                       
      Workgroup Max Size per Dimension:
        x                        1024(0x400)                       
        y                        1024(0x400)                       
        z                        1024(0x400)                       
      Grid Max Size:           4294967295(0xffffffff)             
      Grid Max Size per Dimension:
        x                        4294967295(0xffffffff)             
        y                        4294967295(0xffffffff)             
        z                        4294967295(0xffffffff)             
      FBarrier Max Size:       32                                 
*** Done ***

_________________
Greybeard
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 472

PostPosted: Sun Sep 29, 2024 9:13 am    Post subject: Reply with quote

Thanks.

With rocm-opencl-runtime, I find that rocminfo seems to produce meaningful output, but clinfo doesn't work. I tried a trivial OpenCL test program, and that failed in the same way. The failure is in clGetPlatformIDs(), which seems to be the first thing that any OpenCL program does. So I suspect that, despite rocminfo appearing to work, anything that actually uses OpenCL will fail immediately.

Another forum user has kindly sent me the Ubuntu package that amdgpu-pro-openc needs. So I was able to install it, and clinfo now seems to do the right thing, and simple test programs work.

To see if it really works, though, I'll need to build Darktable with OpenCL support, which first seems to require rebuilding gcc with Graphite support (whatever that is). So I guess it's going to be some days before I have an answer.

As others have said, ROCm seems to support only a limited range of GPUs, yet the Gentoo documentation positions it as the way forward. Even `emerge amdgpu-pro-openc` displays a message discouraging its use in favour of ROCm. But maybe there is a need still for the proprietary stuff? It's a shame that it's so fiddly to install at present.

BR, Lars.
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2127

PostPosted: Sun Sep 29, 2024 12:46 pm    Post subject: Reply with quote

I tried chasing down the failure in clinfo. There are several threads in various fora about this. Some say installing ncurses-compat to get libtinfo.so.5 fixes it, but it doesn't for me at least. There are messages in syslog "Failed to map bo to gpuvm" that appear to be relevant.

I'm going to be away from my kit with the RX470 for a week, so that's as far as I'll get for now.
An application test - enabling OpenCl in libreoffice settings, causes libreoffice to die on the next restart, and the next restart after that works, but libreoffice reset the OpenCl support off.
_________________
Greybeard
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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