Activating OpenCL in Darktable on Windows 11

I have a Windows 11 system with Intel Iris Xe Graphics. Currently, in the preferences, I notice that openCL is not active. What do I need to do to activate it? Are there any changes I need to make in the darktablerc file? I changed the opencl=TRUE

When I start Darktable, it gives a message no suitable opencl device found and changes the opencl=FALSE

I am not technically competent, so I may need a step by step advice

This statement is spot on: using OpenCL in darktable with real benefit requires a certain level of GPU performance and a sufficient amount of video RAM. darktable performs some checks at startup, if these are negative, OpenCL is not available inside darktable, even if it is provided by the graphics driver in principle.

Post the output from darktbale-cltest and your current darktablerc file.

To my knowledge this is an iGPU. Integrated GPUs generally do not have their own memory and therefore share the system’s RAM. The performance of integrated GPUs is usually in the low-performance range. The output of darktable-cltest should tell us more…

Here is the output from the -cltest
C:\Program Files\darktable\bin>darktable-cltest
darktable 4.7.0+1271~gf98eda41f0
Copyright (C) 2012-2024 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.3.0
Colord → DISABLED
gPhoto2 → ENABLED
GMIC → ENABLED - Compressed LUTs are supported
GraphicsMagick → ENABLED
ImageMagick → DISABLED
libavif → ENABLED
libheif → ENABLED
libjxl → ENABLED
OpenJPEG → ENABLED
OpenEXR → ENABLED
WebP → ENABLED

See resources | darktable for detailed documentation.
See Sign in to GitHub · GitHub to report bugs.

 0.0654 [dt_get_sysresource_level] switched to 1 as `default'
 0.0684   total mem:       7987MB
 0.0700   mipmap cache:    998MB
 0.0713   available mem:   3993MB
 0.0720   singlebuff:      62MB
 0.0742 [opencl_init] opencl disabled via darktable preferences
 0.0758 [opencl_init] opencl library 'OpenCL.dll' found on your system and loaded, preference 'default path'
 0.2688 [opencl_init] found 1 platform

[opencl_init] found 1 device

[dt_opencl_device_init]
DEVICE: 0: ‘Intel(R) Iris(R) Xe Graphics’
CONF KEY: cldevice_v5_intelropenclhdgraphicsintelririsrxegraphics
PLATFORM, VENDOR & ID: Intel(R) OpenCL HD Graphics, Intel(R) Corporation, ID=32902
CANONICAL NAME: intelropenclhdgraphicsintelririsrxegraphics
DRIVER VERSION: 30.0.100.9864
DEVICE VERSION: OpenCL 3.0 NEO
DEVICE_TYPE: GPU, unified mem
GLOBAL MEM SIZE: 3195 MB
MAX MEM ALLOC: 1597 MB
MAX IMAGE SIZE: 16384 x 16384
MAX WORK GROUP SIZE: 256
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 256 256 256 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: NO
USE HEADROOM: 400Mb
AVOID ATOMICS: NO
MICRO NAP: 250
ROUNDUP WIDTH & HEIGHT 16x16
CHECK EVENT HANDLES: 128
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
*** marked as disabled ***
[opencl_init] no suitable devices found.
0.2704 [opencl_init] FINALLY: opencl PREFERENCE=OFF is NOT AVAILABLE and NOT ENABLED.

press any key to exit

darktablerc.zip (10.8 KB)

  1. Save a copy of darktablerc to a safe location
  2. Optional - Go to intel website and download the latest video drivers (yours are from 2021). https://www.intel.com/content/www/us/en/download/785597/intel-arc-iris-xe-graphics-windows.html
  3. edit darktablerc from:
    cldevice_v5_intelropenclhdgraphicsintelririsrxegraphics=0 250 0 16 16 128 0 1 0.000 0.000 0.250
    to
    cldevice_v5_intelropenclhdgraphicsintelririsrxegraphics=0 250 0 16 16 128 0 0 0.000 0.000 0.250
  4. Save
  5. Run darktable-cltest
  6. Start darktable, go to Preferences, Processing, click the checkbox to Activate OpenCL support.

IIRC, Intel integrated graphics is simply disabled on Windows, not much one can do about it: darktable/src/common/opencl_drivers_blacklist.h at c0591014765c1ea8fccc1cdb1c2878a071893f89 · darktable-org/darktable · GitHub

Thanks G-man, OpenCL is activated

darktable-cltest report.txt (3.0 KB)

Be careful enabling “use all device memory”. Read tuning GPU memory usage and id-specific OpenCL configuration. Make sure you leave sufficient headroom. Look for opencl_memory_headroom=??? in darktrablerc. Other applications and/or the OS may also need this resource.

Thanks for the heads-up. So far so good, but will remain alert. Will switching it off when not using DT help keep the possible problem in abeyance?

darktable specific settings like “use all device memory” are only active while darktable is running.

You should keep all memory off.