Scorpi
(Scorpi)
April 7, 2026, 7:28pm
1
Hi,
a darktable user reported a failure during OpenCL kernel compilation. He uses AMD GPUs, one APU and a dedicated RX 9070. The message below is reported for both GPUs.
0,3099 [opencl_build_program] could not build program: CL_BUILD_PROGRAM_FAILURE
0,3100 [dt_opencl_device_init] failed to compile program `demosaic_ppg.cl'!
ROMm 7.0.1 from Debian Sid is installed. Can anyone suggest how to further debug this? Is this ROMm version too old for this hardware?
yikerman
(Yi Cao)
April 8, 2026, 8:22am
2
AMD generally really suck at drivers, and yes try upgrading first.
Had zero problems on arch since ages now with rocm and my 6700 xt.
1 Like
what does clinfo say? also what does darktable -d opencl say
1 Like
Scorpi
(Scorpi)
April 9, 2026, 10:58am
5
It seems to be this issue, where the solution is still unknown:
opened 01:49PM - 05 Jan 26 UTC
AMD ROCm OpenCL
### Is there an existing issue for this?
- [x] I checked and did not find my is… sue in the already reported ones
### Describe the bug
I didn't get a suitable OpenCL support with an AMD gfx1200 device
### Steps to reproduce
'darktable-cltest -d opencl -d verbose' gives this output:
darktable 5.4.0
Copyright (C) 2012-2025 Johannes Hanika and other contributors.
Compile options:
Bit depth -> 64 bit
Exiv2 -> 0.28.7
Lensfun -> 0.3.4
Debug -> DISABLED
SSE2 optimizations -> ENABLED
OpenMP -> ENABLED
OpenCL -> ENABLED
Lua -> ENABLED - API version 9.6.0
Colord -> ENABLED
gPhoto2 -> ENABLED
OSMGpsMap -> ENABLED - map view is available
GMIC -> DISABLED - Compressed LUTs are NOT supported
GraphicsMagick -> ENABLED
ImageMagick -> DISABLED
libavif -> ENABLED
libheif -> ENABLED
libjxl -> ENABLED
LibRaw -> ENABLED - Version 0.21.4-Release
OpenJPEG -> ENABLED
OpenEXR -> ENABLED
WebP -> ENABLED
See https://www.darktable.org/resources/ for detailed documentation.
See https://github.com/darktable-org/darktable/issues/new/choose to report bugs.
0.4108 [opencl_init] opencl disabled via darktable preferences
0.4109 [dt_dlopencl_init] found default opencl runtime library 'libOpenCL'
0.4109 [opencl_init] opencl library 'libOpenCL' found on your system and loaded, preference 'default path'
0.5153 [opencl_init] found 2 platforms
0.5153 [check platform] platform 'Portable Computing Language' with key 'clplatform_portablecomputinglanguage' is NOT active
[opencl_init] found 1 device
[dt_opencl_device_init]
0.5153 [dt_opencl_write_device_config] writing data '0 250 0 16 16 128 0 0 0.000 0.000 0.250' for 'cldevice_v5_amdacceleratedparallelprocessinggfx1200'
0.5153 [dt_opencl_write_device_config] writing data '600' for 'cldevice_v5_amdacceleratedparallelprocessinggfx1200_id0'
DEVICE: 0: 'gfx1200'
CONF KEY: cldevice_v5_amdacceleratedparallelprocessinggfx1200
PLATFORM, VENDOR & ID: AMD Accelerated Parallel Processing, Advanced Micro Devices, Inc., ID=4098
CANONICAL NAME: amdacceleratedparallelprocessinggfx1200
DRIVER VERSION: 3649.0 (HSA1.1,LC)
DEVICE VERSION: OpenCL 2.0
DEVICE_TYPE: GPU, dedicated mem
GLOBAL MEM SIZE: 16304 MB
MAX MEM ALLOC: 13858 MB
MAX IMAGE SIZE: 16384 x 16384
MAX CONSTANT BUFFER: 14191002 KB
ADDRESS ALIGN: 256
MAX WORK GROUP SIZE: 256
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 1024 1024 1024 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: NO
AVOID ATOMICS: NO
MICRO NAP: 250
ROUNDUP WIDTH & HEIGHT 16x16
CHECK EVENT HANDLES: 128
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
KERNEL BUILD DIRECTORY: /usr/share/darktable/kernels
KERNEL DIRECTORY: /home/dieter/.var/cache/darktable-5.4.0/cached_v5_kernels_for_AMDAcceleratedParallelProcessinggfx1200_36490HSA11LC
CL COMPILER OPTION: -cl-fast-relaxed-math
CL COMPILER COMMAND: -w -cl-fast-relaxed-math -DAMD=1 -I"/usr/share/darktable/kernels"
0.6591 [dt_opencl_device_init] testing program `demosaic_ppg.cl' ..
0.6591 [opencl_fopen_stat] could not open file `/home/dieter/.var/cache/darktable-5.4.0/cached_v5_kernels_for_AMDAcceleratedParallelProcessinggfx1200_36490HSA11LC/demosaic_ppg.cl.bin'!
0.6591 [opencl_load_program] could not load cached binary program, trying to compile source
0.6592 [opencl_load_program] successfully loaded program from '/usr/share/darktable/kernels/demosaic_ppg.cl' MD5: 'f2ef08727a39b61f973592b8047126c0'
0.7123 [opencl_build_program] could not build program: CL_BUILD_PROGRAM_FAILURE
0.7123 [opencl_build_program] BUILD STATUS: -2
0.7123 BUILD LOG:
0.7123 /tmp/comgr-6514ef/input/CompileSource:77:22: error: use of undeclared identifier 'read_imagef'
77 | buffer[bufidx] = read_imagef(in, sampleri, (int2)(xx, yy)).x;
| ^~~~~~~~~~~
/tmp/comgr-6514ef/input/CompileSource:115:3: error: use of undeclared identifier 'write_imagef'
115 | write_imagef (out, (int2)(x, y), fmax(o, 0.0f));
| ^~~~~~~~~~~~
/tmp/comgr-6514ef/input/CompileSource:142:17: error: use of undeclared identifier 'read_imagef'
142 | float pixel = read_imagef(in, sampleri, (int2)(x, y)).x;
| ^~~~~~~~~~~
/tmp/comgr-6514ef/input/CompileSource:218:17: error: use of undeclared identifier 'read_imagef'
218 | float pixel = read_imagef(in, sampleri, (int2)(x, y)).x;
| ^~~~~~~~~~~
/tmp/comgr-6514ef/input/CompileSource:226:3: error: use of undeclared identifier 'write_imagef'
226 | write_imagef (out, (int2)(x, y), fmax(pixel, 0.0f));
| ^~~~~~~~~~~~
/tmp/comgr-6514ef/input/CompileSource:272:22: error: use of undeclared identifier 'read_imagef'
272 | buffer[bufidx] = read_imagef(in, sampleri, (int2)(xx, yy)).x;
| ^~~~~~~~~~~
/tmp/comgr-6514ef/input/CompileSource:310:3: error: use of undeclared identifier 'write_imagef'
310 | write_imagef (out, (int2)(x, y), fmax(color, 0.0f));
| ^~~~~~~~~~~~
/tmp/comgr-6514ef/input/CompileSource:355:22: error: use of undeclared identifier 'read_imagef'
355 | buffer[bufidx] = read_imagef(in, sampleri, (int2)(gx, gy));
| ^~~~~~~~~~~
/tmp/comgr-6514ef/input/CompileSource:434:3: error: use of undeclared identifier 'write_imagef'
434 | write_imagef(out, (int2) (x, y), fmax(o, 0.0f));
| ^~~~~~~~~~~~
/tmp/comgr-6514ef/input/CompileSource:462:23: error: use of undeclared identifier 'read_imagef'
462 | const float4 px = read_imagef(in, samplerf, (float2)(p.x+i, p.y+j));
| ^~~~~~~~~~~
/tmp/comgr-6514ef/input/CompileSource:466:3: error: use of undeclared identifier
0.7124 [dt_opencl_device_init] failed to compile program `demosaic_ppg.cl'!
0.7124 [dt_opencl_write_device_config] writing data '0 250 0 16 16 128 0 0 0.000 0.000 0.250' for 'cldevice_v5_amdacceleratedparallelprocessinggfx1200'
0.7124 [dt_opencl_write_device_config] writing data '600' for 'cldevice_v5_amdacceleratedparallelprocessinggfx1200_id0'
[opencl_init] no suitable devices found.
0.7124 [opencl_init] FINALLY: opencl PREFERENCE=OFF is NOT AVAILABLE and NOT ENABLED.
Allthough, if I build it with './build.sh --skip-build', I see these lines:
...
-- Found LLVM 21.1.8
-- Found clang compiler - /usr/bin/clang-21
-- Found clang opencl-c.h header in /usr/lib/llvm-21/lib/clang/21/include
-- Will be able to test-compile OpenCL programs. Nice.
...
Any idea what I miss?
### Expected behavior
_No response_
### Logfile | Screenshot | Screencast
_No response_
### Commit
_No response_
### Where did you obtain darktable from?
distro packaging
### darktable version
5.4.0
### What OS are you using?
Linux
### What is the version of your OS?
Debian forky/sid
### Describe your system
_No response_
### Are you using OpenCL GPU in darktable?
None
### If yes, what is the GPU card and driver?
_No response_
### Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
_No response_