After the great success of running OpenCL under Ubuntu 24.04 LTS I’d like to have a sequel under Ubuntu 26.04 LTS where ROCm support should be included natively.
Unfortunately darktable is failing to use openCL:
$ darktable-cltest
darktable 5.6.0
Copyright (C) 2012-2026 Johannes Hanika and other contributors.
Compile options:
Bit depth -> 64 bit
Exiv2 -> 0.28.8
Lensfun -> 0.3.4
Debug -> DISABLED
SSE2 optimizations -> ENABLED
OpenMP -> ENABLED
OpenCL -> ENABLED
Lua -> ENABLED - API version 9.7.0
Colord -> ENABLED
gPhoto2 -> ENABLED - Camera tethering is available
OSMGpsMap -> ENABLED - Map view is available
GMIC -> ENABLED - Compressed LUTs are supported
GraphicsMagick -> ENABLED
ImageMagick -> DISABLED
libavif -> DISABLED
libheif -> ENABLED
libjxl -> ENABLED
LibRaw -> ENABLED - Version 0.22.0-Release
OpenJPEG -> ENABLED
OpenEXR -> ENABLED
WebP -> ENABLED
AI -> DISABLED
See https://www.darktable.org/resources/ for detailed documentation.
See https://github.com/darktable-org/darktable/issues/new/choose to report bugs.
[opencl_init] opencl disabled via darktable preferences
[opencl_init] opencl library 'libOpenCL.so.1' found on your system and loaded, preference 'default path'
[opencl_init] found 1 platform
[opencl_init] found 2 devices
DEVICE: 0: 'gfx1102'
CONF KEY: cldevice_v6_amdacceleratedparallelprocessinggfx1102
PLATFORM, VENDOR & ID: AMD Accelerated Parallel Processing, Advanced Micro Devices, Inc., ID=4098
CANONICAL NAME: amdacceleratedparallelprocessinggfx1102
DRIVER VERSION: 3581.0 (HSA1.1,LC)
DEVICE VERSION: OpenCL 2.0 API=300
DEVICE_TYPE: GPU, dedicated mem
GLOBAL MEM SIZE: 8176 MB
MAX IMAGE ALLOC: 6950 MB
MAX IMAGE SIZE: 16384 x 16384
MAX CONSTANT BUFFER: 7116390 KB
LOCAL MEM SIZE: 64 KB
ADDRESS ALIGN: 256 B
COMPUTE UNITS: 16
MAX WORK GROUP SIZE: 256 (32)
MAX WORK ITEM DIMENSIONS: 3 [ 1024 1024 1024 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TILING: NO
SUPPORTED ATOMICS: INT32
EVENTS HANDLED: YES
OPENCL FAST MODE: NO
TILING ADVANTAGE: 0,000
DEFAULT DEVICE: NO
KERNEL BUILD DIRECTORY: /usr/share/darktable/kernels
KERNEL DIRECTORY: /home/user/.cache/darktable/cached_v6_kernels_for_AMDAcceleratedParallelProcessinggfx1102_35810HSA11LC
CL COMPILER COMMAND: -w -DAMD=1 -I"/usr/share/darktable/kernels"
[opencl_build_program] could not build program: CL_BUILD_PROGRAM_FAILURE
[dt_opencl_device_init] failed to compile program `demosaic_ppg.cl'
DEVICE: 1: 'gfx1103'
CONF KEY: cldevice_v6_amdacceleratedparallelprocessinggfx1103
PLATFORM, VENDOR & ID: AMD Accelerated Parallel Processing, Advanced Micro Devices, Inc., ID=4098
CANONICAL NAME: amdacceleratedparallelprocessinggfx1103
DRIVER VERSION: 3581.0 (HSA1.1,LC)
DEVICE VERSION: OpenCL 2.0 API=300
DEVICE_TYPE: GPU, unified mem
GLOBAL MEM SIZE: 42994 MB
MAX IMAGE ALLOC: 36545 MB
MAX IMAGE SIZE: 16384 x 16384
MAX CONSTANT BUFFER: 37422386 KB
LOCAL MEM SIZE: 64 KB
ADDRESS ALIGN: 256 B
COMPUTE UNITS: 6
MAX WORK GROUP SIZE: 256 (32)
MAX WORK ITEM DIMENSIONS: 3 [ 1024 1024 1024 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TILING: NO
SUPPORTED ATOMICS: INT32
EVENTS HANDLED: YES
OPENCL FAST MODE: NO
TILING ADVANTAGE: 0,000
DEFAULT DEVICE: NO
KERNEL BUILD DIRECTORY: /usr/share/darktable/kernels
KERNEL DIRECTORY: /home/user/.cache/darktable/cached_v6_kernels_for_AMDAcceleratedParallelProcessinggfx1103_35810HSA11LC
CL COMPILER COMMAND: -w -DAMD=1 -I"/usr/share/darktable/kernels"
[opencl_build_program] could not build program: CL_BUILD_PROGRAM_FAILURE
[dt_opencl_device_init] failed to compile program `demosaic_ppg.cl'
[opencl_init] no suitable devices found.
[opencl_init] FINALLY: opencl PREFERENCE=NO is NOT AVAILABLE and NOT ENABLED
Searching the net for the error message failed to compile program `demosaic_ppg.cl’ unfortunately didn’t reveal information I could make use of. Can someone give advice please?
Some more info about the system:
$ clinfo --list
Platform #0: AMD Accelerated Parallel Processing
+-- Device #0: gfx1102
`-- Device #1: gfx1103
$ sudo lsmod |grep -iE 'amd(gpu|xdna)'
[sudo: authenticate] Passwort:
amdgpu 21569536 63
amdxcp 12288 1 amdgpu
drm_panel_backlight_quirks 12288 1 amdgpu
drm_buddy 28672 1 amdgpu
amdxdna 172032 0
drm_ttm_helper 20480 1 amdgpu
gpu_sched 69632 2 amdxdna,amdgpu
ttm 135168 2 amdgpu,drm_ttm_helper
drm_exec 12288 1 amdgpu
drm_suballoc_helper 24576 1 amdgpu
drm_display_helper 303104 1 amdgpu
amd_pmf 131072 1 amdxdna
cec 106496 2 drm_display_helper,amdgpu
i2c_algo_bit 16384 1 amdgpu
video 77824 1 amdgpu
$ modinfo amdgpu | grep -E "version:|description:|vermagic:|filename:"
filename: /lib/modules/7.0.0-30-generic/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko.zst
description: AMD GPU
srcversion: 3C579E7F273939F4A3F71D3
vermagic: 7.0.0-30-generic SMP preempt mod_unload modversions
$ modinfo amdxdna | grep -E "version:|description:|vermagic:|filename:"
filename: /lib/modules/7.0.0-30-generic/kernel/drivers/accel/amdxdna/amdxdna.ko.zst
description: amdxdna driver
srcversion: E4FC5AFFF53D21BC6AFDAE3
vermagic: 7.0.0-30-generic SMP preempt mod_unload modversions
$ amd-smi
+------------------------------------------------------------------------------+
| AMD-SMI 26.2.1+unknown amdgpu version: 7.0.0-30 ROCm version: N/A |
| VBIOS version: 00079185 |
| Platform: Linux Baremetal |
|-------------------------------------+----------------------------------------|
| BDF GPU-Name | Mem-Uti Temp UEC Power-Usage |
| GPU HIP-ID OAM-ID Partition-Mode | GFX-Uti Fan Mem-Usage |
|=====================================+========================================|
| 0000:03:00.0 AMD Radeon RX 7700S | 0 % 34 °C 0 9/100 W |
| 0 0 N/A N/A | 14 % 0.0 % 26/8176 MB |
|-------------------------------------+----------------------------------------|
| 0000:c4:00.0 ...adeon 780M Graphics | N/A N/A 0 N/A |
| 1 1 N/A N/A | N/A N/A 1400/8192 MB |
+-------------------------------------+----------------------------------------+
+------------------------------------------------------------------------------+
| Processes: |
| GPU PID Process Name GTT_MEM VRAM_MEM MEM_USAGE CU % |
|==============================================================================|
| No running processes found |
+------------------------------------------------------------------------------+
$ rocminfo | grep -E "Name:|Compute Unit|Max Clock|Memory Size|Agent"
HSA Agents
Agent 1
Name: AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
Marketing Name: AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
Vendor Name: CPU
Max Clock Freq. (MHz): 5263
Compute Unit: 16
Agent 2
Name: gfx1102
Marketing Name: AMD Radeon RX 7700S
Vendor Name: AMD
Max Clock Freq. (MHz): 2208
Compute Unit: 32
Name: amdgcn-amd-amdhsa--gfx1102
Name: amdgcn-amd-amdhsa--gfx11-generic
Agent 3
Name: gfx1103
Marketing Name: AMD Radeon 780M Graphics
Vendor Name: AMD
Max Clock Freq. (MHz): 2799
Compute Unit: 12
Name: amdgcn-amd-amdhsa--gfx1103
Name: amdgcn-amd-amdhsa--gfx11-generic
Agent 4
Name: aie2
Marketing Name: AIE-ML
Vendor Name: AMD
Max Clock Freq. (MHz): 0
Compute Unit: 0
$ grep -H '' /etc/OpenCL/vendors/*
/etc/OpenCL/vendors/amdocl64.icd:libamdocl64.so
/etc/OpenCL/vendors/rusticl.icd:libRusticlOpenCL.so.1
$ sudo clinfo | grep -E "Number of devices|Number of platforms|Device Name|Device Type|Platform Name|Max compute units|Max clock|Global memory size"
Number of platforms 1
Platform Name AMD Accelerated Parallel Processing
Platform Name AMD Accelerated Parallel Processing
Number of devices 2
Device Name gfx1102
Device Type GPU
Max compute units 16
Max clock frequency 2208MHz
Global memory size 8573157376 (7.984GiB)
Device Name gfx1103
Device Type GPU
Max compute units 6
Max clock frequency 2799MHz
Global memory size 45082968064 (41.99GiB)
Platform Name AMD Accelerated Parallel Processing
Device Name gfx1102
Platform Name AMD Accelerated Parallel Processing
Device Name gfx1102
Device Name gfx1103
Platform Name AMD Accelerated Parallel Processing
Device Name gfx1102
Device Name gfx1103
I’m a little irritated by the output of ROCm version: N/A by amd-smi, but maybe this is only a false positive, as following output looks like ROCm is available:
$ rocminfo
ROCk module is loaded
=====================
HSA System Attributes
=====================
Runtime Version: 1.1
Runtime Ext Version: 1.14
System Timestamp Freq.: 1000.000000MHz
Sig. Max Wait Duration: 18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)
Machine Model: LARGE
System Endianness: LITTLE
Mwaitx: DISABLED
XNACK enabled: NO
DMAbuf Support: YES
VMM Support: YES
==========
HSA Agents
==========
*******
Agent 1
*******
Name: AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
Uuid: CPU-XX
Marketing Name: AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
Vendor Name: CPU
Feature: None specified
Profile: FULL_PROFILE
Float Round Mode: NEAR
Max Queue Number: 0(0x0)
Queue Min Size: 0(0x0)
Queue Max Size: 0(0x0)
Queue Type: MULTI
Node: 0
Device Type: CPU
Cache Info:
L1: 32768(0x8000) KB
Chip ID: 0(0x0)
ASIC Revision: 0(0x0)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 5263
BDFID: 0
Internal Node ID: 0
Compute Unit: 16
SIMDs per CU: 0
Shader Engines: 0
Shader Arrs. per Eng.: 0
WatchPts on Addr. Ranges:1
Memory Properties:
Features: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: FINE GRAINED
Size: 88052676(0x53f93c4) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 2
Segment: GLOBAL; FLAGS: EXTENDED FINE GRAINED
Size: 88052676(0x53f93c4) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 3
Segment: GLOBAL; FLAGS: KERNARG, FINE GRAINED
Size: 88052676(0x53f93c4) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 4
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 88052676(0x53f93c4) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
ISA Info:
*******
Agent 2
*******
Name: gfx1102
Uuid: GPU-XX
Marketing Name: AMD Radeon RX 7700S
Vendor Name: AMD
Feature: KERNEL_DISPATCH
Profile: BASE_PROFILE
Float Round Mode: NEAR
Max Queue Number: 128(0x80)
Queue Min Size: 64(0x40)
Queue Max Size: 131072(0x20000)
Queue Type: MULTI
Node: 1
Device Type: GPU
Cache Info:
L1: 32(0x20) KB
L2: 2048(0x800) KB
Chip ID: 29824(0x7480)
ASIC Revision: 0(0x0)
Cacheline Size: 128(0x80)
Max Clock Freq. (MHz): 2208
BDFID: 768
Internal Node ID: 1
Compute Unit: 32
SIMDs per CU: 2
Shader Engines: 2
Shader Arrs. per Eng.: 2
WatchPts on Addr. Ranges:4
Coherent Host Access: FALSE
Memory Properties:
Features: KERNEL_DISPATCH
Fast F16 Operation: TRUE
Wavefront Size: 32(0x20)
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Max Waves Per CU: 32(0x20)
Max Work-item Per CU: 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 2147483647(0x7fffffff)
y 65535(0xffff)
z 65535(0xffff)
Max fbarriers/Workgrp: 32
Packet Processor uCode:: 632
SDMA engine uCode:: 24
IOMMU Support:: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 8372224(0x7fc000) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:2048KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 2
Segment: GLOBAL; FLAGS: EXTENDED FINE GRAINED
Size: 8372224(0x7fc000) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:2048KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 3
Segment: GROUP
Size: 64(0x40) KB
Allocatable: FALSE
Alloc Granule: 0KB
Alloc Recommended Granule:0KB
Alloc Alignment: 0KB
Accessible by all: FALSE
ISA Info:
ISA 1
Name: amdgcn-amd-amdhsa--gfx1102
Machine Models: HSA_MACHINE_MODEL_LARGE
Profiles: HSA_PROFILE_BASE
Default Rounding Mode: NEAR
Default Rounding Mode: NEAR
Fast f16: TRUE
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 2147483647(0x7fffffff)
y 65535(0xffff)
z 65535(0xffff)
FBarrier Max Size: 32
ISA 2
Name: amdgcn-amd-amdhsa--gfx11-generic
Machine Models: HSA_MACHINE_MODEL_LARGE
Profiles: HSA_PROFILE_BASE
Default Rounding Mode: NEAR
Default Rounding Mode: NEAR
Fast f16: TRUE
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 2147483647(0x7fffffff)
y 65535(0xffff)
z 65535(0xffff)
FBarrier Max Size: 32
*******
Agent 3
*******
Name: gfx1103
Uuid: GPU-XX
Marketing Name: AMD Radeon 780M Graphics
Vendor Name: AMD
Feature: KERNEL_DISPATCH
Profile: BASE_PROFILE
Float Round Mode: NEAR
Max Queue Number: 128(0x80)
Queue Min Size: 64(0x40)
Queue Max Size: 131072(0x20000)
Queue Type: MULTI
Node: 2
Device Type: GPU
Cache Info:
L1: 32(0x20) KB
L2: 2048(0x800) KB
Chip ID: 5567(0x15bf)
ASIC Revision: 9(0x9)
Cacheline Size: 128(0x80)
Max Clock Freq. (MHz): 2799
BDFID: 50176
Internal Node ID: 2
Compute Unit: 12
SIMDs per CU: 2
Shader Engines: 1
Shader Arrs. per Eng.: 2
WatchPts on Addr. Ranges:4
Coherent Host Access: FALSE
Memory Properties: APU
Features: KERNEL_DISPATCH
Fast F16 Operation: TRUE
Wavefront Size: 32(0x20)
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Max Waves Per CU: 32(0x20)
Max Work-item Per CU: 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 2147483647(0x7fffffff)
y 65535(0xffff)
z 65535(0xffff)
Max fbarriers/Workgrp: 32
Packet Processor uCode:: 70
SDMA engine uCode:: 24
IOMMU Support:: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 44026336(0x29fc9e0) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:2048KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 2
Segment: GLOBAL; FLAGS: EXTENDED FINE GRAINED
Size: 44026336(0x29fc9e0) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:2048KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 3
Segment: GROUP
Size: 64(0x40) KB
Allocatable: FALSE
Alloc Granule: 0KB
Alloc Recommended Granule:0KB
Alloc Alignment: 0KB
Accessible by all: FALSE
ISA Info:
ISA 1
Name: amdgcn-amd-amdhsa--gfx1103
Machine Models: HSA_MACHINE_MODEL_LARGE
Profiles: HSA_PROFILE_BASE
Default Rounding Mode: NEAR
Default Rounding Mode: NEAR
Fast f16: TRUE
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 2147483647(0x7fffffff)
y 65535(0xffff)
z 65535(0xffff)
FBarrier Max Size: 32
ISA 2
Name: amdgcn-amd-amdhsa--gfx11-generic
Machine Models: HSA_MACHINE_MODEL_LARGE
Profiles: HSA_PROFILE_BASE
Default Rounding Mode: NEAR
Default Rounding Mode: NEAR
Fast f16: TRUE
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 2147483647(0x7fffffff)
y 65535(0xffff)
z 65535(0xffff)
FBarrier Max Size: 32
*******
Agent 4
*******
Name: aie2
Uuid: AIE-XX
Marketing Name: AIE-ML
Vendor Name: AMD
Feature: AGENT_DISPATCH
Profile: BASE_PROFILE
Float Round Mode: NEAR
Max Queue Number: 1(0x1)
Queue Min Size: 64(0x40)
Queue Max Size: 64(0x40)
Queue Type: SINGLE
Node: 0
Device Type: DSP
Cache Info:
L2: 2048(0x800) KB
Chip ID: 0(0x0)
ASIC Revision: 0(0x0)
Cacheline Size: 0(0x0)
Max Clock Freq. (MHz): 0
BDFID: 0
Internal Node ID: 0
Compute Unit: 0
SIMDs per CU: 0
Shader Engines: 0
Shader Arrs. per Eng.: 0
WatchPts on Addr. Ranges:0
Memory Properties:
Features: AGENT_DISPATCH
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: KERNARG, COARSE GRAINED
Size: 88052676(0x53f93c4) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 2
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 65536(0x10000) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:0KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 3
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 88052676(0x53f93c4) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Recommended Granule:4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
ISA Info:
*** Done ***