Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #241393 > unrolled thread

AMD OpenCL support

Started bypiorunz <piorunz@gmx.com>
First post2021-10-16 23:30 +0200
Last post2021-10-19 02:20 +0200
Articles 9 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  AMD OpenCL support piorunz <piorunz@gmx.com> - 2021-10-16 23:30 +0200
    Re: AMD OpenCL support didier gaumet <didier.gaumet@gmail.com> - 2021-10-17 10:10 +0200
      Re: AMD OpenCL support piorunz <piorunz@gmx.com> - 2021-10-17 14:10 +0200
        Re: AMD OpenCL support Linux-Fan <Ma_Sys.ma@web.de> - 2021-10-17 23:00 +0200
          Re: AMD OpenCL support piorunz <piorunz@gmx.com> - 2021-10-18 00:10 +0200
            Re: AMD OpenCL support Linux-Fan <Ma_Sys.ma@web.de> - 2021-10-18 00:40 +0200
              Re: AMD OpenCL support piorunz <piorunz@gmx.com> - 2021-10-18 00:50 +0200
                Re: AMD OpenCL support Linux-Fan <Ma_Sys.ma@web.de> - 2021-10-18 15:10 +0200
                  Re: AMD OpenCL support piorunz <piorunz@gmx.com> - 2021-10-19 02:20 +0200

#241393 — AMD OpenCL support

Frompiorunz <piorunz@gmx.com>
Date2021-10-16 23:30 +0200
SubjectAMD OpenCL support
Message-ID<D8ZpE-4Lc-3@gated-at.bofh.it>
Hello,

How can I install AMD GPU OpenCL support?
I use open source AMD graphics driver, everything works perfectly. But I
don't have OpenCL support. AMD doesn't provide proprietary packages for
Debian I think.

I have installed:
$ dpkg -l | grep opencl
ii  mesa-opencl-icd:amd64                         20.3.5-1
            amd64        free implementation of the OpenCL API -- ICD
runtime
ii  ocl-icd-libopencl1:amd64                      2.2.14-2
            amd64        Generic OpenCL ICD Loader
ii  ocl-icd-libopencl1:i386                       2.2.14-2
            i386         Generic OpenCL ICD Loader
ii  opencl-c-headers                              3.0~2020.12.18-1
            all          OpenCL (Open Computing Language) C header files
ii  opencl-clhpp-headers                          3.0~2.0.13-1
            all          C++ headers for OpenCL development
ii  opencl-headers                                3.0~2020.12.18-1
            all          OpenCL (Open Computing Language) header files

But still, AMD OpenCL doesn't work. Any ideas?

--
With kindest regards, Piotr.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀

[toc] | [next] | [standalone]


#241396

Fromdidier gaumet <didier.gaumet@gmail.com>
Date2021-10-17 10:10 +0200
Message-ID<D99oZ-2E1-1@gated-at.bofh.it>
In reply to#241393
Hello,

Disclaimer: I have no AMD graphic card and have not personally tested
what is describe below

Right now with an AMD/ATI graphic card in Debian, the only OpenCL run-
time loader (ICD) present in the offical repos is the mesa one (mesa-
opencl-icd) that you have already installed.

If it not already installed, install the clinfo package and run clinfo
to have more informations about the status of your OpenCL setup.

Perhaps your claim of not having OpenCL support is erroneous and what
happens actually is you have uncomplete/unsufficent support for your
use case: a typical example is Darktable not having OpenCL image
support, this requiring more recent OpenCL implementation that the Mesa
one.

Then you would probably have to either:
- revert to use the proprietary amdgpu-pro driver (including an AMD
ICD) instead of the free amdgpu one
https://www.amd.com/en/support/kb/faq/amdgpu-installation
- or continue using the free amdgpu driver but install ROCm (AMD ICD)
https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html
- or continue using the free amdgpu driver but install the ICD subset
of the proprietary driver
https://linuxconfig.org/install-opencl-for-the-amdgpu-open-source-drivers-on-debian-and-ubuntu

[toc] | [prev] | [next] | [standalone]


#241403

Frompiorunz <piorunz@gmx.com>
Date2021-10-17 14:10 +0200
Message-ID<D9d9f-4Xr-5@gated-at.bofh.it>
In reply to#241396
On 17/10/2021 09:00, didier gaumet wrote:
>
> Hello,
>
> Disclaimer: I have no AMD graphic card and have not personally tested
> what is describe below

