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

Goto page 1, 2, 3, 4, 5  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
bronzeboyvn
n00b
n00b


Joined: 31 Mar 2009
Posts: 58
Location: Vietnam

PostPosted: Sun Feb 11, 2018 10:02 am    Post subject: OpenCL on AMD GPU Reply with quote

Hi all,
I have AMD Ryzen CPU and Radeon RX 550 GPU. I installed mesa and here the output of clinfo

Code:
Number of platforms                               1
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 17.3.0
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   Clover
Number of devices                                 1
  Device Name                                     Radeon RX 550 Series (POLARIS12 / DRM 3.15.0 / 4.12.5-gentoo, LLVM 3.9.1)
  Device Vendor                                   AMD
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.1 Mesa 17.3.0
  Driver Version                                  17.3.0
  Device OpenCL C Version                         OpenCL C 1.1
  Device Type                                     GPU
  Device Available                                Yes
  Device Profile                                  FULL_PROFILE
  Max compute units                               8
  Max clock frequency                             1206MHz
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
  Compiler Available                              Yes
  Preferred work group size multiple              <getWGsizes:523: build program : error -11>
  Preferred / native vector sizes                 
    char                                                16 / 16     
    short                                                8 / 8       
    int                                                  4 / 4       
    long                                                 2 / 2       
    half                                                 8 / 8        (cl_khr_fp16)
    float                                                4 / 4       
    double                                               2 / 2        (cl_khr_fp64)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
  Single-precision Floating-point support         (core)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  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                              3219378176 (2.998GiB)
  Error Correction support                        No
  Max memory allocation                           1901437747 (1.771GiB)
  Unified memory for Host and Device              No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       32768 bits (4096 bytes)
  Global Memory cache type                        None
  Image support                                   No
  Local memory type                               Local
  Local memory size                               32768 (32KiB)
  Max constant buffer size                        1901437747 (1.771GiB)
  Max number of constant args                     16
  Max size of kernel argument                     1024
  Queue properties                               
    Out-of-order execution                        No
    Profiling                                     Yes
  Profiling timer resolution                      0ns
  Execution capabilities                         
    Run OpenCL kernels                            Yes
    Run native kernels                            No
  Device Extensions                               cl_khr_byte_addressable_store 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_fp64 cl_khr_fp16

=== CL_PROGRAM_BUILD_LOG ===
<unknown>:0:0: in function sum void (float addrspace(1)*, float addrspace(1)*, float addrspace(1)*): unsupported call to function get_local_size

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platform
  clCreateContext(NULL, ...) [default]            No platform
  clCreateContext(NULL, ...) [other]              Success [MESA]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 Clover
    Device Name                                   Radeon RX 550 Series (POLARIS12 / DRM 3.15.0 / 4.12.5-gentoo, LLVM 3.9.1)
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Clover
    Device Name                                   Radeon RX 550 Series (POLARIS12 / DRM 3.15.0 / 4.12.5-gentoo, LLVM 3.9.1)
  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                                 Clover
    Device Name                                   Radeon RX 550 Series (POLARIS12 / DRM 3.15.0 / 4.12.5-gentoo, LLVM 3.9.1)


When I try to install dev-libs/amdgpu-pro-opencl and choose ocl-icd (eselect opencl set ocl-icd), it's worse, the output of clinfo is just 1 line
Code:
Number of platforms                               0


Anyone can help so that I can use OpenCL on AMD GPU?
Back to top
View user's profile Send private message
pcmaster
Advocate
Advocate


Joined: 04 Dec 2003
Posts: 2219
Location: Barcelona

PostPosted: Sun Feb 11, 2018 12:25 pm    Post subject: Reply with quote

You have an old verion of llvm installed. Try with 5.0.1 version (is the last stable) of llvm and it's dependencies.
_________________
pcmaster
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


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

PostPosted: Sun Feb 11, 2018 3:37 pm    Post subject: Reply with quote

Also I had several problems with amdgpu-pro-opencl if I had USE="opencl" on mesa. So disabling opencl for mesa but otherwise enabling it globally had been a working solution for me.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
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: Mon Feb 12, 2018 6:35 am    Post subject: Reply with quote

pcmaster wrote:
You have an old verion of llvm installed. Try with 5.0.1 version (is the last stable) of llvm and it's dependencies.

I tried with llvm 5.0.1, but there is still output "NULL platform behavior" (.. No platform), only error disappears (=== CL_PROGRAM_BUILD_LOG ===
<unknown>:0:0: in function sum void (float addrspace(1)*, float addrspace(1)*, float addrspace(1)*): unsupported call to function get_local_size)

Zucca wrote:
Also I had several problems with amdgpu-pro-opencl if I had USE="opencl" on mesa. So disabling opencl for mesa but otherwise enabling it globally had been a working solution for me.

It is still 1 line output "Number of platforms 0"

Thanks for your replies. I will try with fresh new install. I'd prefer to opensource Mesa. Let's see what happens.
Back to top
View user's profile Send private message
pcmaster
Advocate
Advocate


Joined: 04 Dec 2003
Posts: 2219
Location: Barcelona

PostPosted: Mon Feb 12, 2018 10:45 am    Post subject: Reply with quote

Clinfo and package versions:

Code:
Core2Duo ~ # ./clInfo
Found 1 platform(s).
platform[0x7f2c3e09a510]: profile: FULL_PROFILE
platform[0x7f2c3e09a510]: version: OpenCL 2.1 AMD-APP (2527.3)
platform[0x7f2c3e09a510]: name: AMD Accelerated Parallel Processing
platform[0x7f2c3e09a510]: vendor: Advanced Micro Devices, Inc.
platform[0x7f2c3e09a510]: extensions: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
platform[0x7f2c3e09a510]: Found 1 device(s).
   device[0x8a9ed0]: NAME: Ellesmere
   device[0x8a9ed0]: VENDOR: Advanced Micro Devices, Inc.
   device[0x8a9ed0]: PROFILE: FULL_PROFILE
   device[0x8a9ed0]: VERSION: OpenCL 1.2 AMD-APP (2527.3)
   device[0x8a9ed0]: 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_fp16 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
   device[0x8a9ed0]: DRIVER_VERSION: 2527.3

   device[0x8a9ed0]: Type: GPU
   device[0x8a9ed0]: EXECUTION_CAPABILITIES: Kernel
   device[0x8a9ed0]: GLOBAL_MEM_CACHE_TYPE: Read-Write (2)
   device[0x8a9ed0]: CL_DEVICE_LOCAL_MEM_TYPE: Local (1)
   device[0x8a9ed0]: SINGLE_FP_CONFIG: 0xbe
   device[0x8a9ed0]: QUEUE_PROPERTIES: 0x2

   device[0x8a9ed0]: VENDOR_ID: 4098
   device[0x8a9ed0]: MAX_COMPUTE_UNITS: 36
   device[0x8a9ed0]: MAX_WORK_ITEM_DIMENSIONS: 3
   device[0x8a9ed0]: MAX_WORK_GROUP_SIZE: 256
   device[0x8a9ed0]: PREFERRED_VECTOR_WIDTH_CHAR: 4
   device[0x8a9ed0]: PREFERRED_VECTOR_WIDTH_SHORT: 2
   device[0x8a9ed0]: PREFERRED_VECTOR_WIDTH_INT: 1
   device[0x8a9ed0]: PREFERRED_VECTOR_WIDTH_LONG: 1
   device[0x8a9ed0]: PREFERRED_VECTOR_WIDTH_FLOAT: 1
   device[0x8a9ed0]: PREFERRED_VECTOR_WIDTH_DOUBLE: 1
   device[0x8a9ed0]: MAX_CLOCK_FREQUENCY: 1365
   device[0x8a9ed0]: ADDRESS_BITS: 64
   device[0x8a9ed0]: MAX_MEM_ALLOC_SIZE: 4244635648
   device[0x8a9ed0]: IMAGE_SUPPORT: 1
   device[0x8a9ed0]: MAX_READ_IMAGE_ARGS: 128
   device[0x8a9ed0]: MAX_WRITE_IMAGE_ARGS: 8
   device[0x8a9ed0]: IMAGE2D_MAX_WIDTH: 16384
   device[0x8a9ed0]: IMAGE2D_MAX_HEIGHT: 16384
   device[0x8a9ed0]: IMAGE3D_MAX_WIDTH: 2048
   device[0x8a9ed0]: IMAGE3D_MAX_HEIGHT: 2048
   device[0x8a9ed0]: IMAGE3D_MAX_DEPTH: 2048
   device[0x8a9ed0]: MAX_SAMPLERS: 16
   device[0x8a9ed0]: MAX_PARAMETER_SIZE: 1024
   device[0x8a9ed0]: MEM_BASE_ADDR_ALIGN: 2048
   device[0x8a9ed0]: MIN_DATA_TYPE_ALIGN_SIZE: 128
   device[0x8a9ed0]: GLOBAL_MEM_CACHELINE_SIZE: 64
   device[0x8a9ed0]: GLOBAL_MEM_CACHE_SIZE: 16384
   device[0x8a9ed0]: GLOBAL_MEM_SIZE: 5944377344
   device[0x8a9ed0]: MAX_CONSTANT_BUFFER_SIZE: 4244635648
   device[0x8a9ed0]: MAX_CONSTANT_ARGS: 8
   device[0x8a9ed0]: LOCAL_MEM_SIZE: 32768
   device[0x8a9ed0]: ERROR_CORRECTION_SUPPORT: 0
   device[0x8a9ed0]: PROFILING_TIMER_RESOLUTION: 1
   device[0x8a9ed0]: ENDIAN_LITTLE: 1
   device[0x8a9ed0]: AVAILABLE: 1
   device[0x8a9ed0]: COMPILER_AVAILABLE: 1
Core2Duo ~ # emerge -Dvp mesa llvm

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

Calculating dependencies... done!
[ebuild   R    ] sys-devel/llvm-5.0.1:5::gentoo  USE="libffi ncurses -debug -doc -gold -libedit {-test}" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AMDGPU (X86) -AArch64 -ARM -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -Sparc -SystemZ -XCore" 0 KiB
[ebuild   R    ] media-libs/mesa-17.2.8::gentoo  USE="classic dri3 egl gallium gbm gles2 llvm nptl opencl openmax osmesa vdpau vulkan xa -bindist -d3d9 -debug -gles1 -pax_kernel -pic (-selinux) -unwind -vaapi -valgrind -wayland -xvmc" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="radeonsi (-freedreno) -i915 -i965 (-imx) -intel -nouveau -r100 -r200 -r300 -r600 -radeon (-vc4) -virgl (-vivante) -vmware" 0 KiB

Total: 2 packages (2 reinstalls), Size of downloads: 0 KiB
Core2Duo ~ #  eselect opencl list
Available OpenCL implementations:
  [1]   mesa
  [2]   ocl-icd *
Core2Duo ~ #


_________________
pcmaster
Back to top
View user's profile Send private message
bronzeboyvn
n00b
n00b


Joined: 31 Mar 2009
Posts: 58
Location: Vietnam

PostPosted: Mon Feb 12, 2018 1:32 pm    Post subject: Reply with quote

