Darktable: OpenCL not available with 3.6 but 3.7 (Manjaro, AMD Radeon)

Hi all,
I’ve installed Manjaro with a Radeon RX 6600 XT.
opencl-amd (21.30…) is also installed and clinfo says everything is fine. But darktable-cltest (3.6) gives out, that opencl is not available. I’ve tried several things and finally I’ve installed darktable-cr3-git (3.7). After that, darktable-cltest was successful and I was able to activate the GPU support but I had some issues with the highlights. So it seems that I can either use 3.6 which is working well but with no GPU support available or DT 3.7 but this would be not acceptable due to the highlight errors.

Can anybody help with that? I’ve tried also an older opencl-amd (20.5) but this caused other errors so I had to go back to the current version. Please find the output of clinfo and darktable-cltest below.

Thanks a lot!
items

clinfo:
umber of platforms 1
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.
Platform Version OpenCL 2.0 AMD-APP (3314.0)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_amd_event_callback
Platform Extensions function suffix AMD

Platform Name AMD Accelerated Parallel Processing
Number of devices 1
Device Name gfx1032
Device Vendor Advanced Micro Devices, Inc.
Device Vendor ID 0x1002
Device Version OpenCL 2.0
Driver Version 3314.0 (HSA1.1,LC)
Device OpenCL C Version OpenCL C 2.0
Device Type GPU
Device Board Name (AMD) Navi 23 [Radeon RX 6600/6600 XT/6600M]
Device PCI-e ID (AMD) 0x73ff
Device Topology (AMD) PCI-E, 0000:0c:00.0
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 16
SIMD per compute unit (AMD) 4
SIMD width (AMD) 32
SIMD instruction width (AMD) 1
Max clock frequency 2900MHz
Graphics IP (AMD) 10.3
Device Partition (core)
Max number of sub-devices 16
Supported partition types None
Supported affinity domains (n/a)
Max work item dimensions 3
Max work item sizes 1024x1024x1024
Max work group size 256
Preferred work group size (AMD) 256
Max work group size (AMD) 1024
Preferred work group size multiple (kernel) 32
Wavefront width (AMD) 32
Preferred / native vector sizes
char 4 / 4
short 2 / 2
int 1 / 1
long 1 / 1
half 1 / 1 (cl_khr_fp16)
float 1 / 1
double 1 / 1 (cl_khr_fp64)
Half-precision Floating-point support (cl_khr_fp16)
Denormals No
Infinity and NANs No
Round to nearest No
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 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
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 8573157376 (7.984GiB)
Global free memory (AMD) 8372224 (7.984GiB) 8372224 (7.984GiB)
Global memory channels (AMD) 4
Global memory banks per channel (AMD) 4
Global memory bank width (AMD) 256 bytes
Error Correction support No
Max memory allocation 7287183768 (6.787GiB)
Unified memory for Host and Device No
Shared Virtual Memory (SVM) capabilities (core)
Coarse-grained buffer sharing Yes
Fine-grained buffer sharing Yes
Fine-grained system sharing No
Atomics No
Minimum alignment for any data type 128 bytes
Alignment of base address 1024 bits (128 bytes)
Preferred alignment for atomics
SVM 0 bytes
Global 0 bytes
Local 0 bytes
Max size for global variable 7287183768 (6.787GiB)
Preferred total size of global vars 8573157376 (7.984GiB)
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 29695
Max size for 1D images from buffer 134217728 pixels
Max 1D or 2D image array size 8192 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 16384x16384x8192 pixels
Max number of read image args 128
Max number of write image args 8
Max number of read/write image args 64
Max number of pipe args 16
Max active pipe reservations 16
Max pipe packet size 2992216472 (2.787GiB)
Local memory type Local
Local memory size 65536 (64KiB)
Local memory size per CU (AMD) 65536 (64KiB)
Local memory banks (AMD) 32
Max number of constant args 8
Max constant buffer size 7287183768 (6.787GiB)
Preferred constant buffer size (AMD) 16384 (16KiB)
Max size of kernel argument 1024
Queue properties (on host)
Out-of-order execution No
Profiling Yes
Queue properties (on device)
Out-of-order execution Yes
Profiling Yes
Preferred size 262144 (256KiB)
Max size 8388608 (8MiB)
Max queues on device 1
Max events on device 1024
Prefer user sync for interop Yes
Number of P2P devices (AMD) 0
Profiling timer resolution 1ns
Profiling timer offset since Epoch (AMD) 0ns (Thu Jan 1 01:00:00 1970)
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
Thread trace supported (AMD) No
Number of async queues (AMD) 8
Max real-time compute queues (AMD) 8
Max real-time compute units (AMD) 16
printf() buffer size 4194304 (4MiB)
Built-in kernels (n/a)
Device Extensions cl_khr_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_media_ops cl_amd_media_ops2 cl_khr_image2d_from_buffer cl_khr_subgroups cl_khr_depth_images cl_amd_copy_buffer_p2p cl_amd_assembly_program

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 gfx1032
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 gfx1032
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 gfx1032

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