Thanks for your reply and thoughts.

> Right now with an AMD/ATI graphic card in Debian, the only OpenCL run-
> time loader (ICD) present in the offical repos is the mesa one (mesa-
> opencl-icd) that you have already installed.

> If it not already installed, install the clinfo package and run clinfo
> to have more informations about the status of your OpenCL setup.

Yes I have that mesa version of OpenCL installed. Unfortunately, this
version is too old and not recognized. I need OpenCL 1.2 at least I
think. clinfo says, among many other things:
   Device Version                                  OpenCL 1.1 Mesa 20.3.5
   Driver Version                                  20.3.5
   Device OpenCL C Version                         OpenCL C 1.1


> Perhaps your claim of not having OpenCL support is erroneous and what
> happens actually is you have uncomplete/unsufficent support for your
> use case: a typical example is Darktable not having OpenCL image
> support, this requiring more recent OpenCL implementation that the Mesa
> one.
>
> Then you would probably have to either:
> - revert to use the proprietary amdgpu-pro driver (including an AMD
> ICD) instead of the free amdgpu one

> https://www.amd.com/en/support/kb/faq/amdgpu-installation

This procedure requires downloading .deb drivers from
https://support.amd.com/en-us/download. Only distros supported are
Ubuntu 18.04.5 HWE, Ubuntu 20.04.3. They will most likely fail in Debian.

> - or continue using the free amdgpu driver but install ROCm (AMD ICD)
> https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html