pcmaster wrote:
Code:

version: OpenCL 2.1 AMD-APP (2527.3)

Core2Duo ~ #  eselect opencl list
Available OpenCL implementations:
  [1]   mesa
  [2]   ocl-icd *


It looks like you use closed source AMDGPU.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


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

PostPosted: Mon Feb 12, 2018 2:50 pm    Post subject: Reply with quote

bronzeboyvn wrote:
It looks like you use closed source AMDGPU.
Using clover gets you practically nowhere. I didn't like it either, but using propietary OpenCL libraries seems to be the way at the moment. Mesa folks seem to be abandoned the whole clover project.

However who knows what we'll get in near future. The ROCm and Vulkan could offer something eventually.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
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: Tue Feb 13, 2018 7:54 am    Post subject: amdgpu-pro-opencl Reply with quote

So I try closed source amdgpu-pro-opencl. I installed mesa, amdgpu-pro-opencl.

+ If I choose ocl-icd ("eselect opencl set ocl-icd"), it fails to install clinfo. There are many errors in log, just remember "CL_DEVICE_TYPE_CUSTOM undeclared" first. Look in OpenCL headers:
there is define of CL_DEVICE_TYPE_CUSTOM in header of vendor/mesa and global
there's no define of CL_DEVICE_TYPE_CUSTOM in header of vendor/ocl-icd
+ If I choose mesa ("eselect opencl set mesa), it successes to install clinfo. But there is still the problem as my first post in this thread.

Could you give output of following cmd ?
Code:
find /usr/lib64/OpenCL -type f -iname '*.h' | xargs grep 'CL_DEVICE_TYPE_CUSTOM'


Or should we install amdapp (science overlay) ?
We are on holiday, I will come back in this weekend.
Thanks Zuccza and pcmaster again.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


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

PostPosted: Tue Feb 13, 2018 11:53 am    Post subject: Reply with quote

At some point to run OpenCL enabled programs I needed to set LD_LIBRARY_PATH to /opt/amdgpu/lib64.
So for example
Code:
LD_LIBRARY_PATH="/opt/amdgpu/lib64" darktable
to have OpenCL acceleration for my photo editing needs.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
skunk
l33t
l33t


Joined: 28 May 2003
Posts: 646
Location: granada, spain

PostPosted: Tue Feb 13, 2018 12:59 pm    Post subject: Reply with quote

yeah! thank you for the hint zucca!
Code:

AMD Cards available: 4
GPU #0: Ellesmere (AMD Radeon (TM) RX 480 Graphics), 8178 MB available, 36 compute units (pci bus 2:0:0)
GPU #0 recognized as Radeon RX 480/580
GPU #1: Ellesmere (AMD Radeon (TM) RX 480 Graphics), 8178 MB available, 36 compute units (pci bus 3:0:0)
GPU #1 recognized as Radeon RX 480/580
GPU #2: Ellesmere (Radeon RX 580 Series), 8178 MB available, 36 compute units (pci bus 4:0:0)
GPU #2 recognized as Radeon RX 480/580
GPU #3: Ellesmere (Radeon RX 580 Series), 8178 MB available, 36 compute units (pci bus 5:0:0)
GPU #3 recognized as Radeon RX 480/580
ETH - Total Speed: 98.842 Mh/s, Total Shares: 22, Rejected: 0, Time: 00:08
ETH: GPU0 23.929 Mh/s, GPU1 24.061 Mh/s, GPU2 25.389 Mh/s, GPU3 25.463 Mh/s
 DCR - Total Speed: 2965.244 Mh/s, Total Shares: 16, Rejected: 2
 DCR: GPU0 717.874 Mh/s, GPU1 721.821 Mh/s, GPU2 761.669 Mh/s, GPU3 763.880 Mh/s

performance is as expected :)
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


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

PostPosted: Tue Feb 13, 2018 1:33 pm    Post subject: Reply with quote

I'm getting mere 25Mh/s with my watercooled R9 Nano. :(
I'm using etherminer.
Although I started mining just becaue my PC was mostly idling. So better to make some use for it by mining eth.
I have another GPU at the attic. It's HD 7850. I don't think It'll be of any use. Especially because my PSU is only 600W max.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
pcmaster
Advocate
Advocate


Joined: 04 Dec 2003
Posts: 2219
Location: Barcelona

PostPosted: Wed Feb 14, 2018 7:39 pm    Post subject: Reply with quote

bronzeboyvn wrote:
pcmaster wrote:
Code:

version: OpenCL 2.1 AMD-APP (2527.3)

Core2Duo ~ #  eselect opencl list
Available OpenCL implementations:
  [1]   mesa
  [2]   ocl-icd *


It looks like you use closed source AMDGPU.


I use AMDGPU from kernel amd amdgpu-pro-opencl for opencl
_________________
pcmaster
Back to top
View user's profile Send private message
bronzeboyvn
n00b
n00b


Joined: 31 Mar 2009
Posts: 58
Location: Vietnam

PostPosted: Sun Feb 18, 2018 3:32 am    Post subject: stuck Reply with quote

I have no idea now

