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  Next  
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3774
Location: Rasi, Finland

PostPosted: Wed Feb 28, 2018 10:17 am    Post subject: Reply with quote

Looking good. Does clinfo now show that you use something else than Mesa Clover?
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
bronzeboyvn
n00b
n00b


Joined: 31 Mar 2009
Posts: 58
Location: Vietnam

PostPosted: Wed Feb 28, 2018 10:34 am    Post subject: Reply with quote

it returns 1 line: Number of platforms 0
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3774
Location: Rasi, Finland

PostPosted: Wed Feb 28, 2018 11:53 am    Post subject: Reply with quote

bronzeboyvn wrote:
it returns 1 line: Number of platforms 0
Something is overriding the symlinks, I guess.
Let's see which package then owns the files the symlinks point to. Please paste the outout of:
Code:
find /usr/include/CL/ -type l -exec equery b {} +


EDIT:
You can try to re-set the symlinks by running:
run as root:
eselect opencl --use-old

Then if that succeeds, you should have different symlinks inside /usr/include/CL/.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
bronzeboyvn
n00b
n00b


Joined: 31 Mar 2009
Posts: 58
Location: Vietnam

PostPosted: Thu Mar 01, 2018 2:00 am    Post subject: Reply with quote

eselect opencl --use-old
Code:

!!! Error: Action use-old unknown
exiting


find /usr/include/CL/ -type l -exec equery b {} +
Code:

 * Searching for /usr/include/CL/cl.h,/usr/include/CL/cl_gl_ext.h,/usr/include/CL/cl.hpp,/usr/include/CL/cl_platform.h,/usr/include/CL/opencl.h,/usr/include/CL/cl_ext.h,/usr/include/CL/cl_gl.h ...
app-eselect/eselect-opencl-1.1.0-r6 (/usr/lib64/OpenCL/global/include/CL-2.1/opencl.h)
app-eselect/eselect-opencl-1.1.0-r6 (/usr/lib64/OpenCL/global/include/CL-2.1/cl_ext.h)
app-eselect/eselect-opencl-1.1.0-r6 (/usr/lib64/OpenCL/global/include/CL-2.1/cl.h)
app-eselect/eselect-opencl-1.1.0-r6 (/usr/lib64/OpenCL/global/include/CL-2.1/cl.hpp)
app-eselect/eselect-opencl-1.1.0-r6 (/usr/lib64/OpenCL/global/include/CL-2.1/cl_platform.h)
app-eselect/eselect-opencl-1.1.0-r6 (/usr/lib64/OpenCL/global/include/CL-2.1/cl_gl.h)
app-eselect/eselect-opencl-1.1.0-r6 (/usr/lib64/OpenCL/global/include/CL-2.1/cl_gl_ext.h)
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3774
Location: Rasi, Finland

PostPosted: Thu Mar 01, 2018 10:24 am    Post subject: Reply with quote

bronzeboyvn wrote:
eselect opencl --use-old
Code:

!!! Error: Action use-old unknown
exiting
Sorry. My bad. The correct syntax is:
Code:
eselect opencl set --use-old
Run it and then see under the /usr/include/CL/ if the symlinks have been changed.
You may need to
Code:
source /etc/env.d/03opencl
before running clinfo.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
bronzeboyvn
n00b
n00b


Joined: 31 Mar 2009
Posts: 58
Location: Vietnam

PostPosted: Thu Mar 01, 2018 1:27 pm    Post subject: Reply with quote

it still
+ links to headers files in CL-2.1 folder
+ returns Number of platforms 0

I formated and reinstalled whole system without abi_x86_32 so eselect opencl give only one option ocl-icd
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3774
Location: Rasi, Finland

PostPosted: Thu Mar 01, 2018 3:25 pm    Post subject: Reply with quote

bronzeboyvn wrote:
I formated and reinstalled whole system
Reinstalling Gentoo isn't neccessary. Reinstalling and "hoping it just works" will lead to no results and nothing new is learnt. :(

Is your eselect-opencl package still at version 1.1.0-r6 from gamarouns overlay?
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
xdarma
l33t
l33t


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

PostPosted: Thu Mar 01, 2018 7:55 pm    Post subject: Reply with quote

Hello,
maybe the sys-kernel/linux-firmware package is needed, because I was stuck at the same point of bronzeboyvn, with the output:
Quote:
Number of platforms 0

But after firmware install and reboot, my gentoo box show some information about OpenCL:
Quote:

aquilante ~ # clinfo
Number of platforms 2
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.
Platform Version OpenCL 2.1 AMD-APP (2527.3)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
Platform Host timer resolution <printPlatformInfo:5: get CL_PLATFORM_HOST_TIMER_RESOLUTION : error -30>
Platform Extensions function suffix AMD
[...snip...]

I'm using a old card based on GCN-1 that's unsupported.

Please, let me know if it works, TIA.
_________________
proud user of faKeDE-4.7.3 -> back to windowmaker -> moved to LXQt
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3774
Location: Rasi, Finland

PostPosted: Thu Mar 01, 2018 9:18 pm    Post subject: Reply with quote

xdarma wrote:
Hello,
maybe the sys-kernel/linux-firmware package is needed
I'd expect this to be already installed, although bronzeboyvn has reinstalled Gentoo few times while troubleshooting this, so there's a change it being missing.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
bronzeboyvn
n00b
n00b


