Understand List of OpenCL Devices

Hi, usually I’m not the first person having a question. However, this time I just don’t find what I’m looking for among the existing answers, so I would appreciate your help.

I use the culling mode quite often to compare similar images, often zooming to 100% to check sharpness. I would like to make sure that this is possible without too much waiting time and therefor optimize the settings in the darktablerc file accordingly.

I’ve one GPU and a CPU with integrated graphics. However, DT shows four devices. Why is that? Could you help me understand the setup?

Thank you!

My system:
• Kubuntu 25.04
• darktable 5.2
• CPU: AMD Ryzen 7 9700X with Radeon grahics and 32GB of RAM
• GPU: AMD Radeon RX 6750XT with 12GB of VRAM

darktable -d opencl:

type or paste darktable 5.2.0
Copyright (C) 2012-2025 Johannes Hanika and other contributors.

Compile options:
  Bit depth              -> 64 bit
  Debug                  -> DISABLED
  SSE2 optimizations     -> ENABLED
  OpenMP                 -> ENABLED
  OpenCL                 -> ENABLED
  Lua                    -> ENABLED  - API version 9.5.0
  Colord                 -> ENABLED
  gPhoto2                -> ENABLED
  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-Devel202502
  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.0000 [dt starting]
 darktable -d opencl
     0,3558 [dt_dlopencl_init] could not find default opencl runtime library 'libOpenCL'
     0,3558 [dt_dlopencl_init] could not find default opencl runtime library 'libOpenCL.so'
     0,3559 [opencl_init] opencl library 'libOpenCL.so.1' found on your system and loaded, preference 'default path'
     0,4087 [opencl_init] found 4 platforms
     0,4087 [opencl_init] possibly a multiple platform problem for `AMD Accelerated Parallel Processing'
     0,4087 [check platform] platform 'Clover' with key 'clplatform_clover' is NOT active
     0,4087 [opencl_init] no devices found for Mesa/X.org (vendor) - rusticl (name)
[opencl_init] found 4 devices

[dt_opencl_device_init]
   DEVICE:                   0: 'gfx1031'
   CONF KEY:                 cldevice_v5_amdacceleratedparallelprocessinggfx1031
   PLATFORM, VENDOR & ID:    AMD Accelerated Parallel Processing, Advanced Micro Devices, Inc., ID=4098
   CANONICAL NAME:           amdacceleratedparallelprocessinggfx1031
   DRIVER VERSION:           3649.0 (HSA1.1,LC)
   DEVICE VERSION:           OpenCL 2.0 
   DEVICE_TYPE:              GPU, dedicated mem
   GLOBAL MEM SIZE:          12272 MB
   MAX MEM ALLOC:            10431 MB
   MAX IMAGE SIZE:           16384 x 16384
   MAX WORK GROUP SIZE:      256
   MAX WORK ITEM DIMENSIONS: 3
   MAX WORK ITEM SIZES:      [ 1024 1024 1024 ]
   ASYNC PIXELPIPE:          YES
   PINNED MEMORY TRANSFER:   NO
   AVOID ATOMICS:            NO
   MICRO NAP:                0
   ROUNDUP WIDTH & HEIGHT    16x16
   CHECK EVENT HANDLES:      1024
   TILING ADVANTAGE:         10,000
   DEFAULT DEVICE:           NO
   KERNEL BUILD DIRECTORY:   /usr/share/darktable/kernels
   KERNEL DIRECTORY:         /home/gunar/.cache/darktable/cached_v5_kernels_for_AMDAcceleratedParallelProcessinggfx1031_36490HSA11LC
   CL COMPILER OPTION:       -cl-fast-relaxed-math
   CL COMPILER COMMAND:      -w -cl-fast-relaxed-math -DAMD=1 -I"/usr/share/darktable/kernels"
   KERNEL LOADING TIME:       0,0102 sec

[dt_opencl_device_init]
   DEVICE:                   1: 'gfx1036'
   CONF KEY:                 cldevice_v5_amdacceleratedparallelprocessinggfx1036
   PLATFORM, VENDOR & ID:    AMD Accelerated Parallel Processing, Advanced Micro Devices, Inc., ID=4098
   CANONICAL NAME:           amdacceleratedparallelprocessinggfx1036
   DRIVER VERSION:           3649.0 (HSA1.1,LC)
   DEVICE VERSION:           OpenCL 2.0 
   DEVICE_TYPE:              GPU, unified mem
   GLOBAL MEM SIZE:          15599 MB
   MAX MEM ALLOC:            13259 MB
   MAX IMAGE SIZE:           16384 x 16384
   MAX WORK GROUP SIZE:      256
   MAX WORK ITEM DIMENSIONS: 3
   MAX WORK ITEM SIZES:      [ 1024 1024 1024 ]
   ASYNC PIXELPIPE:          YES
   PINNED MEMORY TRANSFER:   NO
   AVOID ATOMICS:            NO
   MICRO NAP:                0
   ROUNDUP WIDTH & HEIGHT    16x16
   CHECK EVENT HANDLES:      1024
   TILING ADVANTAGE:         10,000
   DEFAULT DEVICE:           NO
   KERNEL BUILD DIRECTORY:   /usr/share/darktable/kernels
   KERNEL DIRECTORY:         /home/gunar/.cache/darktable/cached_v5_kernels_for_AMDAcceleratedParallelProcessinggfx1036_36490HSA11LC
   CL COMPILER OPTION:       -cl-fast-relaxed-math
   CL COMPILER COMMAND:      -w -cl-fast-relaxed-math -DAMD=1 -I"/usr/share/darktable/kernels"
   KERNEL LOADING TIME:       0,0102 sec

[dt_opencl_device_init]
   DEVICE:                   2: 'gfx1031'
   CONF KEY:                 cldevice_v5_amdacceleratedparallelprocessinggfx1031
   PLATFORM, VENDOR & ID:    AMD Accelerated Parallel Processing, Advanced Micro Devices, Inc., ID=4098
   CANONICAL NAME:           amdacceleratedparallelprocessinggfx1031
   DRIVER VERSION:           3649.0 (HSA1.1,LC)
   DEVICE VERSION:           OpenCL 2.0 
   DEVICE_TYPE:              GPU, dedicated mem
   GLOBAL MEM SIZE:          12272 MB
   MAX MEM ALLOC:            10431 MB
   MAX IMAGE SIZE:           16384 x 16384
   MAX WORK GROUP SIZE:      256
   MAX WORK ITEM DIMENSIONS: 3
   MAX WORK ITEM SIZES:      [ 1024 1024 1024 ]
   ASYNC PIXELPIPE:          YES
   PINNED MEMORY TRANSFER:   NO
   AVOID ATOMICS:            NO
   MICRO NAP:                0
   ROUNDUP WIDTH & HEIGHT    16x16
   CHECK EVENT HANDLES:      1024
   TILING ADVANTAGE:         10,000
   DEFAULT DEVICE:           NO
   KERNEL BUILD DIRECTORY:   /usr/share/darktable/kernels
   KERNEL DIRECTORY:         /home/gunar/.cache/darktable/cached_v5_kernels_for_AMDAcceleratedParallelProcessinggfx1031_36490HSA11LC
   CL COMPILER OPTION:       -cl-fast-relaxed-math
   CL COMPILER COMMAND:      -w -cl-fast-relaxed-math -DAMD=1 -I"/usr/share/darktable/kernels"
   KERNEL LOADING TIME:       0,0100 sec

[dt_opencl_device_init]
   DEVICE:                   3: 'gfx1036'
   CONF KEY:                 cldevice_v5_amdacceleratedparallelprocessinggfx1036
   PLATFORM, VENDOR & ID:    AMD Accelerated Parallel Processing, Advanced Micro Devices, Inc., ID=4098
   CANONICAL NAME:           amdacceleratedparallelprocessinggfx1036
   DRIVER VERSION:           3649.0 (HSA1.1,LC)
   DEVICE VERSION:           OpenCL 2.0 
   DEVICE_TYPE:              GPU, unified mem
   GLOBAL MEM SIZE:          15599 MB
   MAX MEM ALLOC:            13259 MB
   MAX IMAGE SIZE:           16384 x 16384
   MAX WORK GROUP SIZE:      256
   MAX WORK ITEM DIMENSIONS: 3
   MAX WORK ITEM SIZES:      [ 1024 1024 1024 ]
   ASYNC PIXELPIPE:          YES
   PINNED MEMORY TRANSFER:   NO
   AVOID ATOMICS:            NO
   MICRO NAP:                0
   ROUNDUP WIDTH & HEIGHT    16x16
   CHECK EVENT HANDLES:      1024
   TILING ADVANTAGE:         10,000
   DEFAULT DEVICE:           NO
   KERNEL BUILD DIRECTORY:   /usr/share/darktable/kernels
   KERNEL DIRECTORY:         /home/gunar/.cache/darktable/cached_v5_kernels_for_AMDAcceleratedParallelProcessinggfx1036_36490HSA11LC
   CL COMPILER OPTION:       -cl-fast-relaxed-math
   CL COMPILER COMMAND:      -w -cl-fast-relaxed-math -DAMD=1 -I"/usr/share/darktable/kernels"
   KERNEL LOADING TIME:       0,0100 sec
[opencl_init] OpenCL successfully initialized. internal numbers and names of available devices:
[opencl_init]		0	'AMD Accelerated Parallel Processing gfx1031'
[opencl_init]		1	'AMD Accelerated Parallel Processing gfx1036'
[opencl_init]		2	'AMD Accelerated Parallel Processing gfx1031'
[opencl_init]		3	'AMD Accelerated Parallel Processing gfx1036'
     0,7569 [opencl_init] FINALLY: opencl PREFERENCE=ON is AVAILABLE and ENABLED.
[opencl_init] opencl_scheduling_profile: 'multiple GPUs'
[opencl_init] opencl_device_priority: '0,2,*/0,2,*/0,2,*/0,2,*/0,2,*'
[opencl_init] opencl_mandatory_timeout: 1000
[opencl_update_priorities] these are your device priorities:
[opencl_update_priorities] 		image	preview	export	thumbs	preview2
[dt_opencl_update_priorities]		0	0	0	0	0
[dt_opencl_update_priorities]		1	1	1	1	1
[dt_opencl_update_priorities]		2	2	2	2	2
[dt_opencl_update_priorities]		3	3	3	3	3
[opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[opencl_update_priorities] 		image	preview	export	thumbs	preview2
[opencl_update_priorities]		0	0	0	0	0
[opencl_synchronization_timeout] synchronization timeout set to 20
   UNIFIED MEM SIZE:         15599 MB reserved for 'amdacceleratedparallelprocessinggfx1036' id=1   UNIFIED MEM SIZE:         7800 MB reserved for 'amdacceleratedparallelprocessinggfx1036' id=3[opencl_update_priorities] these are your device priorities:
[opencl_update_priorities] 		image	preview	export	thumbs	preview2
[dt_opencl_update_priorities]		0	0	0	0	0
[dt_opencl_update_priorities]		1	1	1	1	1
[dt_opencl_update_priorities]		2	2	2	2	2
[dt_opencl_update_priorities]		3	3	3	3	3
[opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[opencl_update_priorities] 		image	preview	export	thumbs	preview2
[opencl_update_priorities]		0	0	0	0	0
[opencl_synchronization_timeout] synchronization timeout set to 20
 [opencl_summary_statistics] device 'AMD Accelerated Parallel Processing gfx1031' id=0: NOT utilized
 [opencl_summary_statistics] device 'AMD Accelerated Parallel Processing gfx1036' id=1: NOT utilized
 [opencl_summary_statistics] device 'AMD Accelerated Parallel Processing gfx1031' id=2: NOT utilized
 [opencl_summary_statistics] device 'AMD Accelerated Parallel Processing gfx1036' id=3: NOT utilized

it could be native opencl vs rusticl. and TBH I would disable the igpu in the bios if you dont really use it.

Maybe my first steps into the world of dt & OpenCL with AMD iGPU + dGPU are of any help to you:

Good point. Like that I can check which of the devices is the integrated one and which the dedicated.

Thanks! I will review this post.

It looks like two drivers for the same card.

I see multiple not normal settings. As a test, rename your darktablerc file to .old to start a new one.

For your system, I recommend to disable the iGPU and set dt to very fast GPU.

1 Like

Thanks, will give it a try.

I switched the iGPU off in the BIOS and hence the gfx1036 devices disapeared. Still, the GPU appears twice as gfx1031. However, switching back to the default device settings in the daktablerc file and selecting very fast GPU from the settings menu brought performance inprovements.

Did you try to start with a new darktablerc file?

Yes, I did. In my case the default settings in the darktablerc file provide better performance than my “tuned” settings.

You can also sometimes try to just delete the opencl cache and let DT rebuild that fresh on startup …it might not end up doing anything but it can at times I think help clear up the list of devices or at least have you working with fresh ly created ones after you make changes just incase something isn’t update in step with your changes…

We had a few optimizations and your tuned settings might not be ideal, hence why I suggested to test with a fresh darktablerc.

1 Like

clinfo -l may show some hints.

clinfo -l
Platform #0: AMD Accelerated Parallel Processing
 `-- Device #0: gfx1031
Platform #1: Clover
 `-- Device #0: AMD Radeon RX 6750 XT (radeonsi, navi22, LLVM 19.1.7, DRM 3.61, 6.14.0-28-generic)
Platform #2: AMD Accelerated Parallel Processing
 `-- Device #0: gfx1031
Platform #3: rusticl

So different OpenCL flavours / drivers seem to be the root cause for showing different devices / platforms. Still, #0 and #2 appear to be the same.

If you do not want to disable the GPU in the Ryzen CPU, but only use your dedicated Radeon card for OpenCL (device #0), you might put this line into your darktablerc:

opencl_device_priority=0//0//!0,

This uses OpenCL for export and the main view, and the CPU for the rest.

Uninstalling mesa-opencl-icd would “get rid” of Clover/rusticl.

This is not the best way. Ideally it should be disabled via the device string in darktablerc