If I choose mesa, here's the output of clinfo
Code:
Number of platforms                               1
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 17.2.8
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   Clover
Number of devices                                 1
  Device Name                                     Radeon RX 550 Series (AMD POLARIS12 / DRM 3.23.0 / 4.15.2-gentoo, LLVM 5.0.1)
  Device Vendor                                   AMD
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.1 Mesa 17.2.8
  Driver Version                                  17.2.8
  Device OpenCL C Version                         OpenCL C 1.1
  Device Type                                     GPU
  Device Available                                Yes
  Device Profile                                  FULL_PROFILE
  Max compute units                               8
  Max clock frequency                             1206MHz
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
  Compiler Available                              Yes
  Preferred work group size multiple              64
  Preferred / native vector sizes                 
    char                                                16 / 16     
    short                                                8 / 8       
    int                                                  4 / 4       
    long                                                 2 / 2       
    half                                                 0 / 0        (n/a)                                                                                                                       
    float                                                4 / 4                                                                                                                                   
    double                                               2 / 2        (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                                 No                                                                                                                                             
    Round to infinity                             No                                                                                                                                             
    IEEE754-2008 fused multiply-add               No                                                                                                                                             
    Support is emulated in software               No                                                                                                                                             
    Correctly-rounded divide and sqrt operations  No                                                                                                                                             
  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                              3218305024 (2.997GiB)
  Error Correction support                        No
  Max memory allocation                           1897275801 (1.767GiB)
  Unified memory for Host and Device              No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       1024 bits (128 bytes)
  Global Memory cache type                        None
  Image support                                   No
  Local memory type                               Local
  Local memory size                               32768 (32KiB)
  Max constant buffer size                        1897275801 (1.767GiB)
  Max number of constant args                     16
  Max size of kernel argument                     1024
  Queue properties                               
    Out-of-order execution                        No
    Profiling                                     Yes
  Profiling timer resolution                      0ns
  Execution capabilities                         
    Run OpenCL kernels                            Yes
    Run native kernels                            No
  Device Extensions                               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_byte_addressable_store cl_khr_fp64

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platform
  clCreateContext(NULL, ...) [default]            No platform
  clCreateContext(NULL, ...) [other]              Success [MESA]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 Clover
    Device Name                                   Radeon RX 550 Series (AMD POLARIS12 / DRM 3.23.0 / 4.15.2-gentoo, LLVM 5.0.1)
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Clover
    Device Name                                   Radeon RX 550 Series (AMD POLARIS12 / DRM 3.23.0 / 4.15.2-gentoo, LLVM 5.0.1)
  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                                 Clover
    Device Name                                   Radeon RX 550 Series (AMD POLARIS12 / DRM 3.23.0 / 4.15.2-gentoo, LLVM 5.0.1)


If I choose ocl-icd, it failes to install clinfo
Code:
>>> Failed to emerge dev-util/clinfo-2.2.17.10.25, Log file:
>>>  '/var/tmp/portage/dev-util/clinfo-2.2.17.10.25/temp/build.log'
 * Package:    dev-util/clinfo-2.2.17.10.25
 * Repository: gentoo
 * Maintainer: candrews@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox splitdebug userpriv usersandbox
cc -march=znver1 -O2 -pipe -std=c99 -g -Wall -Wextra -pedantic -Werror   -c -o clinfo.o src/clinfo.c
src/clinfo.c:120:30: error: ‘CL_DEVICE_TYPE_CUSTOM’ undeclared here (not in a function)
  CL_DEVICE_TYPE_ACCELERATOR, CL_DEVICE_TYPE_CUSTOM, CL_DEVICE_TYPE_ALL };
                              ^~~~~~~~~~~~~~~~~~~~~
src/clinfo.c: In function ‘device_info_partition_types’:
src/clinfo.c:1265:2: error: unknown type name ‘cl_device_partition_property’
  cl_device_partition_property *val = NULL;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/clinfo.c:1283:9: error: ‘CL_DEVICE_PARTITION_EQUALLY’ undeclared (first use in this function)
    case CL_DEVICE_PARTITION_EQUALLY: str_idx = 2; break;
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/clinfo.c:1283:9: note: each undeclared identifier is reported only once for each function it appears in
src/clinfo.c:1284:9: error: ‘CL_DEVICE_PARTITION_BY_COUNTS’ undeclared (first use in this function)
    case CL_DEVICE_PARTITION_BY_COUNTS: str_idx = 3; break;
...


I try with another clinfo: dev-util/amdapp-3.0-r2::science, here's the output of /opt/AMDAPP/bin/x86_64/clinfo
Code:
terminate called after throwing an instance of 'cl::Error'
  what():  clGetPlatformIDs
Aborted
Back to top
View user's profile Send private message
pcmaster
Advocate
Advocate


Joined: 04 Dec 2003
Posts: 2219
Location: Barcelona

PostPosted: Sun Feb 18, 2018 10:19 am    Post subject: Reply with quote

Try to download and compile the clInfo available in https://github.com/janten/clutilities

make sure you are using at least 5.0.0 version of llvm and dependencies.
_________________
pcmaster
Back to top
View user's profile Send private message
bronzeboyvn
n00b
n00b


Joined: 31 Mar 2009
Posts: 58
Location: Vietnam

PostPosted: Sun Feb 18, 2018 2:24 pm    Post subject: fresh Reply with quote

I install new gentoo completely from scratch.
Code:
Platform Version                                OpenCL 1.1 Mesa 17.2.8
Device Name                                     Radeon RX 550 Series (AMD POLARIS12 / DRM 3.23.0 / 4.15.2-gentoo, LLVM 5.0.1)
Back to top
View user's profile Send private message
bronzeboyvn
n00b
n00b


Joined: 31 Mar 2009
Posts: 58
Location: Vietnam

PostPosted: Sun Feb 18, 2018 2:59 pm    Post subject: thanks Reply with quote

I have some modifications : https://github.com/cuongth/clutilities
so that it can be compiled on Linux.
Here's my clinfo
Code:

./clinfo: /usr/lib64/OpenCL/vendors/mesa/libOpenCL.so.1: no version information available (required by ./clinfo)
Found 1 platform(s).
platform[0x7f25d20935c0]: profile: FULL_PROFILE
platform[0x7f25d20935c0]: version: OpenCL 1.1 Mesa 17.2.8
platform[0x7f25d20935c0]: name: Clover
platform[0x7f25d20935c0]: vendor: Mesa
platform[0x7f25d20935c0]: extensions: cl_khr_icd
platform[0x7f25d20935c0]: Found 1 device(s).
        device[0x5584473ba438]: NAME: Radeon RX 550 Series (AMD POLARIS12 / DRM 3.23.0 / 4.15.2-gentoo, LLVM 5.0.1)
        device[0x5584473ba438]: VENDOR: AMD
        device[0x5584473ba438]: PROFILE: FULL_PROFILE
        device[0x5584473ba438]: VERSION: OpenCL 1.1 Mesa 17.2.8
        device[0x5584473ba438]: EXTENSIONS: 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_byte_addressable_store cl_khr_fp64
        device[0x5584473ba438]: DRIVER_VERSION: 17.2.8

        device[0x5584473ba438]: Type: GPU
        device[0x5584473ba438]: EXECUTION_CAPABILITIES: Kernel
        device[0x5584473ba438]: GLOBAL_MEM_CACHE_TYPE: None (0)
        device[0x5584473ba438]: CL_DEVICE_LOCAL_MEM_TYPE: Local (1)
        device[0x5584473ba438]: SINGLE_FP_CONFIG: 0x6
        device[0x5584473ba438]: QUEUE_PROPERTIES: 0x2
        device[0x5584473ba438]: VENDOR_ID: 0x1002

        device[0x5584473ba438]: MAX_COMPUTE_UNITS: 8
        device[0x5584473ba438]: MAX_WORK_ITEM_DIMENSIONS: 3
        device[0x5584473ba438]: MAX_WORK_GROUP_SIZE: 256
        device[0x5584473ba438]: PREFERRED_VECTOR_WIDTH_CHAR: 16
        device[0x5584473ba438]: PREFERRED_VECTOR_WIDTH_SHORT: 8
        device[0x5584473ba438]: PREFERRED_VECTOR_WIDTH_INT: 4
        device[0x5584473ba438]: PREFERRED_VECTOR_WIDTH_LONG: 2
        device[0x5584473ba438]: PREFERRED_VECTOR_WIDTH_FLOAT: 4
        device[0x5584473ba438]: PREFERRED_VECTOR_WIDTH_DOUBLE: 2
        device[0x5584473ba438]: MAX_CLOCK_FREQUENCY: 1206
        device[0x5584473ba438]: ADDRESS_BITS: 64
        device[0x5584473ba438]: MAX_MEM_ALLOC_SIZE: 1897216819
        device[0x5584473ba438]: IMAGE_SUPPORT: 0
        device[0x5584473ba438]: MAX_READ_IMAGE_ARGS: 32
        device[0x5584473ba438]: MAX_WRITE_IMAGE_ARGS: 32
        device[0x5584473ba438]: IMAGE2D_MAX_WIDTH: 32768
        device[0x5584473ba438]: IMAGE2D_MAX_HEIGHT: 32768
        device[0x5584473ba438]: IMAGE3D_MAX_WIDTH: 4096
        device[0x5584473ba438]: IMAGE3D_MAX_HEIGHT: 4096
        device[0x5584473ba438]: IMAGE3D_MAX_DEPTH: 4096
        device[0x5584473ba438]: MAX_SAMPLERS: 32
        device[0x5584473ba438]: MAX_PARAMETER_SIZE: 1024
        device[0x5584473ba438]: MEM_BASE_ADDR_ALIGN: 1024
        device[0x5584473ba438]: MIN_DATA_TYPE_ALIGN_SIZE: 128
        device[0x5584473ba438]: GLOBAL_MEM_CACHELINE_SIZE: 0
        device[0x5584473ba438]: GLOBAL_MEM_CACHE_SIZE: 0
        device[0x5584473ba438]: GLOBAL_MEM_SIZE: 3218305024
        device[0x5584473ba438]: MAX_CONSTANT_BUFFER_SIZE: 1897216819
        device[0x5584473ba438]: MAX_CONSTANT_ARGS: 16
        device[0x5584473ba438]: LOCAL_MEM_SIZE: 32768
        device[0x5584473ba438]: ERROR_CORRECTION_SUPPORT: 0
        device[0x5584473ba438]: PROFILING_TIMER_RESOLUTION: 0
        device[0x5584473ba438]: ENDIAN_LITTLE: 1
        device[0x5584473ba438]: AVAILABLE: 1
        device[0x5584473ba438]: COMPILER_AVAILABLE: 1


Output of compiled binary ncl from main.cpp
Code:

./ncl: /usr/lib64/OpenCL/vendors/mesa/libOpenCL.so.1: no version information available (required by ./ncl)
Size of universe: 156 bytes
Position of sun:    0.000000,  0.000000,  0.000000
Position of earth: 40.000000,  0.000000,  0.000000
Position of moon:  44.000000,  0.000000,  0.000000
Device: 0x559977a36438
Command queue created!
Program created from calc.cl
Program built from calc.cl
Performing blocking write of 156 bytes of data from 0x7ffc81deed00
Performing blocking read of 156 bytes of data to 0x7ffc81deec60
156 Bytes of data read from graphics card
Position of sun:    0.057714,  0.000042,  0.000000
Position of earth: 42.182133,  0.004705,  0.000000
Position of moon:  26.230251,  0.116320,  0.000000


If I switch to ocl-icd, the output of clinfo
Code:

Unable to query the number of platforms: unknown error -1001


Output of compiled binary ncl from main.cpp
Code:

Size of universe: 156 bytes
Position of sun:    0.000000,  0.000000,  0.000000
Position of earth: 40.000000,  0.000000,  0.000000
Position of moon:  44.000000,  0.000000,  0.000000
OpenCL Error:
OpenCL Error: CL_INVALID_PLATFORM
Device: (nil)
OpenCL Error: CL_INVALID_DEVICE
OpenCL Error: CL_INVALID_CONTEXT
Command queue created!
OpenCL Error: CL_INVALID_CONTEXT
Program created from calc.cl
OpenCL Error: CL_INVALID_PROGRAM
Program built from calc.cl
OpenCL Error: CL_INVALID_PROGRAM
OpenCL Error: CL_INVALID_CONTEXT
Performing blocking write of 156 bytes of data from 0x7fff6a2bc1b0
OpenCL Error: CL_INVALID_COMMAND_QUEUE
OpenCL Error: CL_INVALID_COMMAND_QUEUE
OpenCL Error: CL_INVALID_KERNEL
OpenCL Error: CL_INVALID_COMMAND_QUEUE
OpenCL Error: CL_INVALID_COMMAND_QUEUE
Performing blocking read of 156 bytes of data to 0x7fff6a2bc110
OpenCL Error: CL_INVALID_COMMAND_QUEUE
OpenCL Error: CL_INVALID_COMMAND_QUEUE
156 Bytes of data read from graphics card
Position of sun:    0.000000, 931921440153274299711488.000000,  0.000000
Position of earth:  0.000000,  0.000000,  0.000000
Position of moon:   0.000000, 731888262067293666672640.000000,  0.000000
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


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

PostPosted: Mon Feb 19, 2018 1:56 am    Post subject: Reply with quote

Post the contents of your /etc/env.d/03opencl, please.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
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: Tue Feb 20, 2018 3:19 am    Post subject: surrender Reply with quote

Currently, my /etc/env.d/03opencl is
Code:
LDPATH="/usr/lib32/OpenCL/vendors/mesa:/usr/lib64/OpenCL/vendors/mesa"
OPENCL_PROFILE="mesa"

i.e. I'm using open source Mesa with amdgpu-pro-opencl as we know using clover gets you practically nowhere.
I tried with amdgpu-pro::ROKO_ with some modification to install x11-drivers/amdgpu-pro-17.50.511655 (because x11-drivers/amdgpu-pro-17.40.492261 requires old kernel <=sys-kernel/gentoo-sources-4.11.0, https://warwick.ac.uk/fac/cross_fac/complexity/people/staff/delgenio/amdgpuprogentoo/). After
Code:
eselect opencl set amdgpu-pro
eselect opengl set amdgpu-pro

, it failed to start Plasma KDE, the screen blink frequently at log in prompt (no GUI). I used USB to boot again in Gentoo and see clinfo gave Segmentation fault.

So I decide to stay with Mesa and waiting for amdgpu-pro officially supported. If someone is using kernel 4.15.4 can install amdgpu-pro drivers, I'm glad if you can share the ebuild.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


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

PostPosted: Tue Feb 20, 2018 8:52 am    Post subject: Reply with quote

I use amdgpu (the open source one) as my gpu drivers. Then I have OpenCL libraries from amdgpu-pro-opencl from offical gentoo repository. So, no amdgpu-pro closed source drivers needed.
AND I also have enabled opencl USE -flag in /etc/portage/make.conf BUT I've disabled it for mesa. Since it seems to mess things up (as yo why it does/did, I have no clue, but there's no need to keep clover enabled anyway when you have OpenCL libraries from the closed source driver package).
Code:
 - - bindist              : Disable patent-encumbered ARB_texture_float, EXT_texture_shared_exponent, and EXT_packed_float extensions.
 + + classic              : Build drivers based on the classic architecture.
 + + d3d9                 : Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine.
 - - debug                : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 + + dri3                 : Enable DRI3 support.
 + + egl                  : Enable EGL support.
 + + gallium              : Build drivers based on Gallium3D, the new architecture for 3D graphics drivers.
 + + gbm                  : Enable the Graphics Buffer Manager for EGL on KMS.
 - - gles1                : Enable GLESv1 support.
 + + gles2                : Enable GLESv2 support.
 + + llvm                 : Enable LLVM backend for Gallium3D.
 + + nptl                 : Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually)
 - - opencl               : Enable the Clover Gallium OpenCL state tracker.
 + + openmax              : Enable OpenMAX video decode/encode acceleration for Gallium3D.
 + + osmesa               : Build the Mesa library for off-screen rendering.
 - - pax_kernel           : Enable if the user plans to run the package under a pax enabled hardened kernel
 - - pic                  : disable optimized assembly code that is not PIC friendly
 - - unwind               : Add support for stack trace unwinding and function name resolution
 + + vaapi                : Enable Video Acceleration API for hardware decoding
 - - valgrind             : Compile in valgrind memory hints
 + + vdpau                : Enable the VDPAU acceleration interface for the Gallium3D Video Layer.
 - - video_cards_i915     : VIDEO_CARDS setting to build driver for Intel i915 video cards
 - - video_cards_i965     : VIDEO_CARDS setting to build driver for Intel i965 video cards
 - - video_cards_intel    : VIDEO_CARDS setting to build driver for Intel video cards
 - - video_cards_nouveau  : VIDEO_CARDS setting to build reverse-engineered driver for nvidia cards
 - - video_cards_r100     : VIDEO_CARDS setting to build only r100 based chips code for radeon
 - - video_cards_r200     : VIDEO_CARDS setting to build only r200 based chips code for radeon
 - - video_cards_r300     : VIDEO_CARDS setting to build only r300, r400 and r500 based chips code for radeon
 - - video_cards_r600     : VIDEO_CARDS setting to build only r600, r700, Evergreen and Northern Islands based chips code for radeon
 + + video_cards_radeon   : VIDEO_CARDS setting to build driver for ATI radeon video cards
 + + video_cards_radeonsi : VIDEO_CARDS setting to build only Southern Islands based chips code for radeon
 - - video_cards_virgl    : VIDEO_CARDS setting to build driver for virgil (virtual 3D GPU)
 - - video_cards_vmware   : VIDEO_CARDS setting to build driver for vmware video cards
 - - vulkan               : Enable Vulkan drivers
 + + wayland              : Enable support for dev-libs/wayland
 + + xa                   : Enable the XA (X Acceleration) API for Gallium3D.
 + + xvmc                 : Enable the XvMC acceleration interface for the Gallium3D Video Layer.
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for media-libs/mesa-17.3.2:
 U I