darktable-cltest
0.014412 [opencl_init] opencl related configuration options:
0.014419 [opencl_init]
0.014422 [opencl_init] opencl: 1
0.014426 [opencl_init] opencl_scheduling_profile: ‘very fast GPU’
0.014428 [opencl_init] opencl_library: ‘’
0.014431 [opencl_init] opencl_memory_requirement: 768
0.014433 [opencl_init] opencl_memory_headroom: 400
0.014435 [opencl_init] opencl_device_priority: ‘/!0,///!0,*’
0.014439 [opencl_init] opencl_mandatory_timeout: 200
0.014441 [opencl_init] opencl_size_roundup: 16
0.014443 [opencl_init] opencl_async_pixelpipe: 0
0.014445 [opencl_init] opencl_synch_cache: active module
0.014447 [opencl_init] opencl_number_event_handles: 25
0.014450 [opencl_init] opencl_micro_nap: 1000
0.014451 [opencl_init] opencl_use_pinned_memory: 0
0.014453 [opencl_init] opencl_use_cpu_devices: 0
0.014454 [opencl_init] opencl_avoid_atomics: 0
0.014456 [opencl_init]
0.014566 [opencl_init] found opencl runtime library ‘libOpenCL’
0.014577 [opencl_init] opencl library ‘libOpenCL’ found on your system and loaded
0.059330 [opencl_init] found 1 platform
0.059337 [opencl_init] found 1 device
0.059348 [opencl_init] device 0 gfx1032' supports image sizes of 16384 x 16384 0.059351 [opencl_init] device 0 gfx1032’ allows GPU memory allocations of up to 6949MB
[opencl_init] device 0: gfx1032
GLOBAL_MEM_SIZE: 8176MB
MAX_WORK_GROUP_SIZE: 256
MAX_WORK_ITEM_DIMENSIONS: 3
MAX_WORK_ITEM_SIZES: [ 1024 1024 1024 ]
DRIVER_VERSION: 3314.0 (HSA1.1,LC)
DEVICE_VERSION: OpenCL 2.0
0.221379 [opencl_init] options for OpenCL compiler: -w -cl-fast-relaxed-math -DAMD=1 -I"/usr/share/darktable/kernels"
0.221532 [opencl_init] compiling program demosaic_ppg.cl' .. 0.221738 [opencl_load_program] loaded cached binary program from file '/home/items/.cache/darktable/cached_kernels_for_gfx1032_33140HSA11LC/demosaic_ppg.cl.bin' MD5: '53f37f8e2f8d9ed925d67971b1af1c97' 0.221744 [opencl_load_program] successfully loaded program from '/usr/share/darktable/kernels/demosaic_ppg.cl' MD5: '53f37f8e2f8d9ed925d67971b1af1c97' 0.222254 [opencl_build_program] successfully built program 0.222260 [opencl_build_program] BUILD STATUS: 0 0.222263 BUILD LOG: 0.222267 0.222274 [opencl_init] compiling program atrous.cl’ …
0.222330 [opencl_load_program] loaded cached binary program from file ‘/home/items/.cache/darktable/cached_kernels_for_gfx1032_33140HSA11LC/atrous.cl.bin’ MD5: ‘cbd62f93ddfb7705b96f63f2090ea33b’
0.222334 [opencl_load_program] successfully loaded program from ‘/usr/share/darktable/kernels/atrous.cl’ MD5: ‘cbd62f93ddfb7705b96f63f2090ea33b’
0.222482 [opencl_build_program] successfully built program
0.222486 [opencl_build_program] BUILD STATUS: 0
0.222487 BUILD LOG:
0.222488
0.222492 [opencl_init] compiling program basic.cl' .. 0.223205 [opencl_load_program] loaded cached binary program from file '/home/items/.cache/darktable/cached_kernels_for_gfx1032_33140HSA11LC/basic.cl.bin' MD5: '7ec6758cb7f3a77d3e726473a825fdce' 0.223210 [opencl_load_program] successfully loaded program from '/usr/share/darktable/kernels/basic.cl' MD5: '7ec6758cb7f3a77d3e726473a825fdce' 0.226034 [opencl_build_program] successfully built program 0.226040 [opencl_build_program] BUILD STATUS: 0 0.226042 BUILD LOG: 0.226043 0.226048 [opencl_init] compiling program blendop.cl’ …
0.226171 [opencl_fopen_stat] could not open file `/home/items/.cache/darktable/cached_kernels_for_gfx1032_33140HSA11LC/blendop.cl.bin’!
0.226176 [opencl_load_program] could not load cached binary program, trying to compile source
0.226182 [opencl_load_program] successfully loaded program from ‘/usr/share/darktable/kernels/blendop.cl’ MD5: ‘659a4e8d7cb0972344d959dcb4ff251d’
0.872467 [opencl_build_program] could not build program: -11
0.872480 [opencl_build_program] BUILD STATUS: -2
0.872482 BUILD LOG:
0.872483 lld: error: undefined hidden symbol: rgb_to_JzCzhz

referenced by /tmp/comgr-e875f8/input/linked.bc.o:(blendop_display_channel)
referenced by /tmp/comgr-e875f8/input/linked.bc.o:(blendop_display_channel)
referenced by /tmp/comgr-e875f8/input/linked.bc.o:(blendop_display_channel)
referenced 9 more times

lld: error: undefined hidden symbol: get_rgb_matrix_luminance

referenced by /tmp/comgr-e875f8/input/linked.bc.o:(blendop_display_channel)
referenced by /tmp/comgr-e875f8/input/linked.bc.o:(blendop_display_channel)
referenced by /tmp/comgr-e875f8/input/linked.bc.o:(blendop_display_channel)
referenced 1 more times
Error: Creating the executable from LLVM IRs failed.

0.872486 [opencl_init] failed to compile program `blendop.cl’!
0.872492 [opencl_init] no suitable devices found.
0.872495 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
0.872497 [opencl_init] initial status of opencl enabled flag is OFF.

https://blog.cryptomilk.org/2018/03/02/using-amd-open-source-and-the-amdgpu-pro-opencl-driver-for-image-processing/

Thanks darix! I’ll check it today :slight_smile:

OK, I’ve checked it and it is from 2018 and seems to be completely outdated. Also the workaround he provides is from 2018 and outdated as well so I don’t think that one is able to make it work this way.

Does anybody know, how to proceed? I’ve got a brandnew and nice GPU and would really like to use its speed for darktable under Linux. Thanks!

1 Like

There is not really a solution and I can’t downgrade the opencl-amd version.
This is maybe because of the 6600XT which is very new on the market and thus requires a recent driver. So I’ve tried a lot of different DT versions but either they were too old, I can’t get the GPU to work or I have the highlight issues. So finally I’ve given a go to the 3.7-CR3-git because just a very few images have caused highlight problems. Only if they have been heavily developed with n masks, highlight reconstruction, strong light againt the sun etc. I had problems, but if I copy the original image and start the development new, everything seems to work as expected.

This wouldn’t be probably acceptable for a professional but I’m fine with it and this new computer with the nice card works like a charm :slight_smile:

Have a nice evening and thanks!