Joined: 31 Mar 2009
Posts: 58
Location: Vietnam

PostPosted: Fri Mar 02, 2018 1:36 am    Post subject: Reply with quote

I installed linux-firmware as I use polaris12 (RX550) in kernel config
Code:

CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE="amdgpu/polaris12_ce.bin amdgpu/polaris12_mc.bin amdgpu/polaris12_me.bin amdgpu/polaris12_mec2.bin amdgpu/polaris12_mec.bin amdgpu/polaris12_pfp.bin amdgpu/polaris12_rlc.bin amdgpu/polaris12_sdma1.bin amdgpu/polaris12_sdma.bin amdgpu/polaris12_smc.bin amdgpu/polaris12_uvd.bin amdgpu/polaris12_vce.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3774
Location: Rasi, Finland

PostPosted: Fri Mar 02, 2018 8:38 am    Post subject: Reply with quote

If the eselect-opencl from gamarouns overlay (eselect opencl set --use-old) doesn't work, really don't know what's going on.

To make the change manually, change the
contents of /etc/env.d/03opencl:
LDPATH="/usr/lib64/OpenCL/vendors/ocl-icd"
OPENCL_PROFILE="ocl-icd"

Then change
symlinks under /usr/include/CL/:
cl2.hpp
cl_ext.h -> ../../lib64/OpenCL/vendors/ocl-icd/include/CL/cl_ext.h
cl_gl_ext.h -> ../../lib64/OpenCL/vendors/ocl-icd/include/CL/cl_gl_ext.h
cl_gl.h -> ../../lib64/OpenCL/vendors/ocl-icd/include/CL/cl_gl.h
cl.h -> ../../lib64/OpenCL/vendors/ocl-icd/include/CL/cl.h
cl_platform.h -> ../../lib64/OpenCL/vendors/ocl-icd/include/CL/cl_platform.h
opencl.h -> ../../lib64/OpenCL/vendors/ocl-icd/include/CL/opencl.h


This is strange, as I know at least one other Gentoo user with the same GPU running OpenCL computation just fine.

Before testing, source /etc/env.d/03opencl.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
xdarma
l33t
l33t


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

PostPosted: Fri Mar 02, 2018 12:33 pm    Post subject: Reply with quote

Thanks for the answers.
Just for the record, this is part of dmesg with linux-firmware installed:
Code:

aquilante ~ # dmesg | grep -e amdgpu -e radeon
[    6.750422] [drm] amdgpu kernel modesetting enabled.
[    6.890362] amdgpu 0000:25:00.0: VRAM: 3072M 0x000000F400000000 - 0x000000F4BFFFFFFF (3072M used)
[    6.890363] amdgpu 0000:25:00.0: GTT: 1024M 0x0000000000000000 - 0x000000003FFFFFFF
[    6.890415] [drm] amdgpu: 3072M of VRAM memory ready
[    6.890416] [drm] amdgpu: 3072M of GTT memory ready.
[    6.891942] amdgpu 0000:25:00.0: PCIE GART of 1024M enabled (table at 0x000000F400040000).
[    6.892000] amdgpu 0000:25:00.0: amdgpu: using MSI.
[    6.892018] [drm] amdgpu: irq initialized.
[    6.892813] [drm] amdgpu: dpm initialized
[    6.893885] amdgpu 0000:25:00.0: fence driver on ring 0 use gpu addr 0x0000000000400080, cpu addr 0x000000007501185b
[    6.893915] amdgpu 0000:25:00.0: fence driver on ring 1 use gpu addr 0x0000000000400100, cpu addr 0x000000004899b72e
[    6.893939] amdgpu 0000:25:00.0: fence driver on ring 2 use gpu addr 0x0000000000400180, cpu addr 0x00000000aa749312
[    6.893964] amdgpu 0000:25:00.0: fence driver on ring 3 use gpu addr 0x0000000000400200, cpu addr 0x00000000b2d02544
[    6.893987] amdgpu 0000:25:00.0: fence driver on ring 4 use gpu addr 0x0000000000400280, cpu addr 0x000000001db09379
[    7.374875] fbcon: amdgpudrmfb (fb0) is primary device
[    7.846273] amdgpu 0000:25:00.0: fb0: amdgpudrmfb frame buffer device
[    7.880286] amdgpu 0000:25:00.0: kfd not supported on this ASIC
[    7.880295] [drm] Initialized amdgpu 3.23.0 20150101 for 0000:25:00.0 on minor 0
[...snip...]


And this is without linux-firmware:
Code:
aquilante ~ # dmesg | grep -e amdgpu -e radeon
[    6.233625] [drm] amdgpu kernel modesetting enabled.
[    6.252115] amdgpu 0000:25:00.0: Direct firmware load for radeon/tahiti_mc.bin failed with error -2
[    6.252116] amdgpu 0000:25:00.0: si_mc: Failed to load firmware "radeon/tahiti_mc.bin"
[    6.252116] amdgpu 0000:25:00.0: Failed to load mc firmware!
[    6.252152] [drm:amdgpu_device_init [amdgpu]] *ERROR* sw_init of IP block <gmc_v6_0> failed -2
[    6.252153] amdgpu 0000:25:00.0: amdgpu_init failed
[    6.252154] amdgpu 0000:25:00.0: Fatal error during GPU init
[    6.252155] [drm] amdgpu: finishing device.
[    6.252310] amdgpu: probe of 0000:25:00.0 failed with error -2
[...snip...]