I spend some time testing this, best I got is ROCm 3.3 with only one
error (is breaks package "python" which doesn't even exist in debian).
Newer ROCm versions have many package breaks, therefore cannot be installed.

> - or continue using the free amdgpu driver but install the ICD subset
> of the proprietary driver
> https://linuxconfig.org/install-opencl-for-the-amdgpu-open-source-drivers-on-debian-and-ubuntu

I will try this solution next.


--
With kindest regards, Piotr.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀

[toc] | [prev] | [next] | [standalone]


#241426

FromLinux-Fan <Ma_Sys.ma@web.de>
Date2021-10-17 23:00 +0200
Message-ID<D9lq9-1L0-3@gated-at.bofh.it>
In reply to#241403

[Multipart message — attachments visible in raw view] — view raw

piorunz writes:

> On 17/10/2021 09:00, didier gaumet wrote:

[...]

> Yes I have that mesa version of OpenCL installed. Unfortunately, this
> version is too old and not recognized. I need OpenCL 1.2 at least I
> think. clinfo says, among many other things:
>   Device Version                                  OpenCL 1.1 Mesa 20.3.5
>   Driver Version                                  20.3.5
>   Device OpenCL C Version                         OpenCL C 1.1
>
>> Perhaps your claim of not having OpenCL support is erroneous and what
>> happens actually is you have uncomplete/unsufficent support for your
>> use case: a typical example is Darktable not having OpenCL image
>> support, this requiring more recent OpenCL implementation that the Mesa
>> one.
>>
>> Then you would probably have to either:
>> - revert to use the proprietary amdgpu-pro driver (including an AMD
>> ICD) instead of the free amdgpu one
>
>> https://www.amd.com/en/support/kb/faq/amdgpu-installation
>
> This procedure requires downloading .deb drivers from
> https://support.amd.com/en-us/download. Only distros supported are
> Ubuntu 18.04.5 HWE, Ubuntu 20.04.3. They will most likely fail in Debian.

[...]

Hello,

I happened to have some issues wrt. a bug similar to this:
https://bugs.freedesktop.org/show_bug.cgi?id=111481

There, the suggested fix is to switch to amdgpu-pro (which seems to remedy  
the issue but not entirely...) which lead me to try the `.deb` files from  
AMD. I downloaded `amdgpu-pro-21.20-1292797-ubuntu-20.04.tar.xz` and it  
seems to have installed just fine.

As a result, I should be running the proprietary driver now and thus have  
OpenCL running -- I only ever tested it with a demo application, though...

Excerpt from clinfo:

~~~
  Platform Name:				 AMD Accelerated Parallel Processing
Number of devices:				 1
  Device Type:					 CL_DEVICE_TYPE_GPU
  Device OpenCL C version:			 OpenCL C 2.0
  Driver version:				 3261.0 (HSA1.1,LC)
  Profile:					 FULL_PROFILE
  Version:					 OpenCL 2.0
~~~

btw. I do not seem to have a `Device Version` string in there?

~~~
# dpkg -l | grep opencl | cut -c -90
ii  amdgpu-pro-rocr-opencl                            21.20-1292797                       
ii  ocl-icd-libopencl1:amd64                          2.2.14-2                            
ii  ocl-icd-libopencl1:i386                           2.2.14-2                            
ii  ocl-icd-libopencl1-amdgpu-pro:amd64               21.20-1292797                       
ii  ocl-icd-libopencl1-amdgpu-pro-dev:amd64           21.20-1292797                       
ii  ocl-icd-opencl-dev:amd64                          2.2.14-2                            
ii  opencl-base                                       1.2-4.4.0.117                       
ii  opencl-c-headers                                  3.0~2020.12.18-1                    
ii  opencl-clhpp-headers                              3.0~2.0.13-1                        
ii  opencl-headers                                    3.0~2020.12.18-1                    
ii  opencl-intel-cpu                                  1.2-4.4.0.117                       
ii  opencl-orca-amdgpu-pro-icd:amd64                  21.20-1292797                       
ii  opencl-rocr-amdgpu-pro:amd64                      21.20-1292797                       
ii  opencl-rocr-amdgpu-pro-dev:amd64                  21.20-1292797
~~~

To summarize: It might be worth trying the Ubuntu-.debs out on Debian.
Although its not a "clean" solution by any means, it might "just work"?

HTH
Linux-Fan

öö

[toc] | [prev] | [next] | [standalone]


#241431

Frompiorunz <piorunz@gmx.com>
Date2021-10-18 00:10 +0200
Message-ID<D9mvT-2Fk-3@gated-at.bofh.it>
In reply to#241426
On 17/10/2021 21:50, Linux-Fan wrote:

> There, the suggested fix is to switch to amdgpu-pro (which seems to
> remedy the issue but not entirely...) which lead me to try the `.deb`
> files from AMD. I downloaded
> `amdgpu-pro-21.20-1292797-ubuntu-20.04.tar.xz` and it seems to have
> installed just fine.

Can't install that on my Debian Bullseye. I have clean system with
nothing modified or added from outside of Debian.

Result:
sudo ./amdgpu-install --opencl=legacy,rocr
(...)
Loading new amdgpu-5.11.19.98-1290604 DKMS files...
Building for 5.10.0-9-amd64
Building for architecture amd64
Building initial module for 5.10.0-9-amd64
Error! Bad return status for module build on kernel: 5.10.0-9-amd64 (amd64)
Consult /var/lib/dkms/amdgpu/5.11.19.98-1290604/build/make.log for more
information.
dpkg: error processing package amdgpu-dkms (--configure):
  installed amdgpu-dkms package post-installation script subprocess
returned error exit status 10

make.log shows:
(...)
/var/lib/dkms/amdgpu/5.11.19.98-1290604/build/Makefile:26: "Local GCC
version 100202 does not match kernel compiler GCC version 100201"
/var/lib/dkms/amdgpu/5.11.19.98-1290604/build/Makefile:27: "This may
cause unexpected and hard-to-isolate compiler-related issues"
   MODPOST /var/lib/dkms/amdgpu/5.11.19.98-1290604/build/Module.symvers
ERROR: modpost: "migrate_vma_finalize"
[/var/lib/dkms/amdgpu/5.11.19.98-1290604/build/amd/amdgpu/amdgpu.ko]
undefined!
ERROR: modpost: "migrate_vma_pages"
[/var/lib/dkms/amdgpu/5.11.19.98-1290604/build/amd/amdgpu/amdgpu.ko]
undefined!
ERROR: modpost: "migrate_vma_setup"
[/var/lib/dkms/amdgpu/5.11.19.98-1290604/build/amd/amdgpu/amdgpu.ko]
undefined!
ERROR: modpost: "devm_request_free_mem_region"
[/var/lib/dkms/amdgpu/5.11.19.98-1290604/build/amd/amdgpu/amdgpu.ko]
undefined!
make[2]: ***
[/usr/src/linux-headers-5.10.0-9-common/scripts/Makefile.modpost:124:
/var/lib/dkms/amdgpu/5.11.19.98-1290604/build/Module.symvers] Error 1
make[2]: *** Deleting file
'/var/lib/dkms/amdgpu/5.11.19.98-1290604/build/Module.symvers'
make[1]: *** [/usr/src/linux-headers-5.10.0-9-common/Makefile:1750:
modules] Error 2
make: *** [/usr/src/linux-headers-5.10.0-9-common/Makefile:185:
__sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-5.10.0-9-amd64'

I tried various attempts:
sudo ./amdgpu-install --opencl=rocr --headless
sudo ./amdgpu-install
sudo ./amdgpu-install --opencl=rocr

Same result each time, something with compiling amdgpu-dkms.


>
> As a result, I should be running the proprietary driver now and thus
> have OpenCL running -- I only ever tested it with a demo application,
> though...

I'd love that, but it fails on my system. What system do you have? How
did you do it?

--
With kindest regards, Piotr.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀

[toc] | [prev] | [next] | [standalone]


#241432

FromLinux-Fan <Ma_Sys.ma@web.de>
Date2021-10-18 00:40 +0200
Message-ID<D9mYV-2OA-1@gated-at.bofh.it>
In reply to#241431

[Multipart message — attachments visible in raw view] — view raw

piorunz writes:

> On 17/10/2021 21:50, Linux-Fan wrote:
>
>> There, the suggested fix is to switch to amdgpu-pro (which seems to
>> remedy the issue but not entirely...) which lead me to try the `.deb`
>> files from AMD. I downloaded
>> `amdgpu-pro-21.20-1292797-ubuntu-20.04.tar.xz` and it seems to have
>> installed just fine.
>
> Can't install that on my Debian Bullseye. I have clean system with
> nothing modified or added from outside of Debian.
>
> Result:
> sudo ./amdgpu-install --opencl=legacy,rocr
> (...)
> Loading new amdgpu-5.11.19.98-1290604 DKMS files...
                                ^^^^^^^

Our driver versions seem to differ. I have 5.11.5.30-1292797 rather than  
5.11.19.98-1290604. It has the following SHA-256 sum:

ef242adeaa84619cea4a51a2791553a7a7904448dde81159ee2128221efe8e50
amdgpu-pro-21.20-1292797-ubuntu-20.04.tar.xz

Back then, I got it from https://www.amd.com/en/support/professional- 
graphics/radeon-pro/radeon-pro-w5000-series/radeon-pro-w5500 under
"Radeon(TM) Pro Software for Enterprise on Ubuntu 20.04.2" and the download  
still seems to point to a file with the same SHA-256 sum.

It could be worth trying the exact same version that I used?

[...]

> I tried various attempts:
> sudo ./amdgpu-install --opencl=rocr --headless
> sudo ./amdgpu-install
> sudo ./amdgpu-install --opencl=rocr
>
> Same result each time, something with compiling amdgpu-dkms.

I used ./amdgpu-pro-install without additional arguments. It is a symlink  
to the same script but the script executes different code if invoked with  
the `-pro` inserted. Not sure if it will make a difference, though.

After successful installation with `./amdgpu-pro-install` I installed  
additional packages from the repository added by the `amdgpu-pro-install` in  
order to enable the OpenCL features.

>> As a result, I should be running the proprietary driver now and thus
>> have OpenCL running -- I only ever tested it with a demo application,
>> though...
>
> I'd love that, but it fails on my system. What system do you have? How
> did you do it?

[...]

Debian 11 Bullseye. Before writing this post, I was still on kernel
5.10.0-8-amd64, but I just upgraded and the DKMS compiled successfully for  
the new 5.10.0-9-amd64.

Differences between our systems seem to be as follows:

 - Minor version difference in proprietary drivers
 - I installed by using the symlink with `-pro` in its name

I might add that I have installed a bunch of firmware from non-free and am  
running ZFS on Linux as provided by non-free package `zfs-dkms`.

HTH
Linux-Fan

öö

[toc] | [prev] | [next] | [standalone]


#241434

Frompiorunz <piorunz@gmx.com>
Date2021-10-18 00:50 +0200
Message-ID<D9n8B-2RX-7@gated-at.bofh.it>
In reply to#241432
On 17/10/2021 23:31, Linux-Fan wrote:
> Back then, I got it from
> https://www.amd.com/en/support/professional-graphics/radeon-pro/radeon-pro-w5000-series/radeon-pro-w5500
> under
> "Radeon(TM) Pro Software for Enterprise on Ubuntu 20.04.2" and the
> download still seems to point to a file with the same SHA-256 sum.
>
> It could be worth trying the exact same version that I used?

Thanks for your reply.

I have Radeon 6900XT, which is different type of card. Not sure if
https://www.amd.com/en/support/professional-graphics/radeon-pro/radeon-pro-w5000-series/radeon-pro-w5500
will work for me?

--
With kindest regards, Piotr.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀

[toc] | [prev] | [next] | [standalone]


#241454

FromLinux-Fan <Ma_Sys.ma@web.de>
Date2021-10-18 15:10 +0200
Message-ID<D9AyR-33m-3@gated-at.bofh.it>
In reply to#241434

[Multipart message — attachments visible in raw view] — view raw

piorunz writes:

> On 17/10/2021 23:31, Linux-Fan wrote:
>> Back then, I got it from
>> https://www.amd.com/en/support/professional-graphics/radeon-pro/radeon-pro- 
>> w5000-series/radeon-pro-w5500
>> under
>> "Radeon(TM) Pro Software for Enterprise on Ubuntu 20.04.2" and the
>> download still seems to point to a file with the same SHA-256 sum.
>>
>> It could be worth trying the exact same version that I used?
>
> Thanks for your reply.
>
> I have Radeon 6900XT, which is different type of card. Not sure if
> https://www.amd.com/en/support/professional-graphics/radeon-pro/radeon-pro- 
> w5000-series/radeon-pro-w5500
> will work for me?

I use a Radeon Pro W5500.

AMDs website leads me to
https://www.amd.com/de/support/graphics/amd-radeon-6000-series/amd-radeon-6900-series/amd-radeon-rx-6900-xt
for your GPU and proposes to download "Radon(TM) Software for Linux Driver  
for Ubuntu 20.04.3" which seems to be a different TGZ than what I am using  
(it has 1290604 vs. 1292797).

I cannot find the list of compatible GPUs for the particular package I have  
downloaded, the documentation only tells me about "Stack Variants" quoting  
from it (amdgpu graphis and compute stack 21.20 from the TGZ with 1292797):

| There are two major stack variants available for installation:
|
|  * Pro: recommended for use with Radeon Pro graphics products.
|  * All-Open: recommended for use with consumer products.

Hence it is clear that AMD proposes using the "amdgpu-pro" only with the  
"Radon Pro" graphics cards. Whether that also means that the driver is  
incompatible with "consumer products", I do not know.

Searching online yields these links:

 * https://wiki.debian.org/AMDGPUDriverOnStretchAndBuster2
 * https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-21-20

The second page indicates that "AMD Radeon™ RX 6900/6800/6700 Series  
Graphics" are compatible with the "Radeon(TM) Software for Linux(R) 21.20".  
Now whether that document is the correct one to correspond with my  
downloaded TGZ I cannot really tell. But if they match, it may as well  
indicate that it is possible to use that driver with your GPU, too.

HTH
Linux-Fan

öö

[...]

[toc] | [prev] | [next] | [standalone]


#241480

Frompiorunz <piorunz@gmx.com>
Date2021-10-19 02:20 +0200
Message-ID<D9L1g-14A-1@gated-at.bofh.it>
In reply to#241454
On 18/10/2021 14:06, Linux-Fan wrote:

> I use a Radeon Pro W5500.
>
> AMDs website leads me to
> https://www.amd.com/de/support/graphics/amd-radeon-6000-series/amd-radeon-6900-series/amd-radeon-rx-6900-xt
>
> for your GPU and proposes to download "Radon(TM) Software for Linux
> Driver for Ubuntu 20.04.3" which seems to be a different TGZ than what I
> am using (it has 1290604 vs. 1292797).

I already tried that. Please see my post dated 17/10/2021, 22:59. I have
error:
dpkg: error processing package amdgpu-dkms (--configure):
  installed amdgpu-dkms package post-installation script subprocess
returned error exit status 10

I am kinda lost at the moment. :|

--
With kindest regards, Piotr.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web