[SOLVED] Can I properly enable OpenCL on Windows 11 and Intel Iris Xe graphics in Darktable 4.0?

I think this GPU is blacklisted… :frowning:

I ran darktable-cltest.exe and got the following output:

[opencl_init] opencl related configuration options:
[opencl_init] opencl: OFF
[opencl_init] opencl_scheduling_profile: 'default'
[opencl_init] opencl_library: 'default path'
[opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
[opencl_init] opencl_mandatory_timeout: 400
[opencl_init] opencl_synch_cache: active module
[opencl_init] opencl library 'OpenCL.dll' found on your system and loaded
[opencl_init] found 2 platforms
[opencl_init] found 2 devices

[dt_opencl_device_init]
   DEVICE:                   0: 'Intel(R) Iris(R) Xe Graphics'
   CANONICAL NAME:           intelririsrxegraphics
   PLATFORM NAME & VENDOR:   Intel(R) OpenCL HD Graphics, Intel(R) Corporation
   DRIVER VERSION:           30.0.101.1743
   DEVICE VERSION:           OpenCL 3.0 NEO
   DEVICE_TYPE:              GPU
   GLOBAL MEM SIZE:          6427 MB
   MAX MEM ALLOC:            3214 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
   MEMORY TUNING:            NO
   FORCED HEADROOM:          400
   AVOID ATOMICS:            NO
   MICRO NAP:                250
   ROUNDUP WIDTH:            16
   ROUNDUP HEIGHT:           16
   CHECK EVENT HANDLES:      128
   PERFORMANCE:              0.000000 (CPU 0.115721)
   DEFAULT DEVICE:           NO
   *** marked as disabled ***

[dt_opencl_device_init]
   DEVICE:                   1: '12th Gen Intel(R) Core(TM) i5-1240P'
   CANONICAL NAME:           12thgenintelrcoretmi51240p
   PLATFORM NAME & VENDOR:   Intel(R) OpenCL, Intel(R) Corporation
   DRIVER VERSION:           2022.13.3.0.16_160000
   DEVICE VERSION:           OpenCL 3.0 (Build 0)
   DEVICE_TYPE:              CPU
   GLOBAL MEM SIZE:          16069 MB
   MAX MEM ALLOC:            8034 MB
   MAX IMAGE SIZE:           16384 x 16384
   MAX WORK GROUP SIZE:      8192
   MAX WORK ITEM DIMENSIONS: 3
   MAX WORK ITEM SIZES:      [ 8192 8192 8192 ]
   ASYNC PIXELPIPE:          NO
   PINNED MEMORY TRANSFER:   NO
   MEMORY TUNING:            NO
   FORCED HEADROOM:          400
   AVOID ATOMICS:            NO
   MICRO NAP:                1000
   ROUNDUP WIDTH:            16
   ROUNDUP HEIGHT:           16
   CHECK EVENT HANDLES:      128
   PERFORMANCE:              0.000000 (CPU 0.115721)
   DEFAULT DEVICE:           NO
   *** marked as disabled ***
[opencl_init] no suitable devices found.
[opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is OFF.

Note the device version OPENCL 3.0 NEO. And this is blacklisted on Windows as per https://github.com/darktable-org/darktable/blob/master/src/common/opencl_drivers_blacklist.h#L38

Hmm, do I need to recompile darktable and remove that from the header file OR somehow override the blacklist?

The neo drivers are indeed blacklisted as not supported properly by Intel.

I am on my phone and don’t remember exactly the conf key in draktablerc to override the blacklisting.

Don’t know Intel stuff really well, there should be onother opencl driver for your device Anyway.

I got the same issue on older gpu

[opencl_init] opencl related configuration options:
[opencl_init] opencl: ON

[dt_opencl_device_init]
DEVICE: 0: 'Intel(R) HD Graphics 520’
CANONICAL NAME: intelrhdgraphics520
PLATFORM NAME & VENDOR: Intel(R) OpenCL HD Graphics, Intel(R) Corporation
DRIVER VERSION: 30.0.101.1994
DEVICE VERSION: OpenCL 3.0 NEO
DEVICE_TYPE: GPU

*** marked as disabled ***
[opencl_init] no suitable devices found.
[opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is OFF.

If you can point me to the correct config option in darktablerc to override the blacklisting, that will be great. In the meantime, I plan to recompile darktable on my PC by modifying that blacklist header file to remove the blacklisting on Windows.

EDIT: The config option seems to be opencl_disable_drivers_blacklist=TRUE. But that still did nothing… hmmm…

There are good reasons for blacklisting. You can try the device conf key setting described in the link too but NEO ist just outdated.

You really should look for recent drivers, Intel definetly has docs…

I think you have outdated information. I think NEO is simply the code name for this driver but these are the latest drivers.

I have Intel UHD graphics (IceLake) on Linux. The device version is listed as OpenCL 3.0 NEO but OpenCL is available. I have the latest Intel drivers.

I think I got it to work! It looks like there is a bug in the code which makes it not fully respect the opencl_disable_drivers_blacklist=TRUE config parameter. And also I had to delete already registered configurations for my devices from the darktablerc file under the names cldevice_v4_intelririsrxegraphics etc. Then, re-run the darktable-cltest.exe two times for it to compile the kernel modules for my GPU. And now OpenCL works :slight_smile:

More detailed solution:

How to fix the issue with OpenCL not working on Windows with an Intel integrated graphics:
(As of Darktable version 4.0)

  • Go to C:\Users<Username>\AppData\Local\darktable
  • Open the darktablerc file. Search for already configured CL devices: these will have config keys starting with cldevice_
  • Delete all the lines starting with cldevice_ to essentially delete already configured devices for OpenCL.
  • Check if there is a already a line starting with opencl_disable_drivers_blacklist=. If so, add TRUE at the end or else, add a new line with opencl_disable_drivers_blacklist=TRUE
  • Go to the Darktable bin folder where you will find darktable_cltest.exe. At the moment, due to a bug, you will have to run the following command twice to properly setup your integrated GPU to use OpenCL: darktable-cltest.exe -d opencl (if they incorporate my bug fix, then you only need to run this command once)
    • You probably don’t have to run darktable-cltest.exe but perhaps just open darktable and it may also setup OpenCL devices
8 Likes

Yes, on Linux this driver is not blacklisted. On Windows it is still left blacklisted since 2019. I really don’t think it needs to be… Had to override it. Anyway got it to work now. But there is definitely a bug in their code and I will send a bug fix to make this flag work correctly the first time.

1 Like

bravo, it works also for my older card.

Note that @wpferguson has been making weekly windows builds of master. It seems not enough windows users have been using them, as bugs are being found post release. Darktable does not have enough windows testers. If you want a better release version, start testing the master builds when we get close to release.

4 Likes

I have commented your pr https://github.com/darktable-org/darktable/pull/12155

explaining why i think it’s not correct.

1 Like

In my case, I just had to delete the two lines in darktablerc file
cldevice_v4_intelrhdgraphics520=0 250 0 16 16 128 0 1 0.000000 cldevice_v4_intelrhdgraphics520_id0=400
then using darktable_cltest.exe, two new lines were written on that file
cldevice_v4_intelrhdgraphics520=0 250 0 16 16 128 0 0 0.118311 cldevice_v4_intelrhdgraphics520_building=-cl-fast-relaxed-math
any way thanks a lot for your quick answers

Just wondering - Is darktable’s availability on Windows an official aim of the project, or just because someone is available to port it (for whatever effort that requires)? I realize at some level obviously “someone’s availability” is a requirement for everything. I’m just curious if a Windows binary is a core goal or an added bonus. A minor point that triggered my question is the occasional assumption in the docs that it’s running on Linux. That may just be a by-product of DT’s roots.

Thanks.

The code is there on the repo and instructions are provided to compile it for WIn, MacOS and flavours of Linux…I think the focus on the code as it is developed is a working Linux version and then people assist with porting it to WIndows and Mac… and subsequently troubleshooting specific OS issues…

1 Like

@priort is correct, the code is there in the repo and changes to increase stability on any platform are generally accepted. Windows is a goal as long as someone is there to contribute to it. Most of the developers use Linux and so it runs best there.

The project is definely short on Windows developers and testers; you can see this as now that 4.0 is released, there are some (IMO) easy to spot bugs being reporter that only affect windows.

@wpferguson makes a weekly windows build I wish more people would use, then we would have less bugs at release time. But its only as good as people make it.

Before 4’s GA release I was using the weekly builds regularly. I’ve not updated since but will. My biggest problem right now is that I’m just not shooting much, hence little editing. I guess my workflow hasn’t hit too many of the bugs so far.

Thanks Thanks Thanks.

Hi all,

I’m testing the latest Windows development build by @wpferguson and I noticed that this issue is still present for Intel Iris Xe graphic.

I can workaround the issue by following the extract instruction below, however, what is required to include the official fix in the final release?

Okay I read further and found that the issue can simply be work around by changing a single setting from 1 to 0

From here: darktable 4.6 user manual - memory & performance tuning

h. disable device
0 = enable device; 1 = disable device
If darktable detects a malfunctioning device it will automatically mark it as such by setting this parameter to 1. If you have a device that reports a lot of errors you can manually disable it by setting this field to 1.

However, the question remains that why is the Windows NEO driver is still blacklisted despite there has been a bug fix that should have fixed the original issue.

What test on Windows can be done to prove that the blacklist can be removed?

1 Like