radeon driver is disabled on kernel:
Code:
aquilante ~ # zgrep "RADEON" /proc/config.gz
# CONFIG_DRM_RADEON is not set
# CONFIG_FB_RADEON is not set


Can you check your configuration? Thanks.
_________________
proud user of faKeDE-4.7.3 -> back to windowmaker -> moved to LXQt
Back to top
View user's profile Send private message
bronzeboyvn
n00b
n00b


Joined: 31 Mar 2009
Posts: 58
Location: Vietnam

PostPosted: Fri Mar 02, 2018 2:10 pm    Post subject: Reply with quote

Hi xdarma,

dmesg | grep -e amdgpu -e radeon
Code:

[    2.440541] [drm] amdgpu kernel modesetting enabled.
[    2.446967] amdgpu 0000:22:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0xffff
[    2.447028] amdgpu 0000:22:00.0: VRAM: 2048M 0x000000F400000000 - 0x000000F47FFFFFFF (2048M used)
[    2.447029] amdgpu 0000:22:00.0: GTT: 256M 0x0000000000000000 - 0x000000000FFFFFFF
[    2.447099] [drm] amdgpu: 2048M of VRAM memory ready
[    2.447100] [drm] amdgpu: 3072M of GTT memory ready.
[    2.447228] amdgpu 0000:22:00.0: amdgpu: using MSI.
[    2.447246] [drm] amdgpu: irq initialized.
[    2.447262] amdgpu: [powerplay] amdgpu: powerplay sw initialized
[    2.454753] amdgpu 0000:22:00.0: fence driver on ring 0 use gpu addr 0x0000000000400040, cpu addr 0x00000000d46c887c
[    2.454787] amdgpu 0000:22:00.0: fence driver on ring 1 use gpu addr 0x00000000004000c0, cpu addr 0x000000003fcf3802
[    2.454815] amdgpu 0000:22:00.0: fence driver on ring 2 use gpu addr 0x0000000000400140, cpu addr 0x00000000061fbe00
[    2.454842] amdgpu 0000:22:00.0: fence driver on ring 3 use gpu addr 0x00000000004001c0, cpu addr 0x0000000037b2bc70
[    2.454868] amdgpu 0000:22:00.0: fence driver on ring 4 use gpu addr 0x0000000000400240, cpu addr 0x00000000f8e01096
[    2.454894] amdgpu 0000:22:00.0: fence driver on ring 5 use gpu addr 0x00000000004002c0, cpu addr 0x000000008a2139a4
[    2.454923] amdgpu 0000:22:00.0: fence driver on ring 6 use gpu addr 0x0000000000400340, cpu addr 0x00000000ed29af61
[    2.454948] amdgpu 0000:22:00.0: fence driver on ring 7 use gpu addr 0x00000000004003c0, cpu addr 0x00000000bb74eda1
[    2.454972] amdgpu 0000:22:00.0: fence driver on ring 8 use gpu addr 0x0000000000400440, cpu addr 0x00000000b5cdf06f
[    2.454987] amdgpu 0000:22:00.0: fence driver on ring 9 use gpu addr 0x00000000004004e0, cpu addr 0x00000000b6cca744
[    2.455485] amdgpu 0000:22:00.0: fence driver on ring 10 use gpu addr 0x0000000000400560, cpu addr 0x00000000798063d4
[    2.455514] amdgpu 0000:22:00.0: fence driver on ring 11 use gpu addr 0x00000000004005e0, cpu addr 0x00000000bb04b1d6
[    2.456185] amdgpu 0000:22:00.0: fence driver on ring 12 use gpu addr 0x000000f4001e7a80, cpu addr 0x000000005462c727
[    2.456213] amdgpu 0000:22:00.0: fence driver on ring 13 use gpu addr 0x00000000004006e0, cpu addr 0x00000000d143586e
[    2.456232] amdgpu 0000:22:00.0: fence driver on ring 14 use gpu addr 0x0000000000400760, cpu addr 0x00000000098f5af8
[    2.456303] amdgpu 0000:22:00.0: fence driver on ring 15 use gpu addr 0x00000000004007e0, cpu addr 0x0000000057149b16
[    2.456321] amdgpu 0000:22:00.0: fence driver on ring 16 use gpu addr 0x0000000000400860, cpu addr 0x00000000d83dfa6c
[    2.692200] fbcon: amdgpudrmfb (fb0) is primary device
[    2.760462] amdgpu 0000:22:00.0: fb0: amdgpudrmfb frame buffer device
[    2.766189] amdgpu 0000:22:00.0: kfd not supported on this ASIC
[    2.766199] [drm] Initialized amdgpu 3.23.0 20150101 for 0000:22:00.0 on minor 0


zgrep "RADEON" /usr/src/linux/.config
Code:

# CONFIG_DRM_RADEON is not set
# CONFIG_FB_RADEON is not set
Back to top
View user's profile Send private message
bronzeboyvn
n00b
n00b


Joined: 31 Mar 2009
Posts: 58
Location: Vietnam

