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  
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3329

PostPosted: Tue Mar 20, 2018 12:40 am    Post subject: Reply with quote

Did brief battle again tonight. If I add USE=opencl mandelbulber fails to build because cl.hpp is a dangling symlink. So after looking through this thread a bit more, I installed opencl-clhpp from the science overlay. I know there is a fixed version in the zucca overlay, but it's not in stock layman and I didn't feel like looking up the pointer to it - yet. Anyway, the stock installation from science overlay drops the files in /usr/include/CL - not where they're being looked for. So I added a few symlinks:
Code:
# ls -l /usr/include/CL
total 0
lrwxrwxrwx 1 root root 15 Mar 19 20:28 cl2.hpp -> /usr/CL/cl2.hpp
lrwxrwxrwx 1 root root 49 Mar 17 22:16 cl_egl.h -> //usr/lib64/OpenCL/global/include/CL-1.2/cl_egl.h
lrwxrwxrwx 1 root root 49 Mar 17 22:16 cl_ext.h -> //usr/lib64/OpenCL/global/include/CL-1.2/cl_ext.h
lrwxrwxrwx 1 root root 52 Mar 17 22:16 cl_gl_ext.h -> //usr/lib64/OpenCL/global/include/CL-1.2/cl_gl_ext.h
lrwxrwxrwx 1 root root 48 Mar 17 22:16 cl_gl.h -> //usr/lib64/OpenCL/global/include/CL-1.2/cl_gl.h
lrwxrwxrwx 1 root root 45 Mar 17 22:16 cl.h -> //usr/lib64/OpenCL/global/include/CL-1.2/cl.h
lrwxrwxrwx 1 root root 14 Mar 19 20:28 cl.hpp -> /usr/CL/cl.hpp
lrwxrwxrwx 1 root root 43 Feb 25 19:56 cl.hpp-orig -> ../../lib64/OpenCL/global/include/CL/cl.hpp
lrwxrwxrwx 1 root root 54 Mar 17 22:16 cl_platform.h -> //usr/lib64/OpenCL/global/include/CL-1.2/cl_platform.h
lrwxrwxrwx 1 root root 49 Mar 17 22:16 opencl.h -> //usr/lib64/OpenCL/global/include/CL-1.2/opencl.h


With this, mandelbulber builds. But as soon as I go into preferences and try to enable OpenCL, it segfaults. Soon I'll look a bit harder and get the zucca version of opencl-clhpp and see if that's any better. Enough fiddling for tonight. I don't stay up as late as I used to.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1299
Location: KUUSANKOSKI, Finland

PostPosted: Tue Mar 20, 2018 10:00 am    Post subject: Reply with quote

depontius wrote:
Soon I'll look a bit harder and get the zucca version of opencl-clhpp and see if that's any better.
It's not any better than your current manual symlinking. :( It only has -DCMAKE_INSTALL_PREFIX adjusted correctly so that the files get installed into the right directory.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3329

PostPosted: Tue Mar 20, 2018 7:40 pm    Post subject: Reply with quote

Zucca wrote:
depontius wrote:
Soon I'll look a bit harder and get the zucca version of opencl-clhpp and see if that's any better.
It's not any better than your current manual symlinking. :( It only has -DCMAKE_INSTALL_PREFIX adjusted correctly so that the files get installed into the right directory.


Are you able to run mandelbulber with OpenCL on your setup? I don't think of eselect stuff as really being "in the path" more setting the paths for other packages. With that, the big difference I see between us is that you're getting ocl-icd from gentoo-gpu and I'm getting it from the base.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1299
Location: KUUSANKOSKI, Finland

PostPosted: Sun Apr 29, 2018 8:39 pm    Post subject: Reply with quote

This topic somehow got buried. :|
depontius wrote:
Are you able to run mandelbulber with OpenCL on your setup? I don't think of eselect stuff as really being "in the path" more setting the paths for other packages. With that, the big difference I see between us is that you're getting ocl-icd from gentoo-gpu and I'm getting it from the base.
Yes. I can use OpenCL with every program I have installed which uses it.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
kanyck
n00b
n00b