And since mesa has -opencl it means that Clover Gallium OpenCL state tracker is disabled and...
Code:
# eselect opencl list
Available OpenCL implementations:
  [1]   ocl-icd *
... I have only ocl-icd as an choice.

So basically. You'd probably just need to
run as root:
echo "media-libs/mesa -opencl" > /etc/portage/package.use/mesa-clover

Of course create needed /etc/portage/package.use/ -directory if it doesn't exist.
Then you should emerge -DNa @world. Just check that mesa is in there with change for disabling opencl. After that you should probably restart X so that mesa libraries get reloaded. Oh and unmerge amdgpu-pro drivers. Those SURELY mess things up with amdgpu-pro-opencl.

Anyway. That's what I have and it has been working from the first version of amdgpu-pro-opencl that appeared to Gentoo repository.

bronzeboyvn wrote:
waiting for amdgpu-pro officially supported.
... oh and it's not up to Gentoo devs to support closed-source drivers offically. It's only if AMD is willing to support Gentoo (so far AMD only supports Ubuntu, SuSe, Redhat and maybe Fedora afaik). So you might be waiting for ever for that support. The open source drivers are supported in Gentoo.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
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: Tue Feb 20, 2018 10:58 am    Post subject: Reply with quote

I follow your guide and switch to only one ocl-icd. OpenCL headers still link to Mesa headers (that is deleted), so I create new soft-links. There are /usr/lib64/OpenCL/global/include/CL-{1.0,1.1,1.2,2.0,2.1}, I choose to link to CL-1.2 headers.
locate libOpenCL | xargs ls -l
Code:
lrwxrwxrwx 1 root root     38 Feb 20 16:41 /usr/lib32/libOpenCL.so -> OpenCL/vendors/mesa/libOpenCL.so.1.0.0
lrwxrwxrwx 1 root root     38 Feb 20 16:41 /usr/lib32/libOpenCL.so.1 -> OpenCL/vendors/mesa/libOpenCL.so.1.0.0
-rwxr-xr-x 1 root root    939 Feb 20 16:16 /usr/lib64/OpenCL/vendors/ocl-icd/libOpenCL.la
lrwxrwxrwx 1 root root     18 Feb 20 16:16 /usr/lib64/OpenCL/vendors/ocl-icd/libOpenCL.so -> libOpenCL.so.1.0.0
lrwxrwxrwx 1 root root     18 Feb 20 16:16 /usr/lib64/OpenCL/vendors/ocl-icd/libOpenCL.so.1 -> libOpenCL.so.1.0.0
-rwxr-xr-x 1 root root 133152 Feb 20 16:16 /usr/lib64/OpenCL/vendors/ocl-icd/libOpenCL.so.1.0.0
-rw-r--r-- 1 root root  24232 Feb 20 16:16 /usr/lib64/debug/usr/lib64/OpenCL/vendors/ocl-icd/libOpenCL.so.1.0.0.debug
lrwxrwxrwx 1 root root     41 Feb 20 16:42 /usr/lib64/libOpenCL.so -> OpenCL/vendors/ocl-icd/libOpenCL.so.1.0.0
lrwxrwxrwx 1 root root     41 Feb 20 16:42 /usr/lib64/libOpenCL.so.1 -> OpenCL/vendors/ocl-icd/libOpenCL.so.1.0.0


I tried:
+ delete libOpenCL in lib32 (because Mesa directory is deleted)
+ link libOpenCL in lib32 to lib in lib64 of ocl-icd
both of them, it doesn't work. I compile some clinfo tools from github, it fails to get number of platforms (0). I can't install virtual/opencl because it requires USE opencl for media-libs/mesa.[/b]
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


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

PostPosted: Tue Feb 20, 2018 11:26 am    Post subject: Reply with quote

You might need gentoo-gpu overlay.
I checked and have these packages from said overlay:
Code:
# find /var/db/pkg -type f -name repository -printf '%h::' -exec cat {} \; | sed 's|/var/db/pkg/||' | grep '::gentoo-gpu'
app-eselect/eselect-opengl-1.3.3_p1::gentoo-gpu
dev-libs/ocl-icd-2.2.11-r1::gentoo-gpu

_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
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: Tue Feb 20, 2018 1:22 pm    Post subject: Reply with quote

I lost opengl profile after used eselect-opengl::gentoo-gpu
Code:
eselect opengl list
!!! Error: Invalid symbolic links: OpenGL implementation "" symbolic links are missing.
Available OpenGL implementations:
  (none found)
exiting