PostPosted: Fri Mar 02, 2018 2:19 pm    Post subject: Reply with quote

Zucca wrote:
If the eselect-opencl from gamarouns overlay (eselect opencl set --use-old) doesn't work, really don't know what's going on.

To make the change manually, change the
contents of /etc/env.d/03opencl:
LDPATH="/usr/lib64/OpenCL/vendors/ocl-icd"
OPENCL_PROFILE="ocl-icd"

Then change
symlinks under /usr/include/CL/:
cl2.hpp
cl_ext.h -> ../../lib64/OpenCL/vendors/ocl-icd/include/CL/cl_ext.h
cl_gl_ext.h -> ../../lib64/OpenCL/vendors/ocl-icd/include/CL/cl_gl_ext.h
cl_gl.h -> ../../lib64/OpenCL/vendors/ocl-icd/include/CL/cl_gl.h
cl.h -> ../../lib64/OpenCL/vendors/ocl-icd/include/CL/cl.h
cl_platform.h -> ../../lib64/OpenCL/vendors/ocl-icd/include/CL/cl_platform.h
opencl.h -> ../../lib64/OpenCL/vendors/ocl-icd/include/CL/opencl.h


This is strange, as I know at least one other Gentoo user with the same GPU running OpenCL computation just fine.

Before testing, source /etc/env.d/03opencl.


I have same content of /etc/env.d/03opencl as you have.
I can't change softlinks in /usr/include/CL/ because I don't have /usr/lib64/OpenCL/vendors/ocl-icd/include folder

ls -l /usr/lib64/OpenCL/vendors/ocl-icd
Code:

total 132
-rwxr-xr-x 1 root root    939 Feb 24 12:44 libOpenCL.la
lrwxrwxrwx 1 root root     18 Feb 24 12:44 libOpenCL.so -> libOpenCL.so.1.0.0
lrwxrwxrwx 1 root root     18 Feb 24 12:44 libOpenCL.so.1 -> libOpenCL.so.1.0.0
-rwxr-xr-x 1 root root 129344 Feb 24 12:44 libOpenCL.so.1.0.0
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3774
Location: Rasi, Finland

PostPosted: Fri Mar 02, 2018 4:04 pm    Post subject: Reply with quote

bronzeboyvn wrote:
I can't change softlinks in /usr/include/CL/ because I don't have /usr/lib64/OpenCL/vendors/ocl-icd/include folder
I have dev-libs/ocl-icd-2.2.11-r1::gentoo-gpu installed on my system. Based on equery b output it owns all the files inside it.
If you haven't that exact package on your system, please do install it and then run eselect opencl set --use-old.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
xdarma
l33t
l33t


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

PostPosted: Sat Mar 03, 2018 10:06 am    Post subject: Reply with quote

bronzeboyvn wrote:

I can't change softlinks in /usr/include/CL/ because I don't have /usr/lib64/OpenCL/vendors/ocl-icd/include folder

ls -l /usr/lib64/OpenCL/vendors/ocl-icd
Code:

total 132
-rwxr-xr-x 1 root root    939 Feb 24 12:44 libOpenCL.la
lrwxrwxrwx 1 root root     18 Feb 24 12:44 libOpenCL.so -> libOpenCL.so.1.0.0
lrwxrwxrwx 1 root root     18 Feb 24 12:44 libOpenCL.so.1 -> libOpenCL.so.1.0.0
-rwxr-xr-x 1 root root 129344 Feb 24 12:44 libOpenCL.so.1.0.0

It's the same on my machine.

Zucca wrote:
I have dev-libs/ocl-icd-2.2.11-r1::gentoo-gpu installed on my system.

I don't use the gentoo-gpu overlay, I keep official gentoo repository.
Those are installed packages with some "opencl" word:
Code:
aquilante ~ # eix -cyI opencl
[I] app-eselect/eselect-opencl (1.1.0-r4@02/03/2018): Utility to change the OpenCL implementation being used
[I] dev-libs/amdgpu-pro-opencl (17.50.511655@24/02/2018): Proprietary OpenCL implementation for AMD GPUs
[I] dev-libs/libclc (0.2.0_pre20170929@25/02/2018): OpenCL C library
[I] dev-libs/ocl-icd (2.2.11@26/02/2018): Alternative to vendor specific OpenCL ICD loaders
[I] dev-util/clinfo (2.2.17.10.25@27/02/2018): A tool to display info about the system's OpenCL capabilities
[I] media-libs/mesa (17.2.8@27/02/2018): OpenGL-like graphic library for Linux
[I] virtual/opencl (0-r5@27/02/2018): Virtual for OpenCL implementations


And those with "amdgpu" word:
Code:
aquilante ~ # eix -cyI amdgpu
[I] dev-libs/amdgpu-pro-opencl (17.50.511655@24/02/2018): Proprietary OpenCL implementation for AMD GPUs
[I] media-libs/mesa (17.2.8@27/02/2018): OpenGL-like graphic library for Linux
[I] sys-devel/clang (5.0.1(5)@25/02/2018): C language family frontend for LLVM
[I] sys-devel/llvm (5.0.1(5)@25/02/2018): Low Level Virtual Machine
[I] virtual/opencl (0-r5@27/02/2018): Virtual for OpenCL implementations
[I] x11-base/xorg-drivers (1.19@25/02/2018): Meta package containing deps on all xorg drivers
[I] x11-drivers/xf86-video-amdgpu (1.3.0@26/02/2018): Accelerated Open Source driver for AMDGPU cards
[I] x11-libs/libdrm (2.4.89@03/03/2018): X.Org libdrm library

