Radeon 5700 XT and OpenCL not working

Hi all, I have Radeon 5700 XT and wanted to configure crypto mining with OpenCL.
I have following packages installed:

$ pacman -Q | grep "mesa\|opencl"
lib32-libva-mesa-driver 20.3.1-1
lib32-mesa 20.3.1-1
lib32-mesa-demos 8.4.0-2
lib32-mesa-vdpau 20.3.1-1
libva-mesa-driver 20.3.1-1
mesa 20.3.1-1
mesa-demos 8.4.0-4
mesa-vdpau 20.3.1-1
opencl-headers 2:2020.06.16-1
opencl-mesa 20.3.1-1

clinfo returns:

$ clinfo 
Number of platforms                               1
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 20.3.1
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   Clover
Number of devices                                 1
  Device Name                                     AMD Radeon RX 5700 XT (NAVI10, DRM 3.40.0, 5.10.2-2-MANJARO, LLVM 11.0.0)
  Device Vendor                                   AMD
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.1 Mesa 20.3.1
  Driver Version                                  20.3.1
  Device OpenCL C Version                         OpenCL C 1.1 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Max compute units                               40
  Max clock frequency                             2100MHz
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
=== CL_PROGRAM_BUILD_LOG ===
fatal error: cannot open file '/usr/share/clc/gfx1010-amdgcn-mesa-mesa3d.bc': No such file or directory
  Preferred work group size multiple (kernel)     <getWGsizes:1445: create kernel : error -46>
  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                              8589934592 (8GiB)
  Error Correction support                        No
  Max memory allocation                           6871947673 (6.4GiB)
  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 number of constant args                     16
  Max constant buffer size                        67108864 (64MiB)
  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

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Clover
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [MESA]
  clCreateContext(NULL, ...) [default]            Success [MESA]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 Clover
    Device Name                                   AMD Radeon RX 5700 XT (NAVI10, DRM 3.40.0, 5.10.2-2-MANJARO, LLVM 11.0.0)
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Clover
    Device Name                                   AMD Radeon RX 5700 XT (NAVI10, DRM 3.40.0, 5.10.2-2-MANJARO, LLVM 11.0.0)
  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                                   AMD Radeon RX 5700 XT (NAVI10, DRM 3.40.0, 5.10.2-2-MANJARO, LLVM 11.0.0)

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.13
  ICD loader Profile                              OpenCL 3.0

I have Manjaro with KDE, 5.10 kernel, everything updated.
OpenCL apps don’t work, they just simply say that "Failed to initialize the AMDCL platform: AMDCL: No AMD devices are available ", or “No OpenCL platforms found No avaiable GPUs for mining. Please check your drivers and/or hardware.”.

Can someone please advise. Thanks!

1 Like

You can try installing opencl-amd from the AUR.

4 Likes

Please use the Preformatted text </> button for terminal output, not the Quote button ". I’ve done it for you this time.

1 Like

Thanks! It worked. Any idea why no package in Manjaro repository can provide OpenCL while unofficial AUR does straight away?
Can I uninstall opencl-headers and opencl-mesa? What they are for, if they don’t provide OpenCL?

Possibly because of the (apparent) amount of hair pulling the maintainers do to get a decent working package. I don’t think that main developers want to invest that kind of time on one specialized package.

If you’re not developing OpenCL software, yes.

This, I can’t answer; other than the fact that I didn’t need the AUR package until I started running folding at home. Since they seem to co-exist, I just let both of them be. YMMV for mining.

Both opencl-mesa and opencl-amd do, however the former is open-source from Mesa while the latter is proprietary from AMD.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.