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

Goto page Previous  1, 2, 3, 4, 5  
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
ali3nx
l33t
l33t


Joined: 21 Sep 2003
Posts: 722
Location: Winnipeg, Canada

PostPosted: Sat Jul 07, 2018 3:44 am    Post subject: Reply with quote

candrews wrote:
For what it's worth, all I had to do to get working opencl support was:
* use ~amd64
* use a recent kernel (4.17 is what I'm using)
* use the amdgpu driver
* set the "opencl" use flag globally
* emerge dev-libs/amdgpu-pro-opencl (currently version 18.20.606296)
* make sure "ocl-icd" is selcted in "eselect opencl list"

I'm not using any overlays.

dev-util/clinfo (again, not from any overlays) shows 1 platform named "AMD Accelerated Parallel Processing"

I suspect that there's a lot of cruft left over on systems from before it was this easy as well as some broken stuff being used from overlays. Please try to stick to what's in Gentoo without overlays (if you do find something great from overlay, get it into Gentoo), try to report bugs (thanks for reporting the clinfo one, ali3nx!) and submit PRs to fix things.



I greatly appreciate the effort getting amdgpu opencl functional on Gentoo requires. This working is single most significant remaining issue preventing me from ditching windows 10 on my amdgpu based gpu compute node.

I'm not using any overlays and according to the steps you've mentioned my setup should be working but it's not. There may be other reasons for that potentially continuing to be contributing complication.

The Gentoo build i'm currently using for testing this was modified from my systemd-plasma Gentoo chroot stage4 tarball so while it's not a "new build" from a days old stage tarball it's entirely plausible something with that chroot build has an issue preventing amdgpu opencl from functioning due to the way it was built from a stage3 tarball targeted at VIDEO_CARDS"=intel"

I also have support included for the intel igpu should i ever require use of the igpu as the video ports on the amd graphics cards are inaccessible due to being hung from zip ties.

If this has any potential for causing amdgpu based opencl to not function i'm unaware.

This config works with four other nvidia based gpu compute nodes running gentoo flawlessly however.

I may try a fresh build tomorrow or later this weekend with the G4560 system the four amd graphics cards are connected to test if there is any difference with results between a fresh build and using a 1000+ package prebuilt chroot build compiled in advance on a 20 core xeon gentoo server.
_________________
Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!
Back to top
View user's profile Send private message
kanyck
n00b
n00b


Joined: 06 Jan 2013
Posts: 28

PostPosted: Mon Jul 09, 2018 5:16 pm    Post subject: Reply with quote

candrews wrote:
For what it's worth, all I had to do to get working opencl support was:
* use ~amd64
* use a recent kernel (4.17 is what I'm using)
* use the amdgpu driver
* set the "opencl" use flag globally
* emerge dev-libs/amdgpu-pro-opencl (currently version 18.20.606296)
* make sure "ocl-icd" is selcted in "eselect opencl list"


There are two version of the 18.20.606296 package available for download: for Ubuntu 16.1 and 18. Which one did you use with 4.17 kernel?
Back to top
View user's profile Send private message
candrews
Developer
Developer


Joined: 10 Aug 2005
Posts: 162

PostPosted: Mon Jul 09, 2018 5:26 pm    Post subject: Reply with quote

kanyck wrote:
There are two version of the 18.20.606296 package available for download: for Ubuntu 16.1 and 18. Which one did you use with 4.17 kernel?


The one for 16 that the dev-libs/amdgpu-pro-opencl-18.20.606296 message says to use, of course :-) https://github.com/gentoo/gentoo/blob/77598281d459055d9c7c5975a767921e8afdd3e2/dev-libs/amdgpu-pro-opencl/amdgpu-pro-opencl-18.20.606296.ebuild#L30
_________________
I'm working on a variety of random things throughout Gentoo.
Back to top
View user's profile Send private message
kanyck
n00b
n00b


Joined: 06 Jan 2013
Posts: 28

PostPosted: Mon Jul 09, 2018 5:37 pm    Post subject: Reply with quote

candrews wrote:
The one for 16 that the dev-libs/amdgpu-pro-opencl-18.20.606296 message says to use, of course :-)

Yeah, I saw the message but thought it may be for kernel older than 4.17. AMD tends to use kernels older than current Gentoo to meet Ubuntu and SUSE releases. This made me hesitating.
Thanks for clearing things up!
Back to top
View user's profile Send private message
kanyck
n00b
n00b


Joined: 06 Jan 2013
Posts: 28

PostPosted: Sat Jul 14, 2018 8:36 am    Post subject: Reply with quote

I am still getting
Code:
Number of platforms                               0

on 18.20 as well... I'm afraid my GCN 1.0 card isn't supported in spite of the fact it's listed on the amdgpu-pro page...
Is there anything I can do to find out the exact reason?
Back to top
View user's profile Send private message
ali3nx
l33t
l33t


Joined: 21 Sep 2003
Posts: 722
Location: Winnipeg, Canada

PostPosted: Sat Jul 14, 2018 7:06 pm    Post subject: Reply with quote

kanyck wrote:
I am still getting
Code:
Number of platforms                               0

on 18.20 as well... I'm afraid my GCN 1.0 card isn't supported in spite of the fact it's listed on the amdgpu-pro page...
Is there anything I can do to find out the exact reason?


Which GPU model do you have exactly?

I did manage to get this all working last weekend after a full clean reinstall and the bug with clinfo turned out to not be a bug with clinfo but rather something was screwed with the opencl core system configuration within the stage4 tarball I used to initially build the system install. Both ethminer and clinfo would not find the opencl libraries or headers required to detect opencl devices.