_________________
proud user of faKeDE-4.7.3 -> back to windowmaker -> moved to LXQt
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3522

PostPosted: Sat Mar 03, 2018 1:33 pm    Post subject: Reply with quote

xdarma wrote:
bronzeboyvn wrote:

I can't change softlinks in /usr/include/CL/ because I don't have /usr/lib64/OpenCL/vendors/ocl-icd/include folder

ls -l /usr/lib64/OpenCL/vendors/ocl-icd
Code:

total 132
-rwxr-xr-x 1 root root    939 Feb 24 12:44 libOpenCL.la
lrwxrwxrwx 1 root root     18 Feb 24 12:44 libOpenCL.so -> libOpenCL.so.1.0.0
lrwxrwxrwx 1 root root     18 Feb 24 12:44 libOpenCL.so.1 -> libOpenCL.so.1.0.0
-rwxr-xr-x 1 root root 129344 Feb 24 12:44 libOpenCL.so.1.0.0

It's the same on my machine.

Zucca wrote:
I have dev-libs/ocl-icd-2.2.11-r1::gentoo-gpu installed on my system.

I don't use the gentoo-gpu overlay, I keep official gentoo repository.
Those are installed packages with some "opencl" word:
Code:
aquilante ~ # eix -cyI opencl
[I] app-eselect/eselect-opencl (1.1.0-r4@02/03/2018): Utility to change the OpenCL implementation being used
[I] dev-libs/amdgpu-pro-opencl (17.50.511655@24/02/2018): Proprietary OpenCL implementation for AMD GPUs
[I] dev-libs/libclc (0.2.0_pre20170929@25/02/2018): OpenCL C library
[I] dev-libs/ocl-icd (2.2.11@26/02/2018): Alternative to vendor specific OpenCL ICD loaders
[I] dev-util/clinfo (2.2.17.10.25@27/02/2018): A tool to display info about the system's OpenCL capabilities
[I] media-libs/mesa (17.2.8@27/02/2018): OpenGL-like graphic library for Linux
[I] virtual/opencl (0-r5@27/02/2018): Virtual for OpenCL implementations


And those with "amdgpu" word:
Code:
aquilante ~ # eix -cyI amdgpu
[I] dev-libs/amdgpu-pro-opencl (17.50.511655@24/02/2018): Proprietary OpenCL implementation for AMD GPUs
[I] media-libs/mesa (17.2.8@27/02/2018): OpenGL-like graphic library for Linux
[I] sys-devel/clang (5.0.1(5)@25/02/2018): C language family frontend for LLVM
[I] sys-devel/llvm (5.0.1(5)@25/02/2018): Low Level Virtual Machine
[I] virtual/opencl (0-r5@27/02/2018): Virtual for OpenCL implementations
[I] x11-base/xorg-drivers (1.19@25/02/2018): Meta package containing deps on all xorg drivers
[I] x11-drivers/xf86-video-amdgpu (1.3.0@26/02/2018): Accelerated Open Source driver for AMDGPU cards
[I] x11-libs/libdrm (2.4.89@03/03/2018): X.Org libdrm library


I'm attempting to run stock gentoo as well, not getting any opencl stuff from overlays. I get the same results as you for "ls -l /usr/lib64/OpenCL/vendors/ocl-icd". However I get different results for:
Code:
$ eix -cyI opencl
[?] dev-libs/libclc (0.2.0_pre20170929@01/09/2018 -> (~)0.0.1_pre20141027): OpenCL C library
[?] media-gfx/darktable (2.4.1@01/26/2018 -> (~)1.4.2): A virtual lighttable and darkroom for photographers
[?] media-gfx/imagemagick (7.0.7.19(0/7.0.7.19)@01/10/2018 -> 6.8.9.9(0/6.8.9.9)^u): A collection of tools and libraries for many image formats
[?] media-libs/mesa (17.2.8@02/22/2018 -> (~)10.3.0): OpenGL-like graphic library for Linux
[?] media-libs/x264 (0.0.20170701(0/152)@03/03/2018 -> 0.0.20140308(0/142)): A free library for encoding X264/AVC streams
[?] virtual/opencl (0-r5@02/25/2018 -> 0-r4): Virtual for OpenCL implementations
Found 6 matches
$ eix -cyI amdgpu
[?] media-libs/mesa (17.2.8@02/22/2018 -> (~)10.3.0): OpenGL-like graphic library for Linux
[?] sys-devel/clang (5.0.1(5)@01/18/2018 -> (~)3.5.0-r100(0/3.5)): C language family frontend for LLVM (meta-ebuild)
[?] sys-devel/llvm (5.0.1(5)@03/03/2018 -> (~)3.5.0(0/3.5)): Low Level Virtual Machine
[?] virtual/opencl (0-r5@02/25/2018 -> 0-r4): Virtual for OpenCL implementations
[?] x11-base/xorg-drivers (1.19@01/28/2018 -> (~)1.16): Meta package containing deps on all xorg drivers
[?] x11-libs/libdrm (2.4.88@01/09/2018 -> (~)2.4.56^t): X.Org libdrm library
Found 6 matches


