Ubuntu 20.04-无法使用 AMD Radeon RX 5700 XT 运行 opencl

Ubuntu 20.04-无法使用 AMD Radeon RX 5700 XT 运行 opencl

当我运行这个时:darktable-cltest我得到以下输出:

0.018453 [opencl_init] opencl related configuration options:
0.018463 [opencl_init] 
0.018479 [opencl_init] opencl: 1
0.018480 [opencl_init] opencl_scheduling_profile: 'default'
0.018482 [opencl_init] opencl_library: ''
0.018485 [opencl_init] opencl_memory_requirement: 768
0.018487 [opencl_init] opencl_memory_headroom: 400
0.018490 [opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
0.018493 [opencl_init] opencl_mandatory_timeout: 200
0.018496 [opencl_init] opencl_size_roundup: 16
0.018499 [opencl_init] opencl_async_pixelpipe: 0
0.018501 [opencl_init] opencl_synch_cache: active module
0.018503 [opencl_init] opencl_number_event_handles: 25
0.018506 [opencl_init] opencl_micro_nap: 1000
0.018508 [opencl_init] opencl_use_pinned_memory: 0
0.018509 [opencl_init] opencl_use_cpu_devices: 0
0.018512 [opencl_init] opencl_avoid_atomics: 0
0.018515 [opencl_init] 
0.018634 [opencl_init] found opencl runtime library 'libOpenCL'
0.018662 [opencl_init] opencl library 'libOpenCL' found on your system and loaded
0.072966 [opencl_init] found 1 platform
0.072979 [opencl_init] found 1 device
0.073005 [opencl_init] discarding device 0 `AMD Radeon RX 5700 XT (NAVI10, DRM 3.41.0, 5.4.0-54-generic, LLVM 12.0.1)' - The OpenCL driver doesn't provide image support. See also 'clinfo' output.
0.073009 [opencl_init] no suitable devices found.
0.073011 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
0.073014 [opencl_init] initial status of opencl enabled flag is OFF.

当我运行时clinfo我得到以下输出:

Number of platforms                               1
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 21.3.0-devel (git-edfcc4f 2021-08-17 focal-oibaf-ppa)
  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.41.0, 5.4.0-54-generic, LLVM 12.0.1)
  Device Vendor                                   AMD
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.1 Mesa 21.3.0-devel (git-edfcc4f 2021-08-17 focal-oibaf-ppa)
  Driver Version                                  21.3.0-devel
  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/local//usr/lib/clc/gfx1010-amdgcn-mesa-mesa3d.bc': No such file or directory
  Preferred work group size multiple              <getWGsizes:1200: 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                              27487790692 (25.6GiB)
  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 cl_khr_extended_versioning

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.41.0, 5.4.0-54-generic, LLVM 12.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                                   AMD Radeon RX 5700 XT (NAVI10, DRM 3.41.0, 5.4.0-54-generic, LLVM 12.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                                   AMD Radeon RX 5700 XT (NAVI10, DRM 3.41.0, 5.4.0-54-generic, LLVM 12.0.1)

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

为什么我会得到opencl is NOT AVAILABLE on this system.?我怎样才能使 openCL 在我的系统上运行。当我尝试使用其他需要 openCL 的程序时,它们也说系统上没有 OpenCL。我该如何解决这个问题?

相关内容