One thing i think that did help is I compiled amdgpu and the correct GPU firmware into the kernel binary and used Linux 4.17 kernel version. First reboot after doing this on a clean reinstall and bravo... opencl working.

I also used the 18.20 amdgpu-pro-opencl package.

My GPU versions are 3 x sapphire nitro + RX 480 and 1x sapphire nitro+ RX 580
_________________
Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!
Back to top
View user's profile Send private message
kanyck
n00b
n00b


Joined: 06 Jan 2013
Posts: 28

PostPosted: Mon Jul 16, 2018 10:22 am    Post subject: Reply with quote

ali3nx wrote:
kanyck wrote:
I am still getting
Code:
Number of platforms                               0

on 18.20 as well...


Which GPU model do you have exactly?


I use Radeon HD7770. it used to work fine on fglrx (as far as fglrx could be fine). On amdgpu + opencl from 17.XX it kinda worked but produced artifacts on images while no error reported. Now I cannot get it work at all.
darktable-cltest reports the lib was found and loaded but then returns -1001 error.
Kernel 4.17 with firmware compiled into (no initramfs, so it's a must). mesa and libdrm are latest ~amd64. No idea where else to look... maybe I need unstable llvm/clang, too. Unfortunately I'm unclear with how opencl interoperates with the other parts and with which ones specifically, and I couldn't find any descriptions, so it's a hit-and-miss for me. Miss this far, though.
Back to top
View user's profile Send private message
ali3nx
l33t
l33t


Joined: 21 Sep 2003
Posts: 722
Location: Winnipeg, Canada

PostPosted: Mon Jul 16, 2018 12:55 pm    Post subject: Reply with quote

kanyck wrote:
I use Radeon HD7770. it used to work fine on fglrx (as far as fglrx could be fine). On amdgpu + opencl from 17.XX it kinda worked but produced artifacts on images while no error reported. Now I cannot get it work at all.
darktable-cltest reports the lib was found and loaded but then returns -1001 error.
Kernel 4.17 with firmware compiled into (no initramfs, so it's a must). mesa and libdrm are latest ~amd64. No idea where else to look... maybe I need unstable llvm/clang, too. Unfortunately I'm unclear with how opencl interoperates with the other parts and with which ones specifically, and I couldn't find any descriptions, so it's a hit-and-miss for me. Miss this far, though.


it's admirable you managed to keep a videocard running for eight years that was manufactured in 2011 but eventually everything needs a proper burial :)

https://en.wikipedia.org/wiki/Radeon_HD_7000_Series#Radeon_HD_7700

This thing has been on life support for years due to lack of driver support.
_________________
Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!
Back to top
View user's profile Send private message
kanyck
n00b
n00b


Joined: 06 Jan 2013
Posts: 28

PostPosted: Mon Jul 16, 2018 1:55 pm    Post subject: Reply with quote

ali3nx wrote:

it's admirable you managed to keep a videocard running for eight years that was manufactured in 2011 but eventually everything needs a proper burial :)

Not really.
The card was announced in 2012, bought in 2014. Its reincarnation under different name (R7 250X) was issued in 2014, too. AMD dumped fglrx in 2016, providing nothing in exchange, so I actually used it in full for less than 2 years. There have been constant promise that the next month/couple of month/... in the next release they'll fix what they have broken but it has never happened, however the card has been listed on AMD site as supported all that time. I'm not a gamer, and fully satisfied with the card in everything but broken opencl. And now I'm not sure that AMD won't repeat the trick once again and that I won't have to dump the newly bought card in another 2 years of use...
Back to top
View user's profile Send private message
azp
Guru
Guru


Joined: 16 Nov 2003
Posts: 456
Location: Sweden

PostPosted: Fri Feb 08, 2019 11:08 pm    Post subject: Reply with quote

Hi again guys. It seems like the ROCm and amdgpu (with the binary package) is quite stable now, so I was just wondering if some brave soul would go to the AMDGPU/OpenCL Gentoo wiki, to update the information there to something more current (and correct).
_________________
Weeks of coding can save you hours of planning.
Back to top
View user's profile Send private message
poe_1957
Apprentice
Apprentice


Joined: 26 Sep 2018
Posts: 192
Location: Mortsel

PostPosted: Fri Feb 15, 2019 9:37 pm    Post subject: Gentoo on AMD64 Reply with quote

:idea:
I would suggest tot up/downgrade to kernel 4.14.83. This is a stable kernel it worked for me perfectly on i5, and AMD Opteron Black edition as well with very old videocard from ATI and AMD.
Always starting from a good kernel is not a bad idea before using experimental solutions. :D
_________________
Linuxpioneer
ALUG
Back to top
View user's profile Send private message
pcmaster
Advocate
Advocate


Joined: 04 Dec 2003
Posts: 2218
Location: Barcelona

PostPosted: Tue Mar 26, 2019 5:18 pm    Post subject: Re: Gentoo on AMD64 Reply with quote

poe_1957 wrote:
:idea:
I would suggest tot up/downgrade to kernel 4.14.83. This is a stable kernel it worked for me perfectly on i5, and AMD Opteron Black edition as well with very old videocard from ATI and AMD.
Always starting from a good kernel is not a bad idea before using experimental solutions. :D


4.19 kernel has better performance on amdgpu-opencl. Try to use 18.20.606296 version, the last one (18.20.684755) in my case causes desktop issues (very poor performance when a program is using opencl)
_________________
pcmaster
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Goto page Previous  1, 2, 3, 4, 5
Page 5 of 5

 
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