When I look at the packages missing from my listings and do a pretend emerge:
Code:
$ emerge -ptv eselect-opencl amdgpu-pro-opencl libclc ocl-icd xorg-drivers libdrm

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild   R    ] x11-libs/libdrm-2.4.88::gentoo  USE="libkms -static-libs -valgrind" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="amdgpu radeon (-exynos) (-freedreno) -intel -nouveau (-omap) (-tegra) (-vc4) (-vivante) -vmware" 0 KiB
[ebuild   R    ] x11-base/xorg-drivers-1.19::gentoo  INPUT_DEVICES="libinput -elographics -evdev -joystick -keyboard -mouse -synaptics -tslib -vmmouse -void -wacom" VIDEO_CARDS="amdgpu radeon radeonsi -ast -dummy -fbdev (-freedreno) (-geode) -glint -i915 -i965 -intel -mga (-newport) -nouveau -nv -nvidia (-omap) -qxl -r128 -siliconmotion (-tdfx) (-tegra) (-vc4) -vesa -via -virtualbox -vmware (-voodoo)" 0 KiB
[ebuild   R    ] dev-libs/libclc-0.2.0_pre20170929::gentoo  0 KiB
[ebuild   Rf  ~] dev-libs/amdgpu-pro-opencl-17.50.511655::gentoo  0 KiB
[ebuild   R    ]  dev-libs/ocl-icd-2.2.11::gentoo  0 KiB
[ebuild   R    ]   app-eselect/eselect-opencl-1.1.0-r1::gentoo  0 KiB

Total: 6 packages (6 reinstalls), Size of downloads: 0 KiB
Fetch Restriction: 1 package

Now that I look, I see that I have xf86-video-amdgpu and xf86-video-ati installed, but from these lines in /var/log/Xorg.0.log I see that I appear to be using amdgpu:
Code:
[    37.449]    loading driver: amdgpu
[    37.449] (==) Matched amdgpu as autoconfigured driver 0
[    37.449] (==) Matched ati as autoconfigured driver 1
[    37.449] (==) Matched ati as autoconfigured driver 2
[    37.449] (==) Matched modesetting as autoconfigured driver 3
[    37.449] (==) Matched fbdev as autoconfigured driver 4
[    37.449] (==) Matched vesa as autoconfigured driver 5
[    37.449] (==) Assigned the driver to the xf86ConfigLayout
[    37.449] (II) LoadModule: "amdgpu"
[    37.449] (II) Loading /usr/lib64/xorg/modules/drivers/amdgpu_drv.so
[    37.488] (II) Module amdgpu: vendor="X.Org Foundation"