While using eselect-opengl from portage
Code:
eselect opengl list
Available OpenGL implementations:
  [1]   xorg-x11


Should we use eselect-opengl::gentoo-gpu? I we should, so what we need to reinstall related with OpenGL?
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


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

PostPosted: Tue Feb 20, 2018 2:28 pm    Post subject: Reply with quote

Sorry my bad. :( In a hurry I read opengl as opencl.
Interestingly I also get none from the eselect output but still have direct rendering enabled.
Better to remove eselect-opengl::gentoo-gpu.

Now... back to OpenCL.
It seems that I have app-eselect/eselect-opencl-1.1.0-r6::gamarouns installed. That might help along with dev-libs/ocl-icd-2.2.11-r1::gentoo-gpu.

So. Now you have
  • removed amdgpu-pro
  • recompiled mesa with -opencl
  • your gpu drivers are amdgpu
  • you have installed opencl libraries by emerging amdgpu-pro-opencl
... right?

After that see if you can select some OpenCL implementation using 'eselect opencl'.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
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 21, 2018 1:39 am    Post subject: Reply with quote

I have

removed amdgpu-pro
recompiled mesa with -opencl
gpu drivers are amdgpu (if it means that I have to config kernel following https://wiki.gentoo.org/wiki/AMDGPU, so Yes)
installed opencl libraries by emerging amdgpu-pro-opencl

I can eselect ocl-icd now, but clinfo still doesn't return platform info.

Do we need to link library to /opt/amdgpu (that is belong to amdgpu-pro-opencl) ? I see that /usr/lib64/libdrm_amdgpu.so.1.0.0 and /opt/amdgpu/lib64/libdrm_amdgpu.so.1.0.0 are different.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


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

PostPosted: Wed Feb 21, 2018 2:01 pm    Post subject: Reply with quote

Ok. This is strange...

shellcmd: equery -CN f amdgpu-pro-opencl :
 * Searching for amdgpu-pro-opencl ...
 * Contents of dev-libs/amdgpu-pro-opencl-17.50.511655:
/etc
/etc/OpenCL
/etc/OpenCL/vendors
/etc/OpenCL/vendors/amdgpu-pro.icd
/opt
/opt/amdgpu
/opt/amdgpu/lib64
/opt/amdgpu/lib64/libamdocl12cl64.so
/opt/amdgpu/lib64/libamdocl64.so
/opt/amdgpu/lib64/libdrm_amdgpu.so.1 -> libdrm_amdgpu.so.1.0.0
/opt/amdgpu/lib64/libdrm_amdgpu.so.1.0.0
/opt/amdgpu/share
/opt/amdgpu/share/libdrm
/opt/amdgpu/share/libdrm/amdgpu.ids
shellcmd: equery -CN f ocl-icd :
 * Searching for ocl-icd ...
 * Contents of dev-libs/ocl-icd-2.2.11-r1:
/etc
/etc/OpenCL
/etc/OpenCL/vendors
/etc/OpenCL/vendors/ocl-icd.icd
/usr
/usr/include
/usr/include/ocl_icd.h
/usr/lib64
/usr/lib64/OpenCL
/usr/lib64/OpenCL/vendors
/usr/lib64/OpenCL/vendors/ocl-icd
/usr/lib64/OpenCL/vendors/ocl-icd/include
/usr/lib64/OpenCL/vendors/ocl-icd/include/CL
/usr/lib64/OpenCL/vendors/ocl-icd/include/CL/cl.h
/usr/lib64/OpenCL/vendors/ocl-icd/include/CL/cl_ext.h
/usr/lib64/OpenCL/vendors/ocl-icd/include/CL/cl_gl.h
/usr/lib64/OpenCL/vendors/ocl-icd/include/CL/cl_gl_ext.h
/usr/lib64/OpenCL/vendors/ocl-icd/include/CL/cl_platform.h
/usr/lib64/OpenCL/vendors/ocl-icd/include/CL/opencl.h
/usr/lib64/OpenCL/vendors/ocl-icd/libOpenCL.la
/usr/lib64/OpenCL/vendors/ocl-icd/libOpenCL.so -> libOpenCL.so.1.0.0
/usr/lib64/OpenCL/vendors/ocl-icd/libOpenCL.so.1 -> libOpenCL.so.1.0.0
/usr/lib64/OpenCL/vendors/ocl-icd/libOpenCL.so.1.0.0
/usr/lib64/pkgconfig
/usr/lib64/pkgconfig/OpenCL.pc
/usr/lib64/pkgconfig/ocl-icd.pc
/usr/share
/usr/share/doc
/usr/share/doc/ocl-icd-2.2.11-r1
/usr/share/doc/ocl-icd-2.2.11-r1/NEWS.bz2
/usr/share/doc/ocl-icd-2.2.11-r1/README.bz2
/usr/share/doc/ocl-icd-2.2.11-r1/examples
/usr/share/doc/ocl-icd-2.2.11-r1/examples/ocl_icd_bindings.c.bz2
/usr/share/doc/ocl-icd-2.2.11-r1/html
/usr/share/doc/ocl-icd-2.2.11-r1/html/libOpenCL.html
/usr/share/man
/usr/share/man/man7
/usr/share/man/man7/libOpenCL.7.bz2
/usr/share/man/man7/libOpenCL.so.7
... but then:
shellcmd: eselect opencl list :
Available OpenCL implementations:
  [1]   ocl-icd *


What's the contents of your /etc/OpenCL/vendors/ocl-icd.icd?
Also what you get if you run
Code:
LD_LIBRARY_PATH="/opt/amdgpu/lib64" clinfo
?
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
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 1, 2, 3, 4, 5  Next
Page 1 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