Joined: 06 Jan 2013
Posts: 19
Location: St.Petersburg, Russia

PostPosted: Tue May 08, 2018 7:56 am    Post subject: Reply with quote

Hi!
Zucca wrote:
This topic somehow got buried. :|

Not yet. I have exactly the same problem with fresh 18.10
Previously I tried 17.XX, they *almost* work, but produced artifacts (looking much alike a corrupted memory) on my Cape Verde GCN 1.0 card with darktable and all other apps I tried.
After the upgrade I got
Code:
Number of platforms                               0

no matter what I tried...
Everything looks just fine but doesn't work...
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1299
Location: KUUSANKOSKI, Finland

PostPosted: Tue May 08, 2018 7:06 pm    Post subject: Reply with quote

I'm in the middle of a huge rebuild process (and qt5 causing many blockers). After I've adjusted all the USE -flags and rebuilt many packages I'll see if I stuble upon any problems mentioned in this trhead and then try to create a solution for it.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
kanyck
n00b
n00b


Joined: 06 Jan 2013
Posts: 19
Location: St.Petersburg, Russia

PostPosted: Tue May 08, 2018 8:05 pm    Post subject: Reply with quote

Oh! Thanks! But I'm starting to think it's a hit-and-miss to some extent (however, that's what ebuild comment exactly says, so no wander). I've no idea how two libdrm-s can co-exist together, for example.

JFYI: This thread is about 18.20 beta.
https://www.phoronix.com/forums/forum/phoronix/latest-phoronix-articles/1022861-radeon-software-18-20-preview-offers-early-support-for-ubuntu-18-04-lts-rhel-7-5
It says that dkms driver is stiil needed to run opencl. However my experience is different. I tried both amdgpu-pro-17.40 (full stack) with dkms driver for kernel 4.9 and open stack plus amdgpu-pro-opencl with exactly the same result: kinda works but produces artifacts on my 7770...
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5010

PostPosted: Wed May 09, 2018 12:39 am    Post subject: Reply with quote

I'm bored so I gave this a try. Getting the same 0 platforms thing.

Sequence of events so far:
  • Rebuilt my system with USE=opencl globally (no amdgpu-pro at this point)
  • Verified that clinfo detects my GPU (a RX550)
  • Verified that clover runs exactly zero interesting opencl programs
  • Installed amdgpu-pro-opencl-17.50-511655 (after doing a bunch of dodgy stuff I found in a web search[1] to obtain the distfile because it's been hidden from their site)
  • eselect opencl set ocl-icd, verified /usr/include/CL/ is in order
  • clinfo now returns nothing.

But: running it in strace, I can see it looking for amdoclsc64.so. The amdgpu-pro package didn't install that, and it doesn't seem to be present inside any of the .deb files within. Maybe that's the source of everyone's problem here?
[1]:
cd $DISTDIR
wget https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.50-511655.tar.xz --referer http://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-Release-Notes.aspx

_________________
*.ebuild // /etc/service/*
Back to top
View user's profile Send private message
kanyck
n00b
n00b


Joined: 06 Jan 2013
Posts: 19
Location: St.Petersburg, Russia

PostPosted: Wed May 09, 2018 6:21 am    Post subject: Reply with quote

18.10 doesn't have this file either. However they've changed some names. Here's my /opt/amdgpu with amdgpu-pro-opencl-18.10 installed:
Code:
[kanyck: ~]$ tree /opt/amdgpu/
/opt/amdgpu/
├── lib64
│   ├── libamdocl64.so
│   ├── libdrm_amdgpu.so.1 -> libdrm_amdgpu.so.1.0.0
│   └── libdrm_amdgpu.so.1.0.0
└── share
    └── libdrm
        └── amdgpu.ids

BTW I wander if there's a place to file bugs for amdgpu-pro. I tried few usual places, like kernel.org and freedesktop's bugzillas with no apparent success -- they all were ignored for months. On phoronix bridgman encouraged people to file bugs but never discovered where to, even being asked explicitly. And very few chances are to get help on phoronix, too. Meanwhile there are some things, like env vars, to be set to get apps working. Setting the following moved me one step further when I attempted this issue last time few months ago:
Code:
export GPU_FORCE_64BIT_PTR=1
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=90
export GPU_SINGLE_ALLOC_PERCENT=90
export GPU_MAX_HEAP_SIZE=90

I've found this on forums, but couldn't trace where those came from, neither if there are some other important things to get it working...
Back to top
View user's profile Send private message
xdarma
l33t
l33t


Joined: 08 Dec 2003
Posts: 614
Location: tra veneto e friuli (italy)

PostPosted: Tue May 15, 2018 7:45 pm    Post subject: Reply with quote

kanyck wrote:

BTW I wander if there's a place to file bugs for amdgpu-pro. I tried few usual places, like kernel.org and freedesktop's bugzillas with no apparent success -- they all were ignored for months. On phoronix bridgman encouraged people to file bugs but never discovered where to, even being asked explicitly. And very few chances are to get help on phoronix, too.

At the bottom of driver download page, there is a link: AMD Issue Reporting Form
A place with some information: AMD Support Community
_________________
proud user of faKeDE-4.7.3
Back to top
View user's profile Send private message
kanyck
n00b
n00b


Joined: 06 Jan 2013
Posts: 19
Location: St.Petersburg, Russia

PostPosted: Wed May 16, 2018 6:13 am    Post subject: Reply with quote

xdarma wrote:

At the bottom of driver download page, there is a link: AMD Issue Reporting Form
A place with some information: AMD Support Community

Oh! Thanks! I've never scrolled down that far :roll:
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3329

PostPosted: Thu May 17, 2018 7:04 pm    Post subject: Reply with quote

I haven't had time to fiddle with this for quite a while, though someday I'll get back to it. In the meantime, I saw this on Phoronix the other day, which seems relevant to this discussion. The comments are worth checking out, too.

https://www.phoronix.com/scan.php?page=news_item&px=ROCm-PAL-Future
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
azp
Guru
Guru


Joined: 16 Nov 2003
Posts: 420
Location: Stockholm, Sweden

PostPosted: Mon Jun 18, 2018 2:59 pm    Post subject: Reply with quote

Has anybody tried the getting OpenCL working with the 18.50 drivers yet? I modified an ebuild to fetch the new package, but I can't get it working. I get "Number of platforms 0" when I run clinfo.

Code:
peter@skare ~ $ ll /opt/amdgpu/lib64/
total 70M
-rwxr-xr-x 1 root root 70M 17 jun 20.53 libamdocl64.so*
lrwxrwxrwx 1 root root  22 17 jun 20.53 libdrm_amdgpu.so.1 -> libdrm_amdgpu.so.1.0.0*
-rwxr-xr-x 1 root root 55K 17 jun 20.53 libdrm_amdgpu.so.1.0.0*
lrwxrwxrwx 1 root root  15 17 jun 20.53 libdrm.so.2 -> libdrm.so.2.4.0*
-rwxr-xr-x 1 root root 83K 17 jun 20.53 libdrm.so.2.4.0*
lrwxrwxrwx 1 root root  15 17 jun 20.53 libkms.so.1 -> libkms.so.1.0.0*
-rwxr-xr-x 1 root root 15K 17 jun 20.53 libkms.so.1.0.0*
peter@skare ~ $ ll /opt/amdgpu/share/libdrm/
total 8,0K
-rw-r--r-- 1 root root 5,8K 17 jun 20.53 amdgpu.ids
peter@skare ~ $ eselect opencl list
Available OpenCL implementations:
  [1]   mesa
  [2]   ocl-icd *

_________________
Weeks of coding can save you hours of planning.
Back to top
View user's profile Send private message
happysmash27
n00b
n00b


Joined: 28 Mar 2016
Posts: 35

PostPosted: Thu Jun 21, 2018 3:48 am    Post subject: Reply with quote

I have, but I have the exact same problem :/
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
Page 4 of 4

 
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