I don't really use openCL - yet. I have several programs that can take advantage of it, but so far I've kept USE="-opencl" until I think I have it working, particularly in a way that can take advantage of my Kaveri CPU. So I'm following this thread, sort of keeping up, hoping that at some point things will come together and this will work for me. If there are suggestions for me to help this along, I'm interested. (Though I'm less interested in deviating far from stock Gentoo.)
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3774
Location: Rasi, Finland

PostPosted: Sat Mar 03, 2018 1:53 pm    Post subject: Reply with quote

xdarma wrote:
I don't use the gentoo-gpu overlay, I keep official gentoo repository.
That's the only ocl-icd build I've been able to get things working. If you don't want to use that overlay you could then just copy the ebuild and create your own local overlay. Although the easiest alternative might to just to add the overlay and then use package.mask to mask all the packages from gentoo-gpu and then unmask =dev-libs/ocl-icd-2.2.11-r1::gentoo-gpu.
Or do you have it working with ocl-icd from ::gentoo? If so, does your eselect opencl list show others than ocl-icd?


xdarma wrote:
Those are installed packages with some "opencl" word:
Code:
aquilante ~ # eix -cyI opencl
[I] app-eselect/eselect-opencl (1.1.0-r4@02/03/2018): Utility to change the OpenCL implementation being used
[I] dev-libs/amdgpu-pro-opencl (17.50.511655@24/02/2018): Proprietary OpenCL implementation for AMD GPUs
[I] dev-libs/libclc (0.2.0_pre20170929@25/02/2018): OpenCL C library
[I] dev-libs/ocl-icd (2.2.11@26/02/2018): Alternative to vendor specific OpenCL ICD loaders
[I] dev-util/clinfo (2.2.17.10.25@27/02/2018): A tool to display info about the system's OpenCL capabilities
[I] media-libs/mesa (17.2.8@27/02/2018): OpenGL-like graphic library for Linux
[I] virtual/opencl (0-r5@27/02/2018): Virtual for OpenCL implementations


And those with "amdgpu" word:
Code:
aquilante ~ # eix -cyI amdgpu
[I] dev-libs/amdgpu-pro-opencl (17.50.511655@24/02/2018): Proprietary OpenCL implementation for AMD GPUs
[I] media-libs/mesa (17.2.8@27/02/2018): OpenGL-like graphic library for Linux
[I] sys-devel/clang (5.0.1(5)@25/02/2018): C language family frontend for LLVM
[I] sys-devel/llvm (5.0.1(5)@25/02/2018): Low Level Virtual Machine
[I] virtual/opencl (0-r5@27/02/2018): Virtual for OpenCL implementations
[I] x11-base/xorg-drivers (1.19@25/02/2018): Meta package containing deps on all xorg drivers
[I] x11-drivers/xf86-video-amdgpu (1.3.0@26/02/2018): Accelerated Open Source driver for AMDGPU cards
[I] x11-libs/libdrm (2.4.89@03/03/2018): X.Org libdrm library


I have these installed:
  • app-eselect/eselect-mesa-0.0.10-r1:0:gentoo
  • app-eselect/eselect-opencl-1.1.0-r6:0:gamarouns
  • dev-libs/amdgpu-pro-opencl-17.50.511655:0:gentoo
  • dev-libs/ocl-icd-2.2.11-r1:0:gentoo-gpu
  • dev-libs/opencl-clhpp-2.0.10-r1:0:zucca
  • dev-util/clinfo-2.2.17.10.25:0:gentoo
  • media-libs/mesa-18.0.0_rc4:0:gentoo
  • sys-devel/clang-5.0.1:5:gentoo
  • sys-devel/clang-runtime-5.0.0:5.0.0:gentoo
  • sys-devel/clang-runtime-5.0.1:5.0.1:gentoo
  • sys-devel/llvm-5.0.1:5:gentoo
  • sys-devel/llvm-common-5.0.1:0:gentoo
  • virtual/opencl-0-r5:0:gentoo
  • x11-apps/mesa-progs-8.3.0:0:gentoo
  • x11-drivers/xf86-video-amdgpu-1.4.0:0:gentoo
  • x11-libs/libdrm-2.4.89:0:gentoo
eselect-opencl from gamarouns might not be neccessary. Also C++ header package from my own overlay is only a slightly fixed version of one found from science overlay. The one in science installs files to non standard location (bug #629052). Also you only need it if one of your programs needs those headers. In my case it's Mandelbulber2.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
xdarma
l33t
l33t


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

PostPosted: Sat Mar 03, 2018 8:41 pm    Post subject: Reply with quote

depontius wrote:
I'm attempting to run stock gentoo as well, not getting any opencl stuff from overlays. I get the same results as you for "ls -l /usr/lib64/OpenCL/vendors/ocl-icd".

Thanks for sharing.

depontius wrote:
...particularly in a way that can take advantage of my Kaveri CPU.

Your gpu should be supported by amdgpu, so you can switch to amdgpu and after then enable opencl with ocl-icd libraries.

Zucca wrote:
Or do you have it working with ocl-icd from ::gentoo? If so, does your eselect opencl list show others than ocl-icd?

I dont'use other repository, at least until gentoo will works well.
Only ocl-icd is installed.
I've upgraded a old machine based on fglrx. So I've removed old driver, but maybe there are some old files somewhere in the system.
Thanks for sharing.
_________________
proud user of faKeDE-4.7.3 -> back to windowmaker -> moved to LXQt
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3522

PostPosted: Sun Mar 18, 2018 2:27 am    Post subject: Reply with quote

Just remembered that I'd been fiddling with this recently, and got distracted.

Tried it again tonight, and clinfo still wouldn't install. Then I thought to look on bugzilla, and someone there said a newer versions of eselect-opencl was needed. So I keyworded app-eselect/opencl-1.1.0-r4 and now clinfo installs. So this is it, all base Gentoo with a few keyworded packges:
Code:
# clinfo
Number of platforms                               1
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.1 AMD-APP (2527.3)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
  Platform Host timer resolution                  <printPlatformInfo:5: get CL_PLATFORM_HOST_TIMER_RESOLUTION : error -30>
  Platform Extensions function suffix             AMD

  Platform Name                                   AMD Accelerated Parallel Processing
Number of devices                                 1
  Device Name                                     Spectre
  Device Vendor                                   Advanced Micro Devices, Inc.
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.2 AMD-APP (2527.3)
  Driver Version                                  2527.3
  Device OpenCL C Version                         OpenCL C 1.2
  Device Type                                     GPU
  Device Available                                Yes
  Device Profile                                  FULL_PROFILE
  Device Board Name (AMD)                         AMD Radeon Graphics
  Device Topology (AMD)                           PCI-E, 00:01.0
  Max compute units                               8
  SIMD per compute unit (AMD)                     4
  SIMD width (AMD)                                16
  SIMD instruction width (AMD)                    1
  Max clock frequency                             720MHz
  Graphics IP (AMD)                               7.1
  Device Partition                                (core)
    Max number of sub-devices                     8
    Supported partition types                     none specified
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x1024
  Max work group size                             256
  Compiler Available                              Yes
  Linker Available                                Yes
  Preferred work group size multiple              64
  Wavefront width (AMD)                           64
  Preferred / native vector sizes                 
    char                                                 4 / 4       
    short                                                2 / 2       
    int                                                  1 / 1       
    long                                                 1 / 1       
    half                                                 1 / 1        (n/a)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (n/a)
  Single-precision Floating-point support         (core)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  Yes
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              2630230016 (2.45GiB)
  Global free memory (AMD)                        4064952 (3.877GiB)
  Global memory channels (AMD)                    4
  Global memory banks per channel (AMD)           8
  Global memory bank width (AMD)                  256 bytes
  Error Correction support                        No
  Max memory allocation                           1369020825 (1.275GiB)
  Unified memory for Host and Device              Yes
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       2048 bits (256 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        16384 (16KiB)
  Global Memory cache line size                   64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max size for 1D images from buffer            134217728 pixels
    Max 1D or 2D image array size                 2048 images
    Base address alignment for 2D image buffers   256 bytes
    Pitch alignment for 2D image buffers          256 pixels
    Max 2D image size                             16384x16384 pixels
    Max 3D image size                             2048x2048x2048 pixels
    Max number of read image args                 128
    Max number of write image args                8
  Local memory type                               Local
  Local memory size                               32768 (32KiB)
  Local memory syze per CU (AMD)                  65536 (64KiB)
  Local memory banks (AMD)                        32
  Max constant buffer size                        1369020825 (1.275GiB)
  Max number of constant args                     8
  Max size of kernel argument                     1024
  Queue properties                               
    Out-of-order execution                        No
    Profiling                                     Yes
  Prefer user sync for interop                    Yes
  Profiling timer resolution                      1ns
  Profiling timer offset since Epoch (AMD)        1521292142961578131ns (Sat Mar 17 09:09:02 2018)
  Execution capabilities                         
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Thread trace supported (AMD)                  Yes
    SPIR versions                                 1.2
  printf() buffer size                            4194304 (4MiB)
  Built-in kernels                               
  Device Extensions                               cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_gl_event

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  AMD Accelerated Parallel Processing
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [AMD]
  clCreateContext(NULL, ...) [default]            Success [AMD]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 AMD Accelerated Parallel Processing
    Device Name                                   Spectre
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 AMD Accelerated Parallel Processing
    Device Name                                   Spectre
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 AMD Accelerated Parallel Processing
    Device Name                                   Spectre

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.11
  ICD loader Profile                              OpenCL 2.1

I haven't actually tried using OpenCL yet, other than to run clinfo. The only package I currently have installed that uses opencl is darktable, though I suspect libreoffice does, as well. Doing a scan now. Doing something about this would involve some sort of benchmark without opencl, reinstall with the updated USE flag, then benchmark with it.

I also noticed that line about not running native kernels, though perhaps that's because I also don't appear to have any built-in kernels? Can someone explain that?
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3774
Location: Rasi, Finland

PostPosted: Sun Mar 18, 2018 12:23 pm    Post subject: Reply with quote

If you're into generating 3D fractal images then try out media-gfx/mandelbulber. It has been updated to v2 recently on portage tree.
You'll see a HUGE boost in speed when using OpenCL. If your OpenCL isn't working the program will fail to use it.
I also use darktable. I can see a significant boost in speed when batch processing photos.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3522

PostPosted: Sun Mar 18, 2018 12:37 pm    Post subject: Reply with quote

I've had darktable installed ever since I bought a Nikon P7100 and wanted to be able to handle the raw images it created. Truth is, I've fiddled with it a bit, but never actually used it. I do have some images where there is just too much dynamic range present and I'd like to tweak that a bit, but I never found a good tutorial on how to do that kind of thing. I spoke with a friend once who does do stuff with raw, but he just "makes it look nice" and isn't terribly specific about it.

Your Mandlebrot Set generator sounds like it might be a better benchmark for me. I presume it can be seeded, so I can generate the same image both ways?

I did fiddle a bit more last night after posting, and find one word of caution. My system is multilib, and my opencl is 64-bit only. So anything where I want to use opencl is going to have to be 64-bit only, or else it will pull Clover in and put me back to software emulation.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3522

PostPosted: Mon Mar 19, 2018 1:58 pm    Post subject: Reply with quote

I installed mandelbulber without opencl and fiddled a bit, just to get a feel for its performance. It's sufficiently sophisticated that I'd need to put a fair amount of effort into it to use it as a scripted benchmark, and at the moment don't feel like doing that. Presuming I still want to, that can always be done later.

So I tried to reinstall with opencl, and it fails to build. It can't find the include files. ISTR that there is a package that symlinks the include files into a different location that is apparently expected by some clients, presumably this one. I'll have to look that up and give it a try.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3774
Location: Rasi, Finland

PostPosted: Mon Mar 19, 2018 4:26 pm    Post subject: Reply with quote

depontius wrote:
I installed mandelbulber without opencl and fiddled a bit, just to get a feel for its performance. It's sufficiently sophisticated that I'd need to put a fair amount of effort into it to use it as a scripted benchmark, and at the moment don't feel like doing that.
Mandelbulber should come with examples. There's no use flag for it so I assume those are there automatically.
Run mandelbulber and then from "file" menu you should be able to load an example. Then just hit the render button. and it should render the fractal. Note that you should just compile mandelbulber with +opencl, since OpenCL can (and needs to) be activated from the Mandelbulber preferences.

So basically
  • load an example fractal
  • adjust the output image resolution (optional)
  • render the fractal
  • switch to OpenCl -mode from preferences
  • render the fractal again

_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3774
Location: Rasi, Finland

PostPosted: Mon Mar 19, 2018 4:28 pm    Post subject: Reply with quote

Oh btw. There's some interesting development going on...
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 3 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