Darktable - Can't activate OpenCL !
Updated: Nov 13, 2021
For historical reasons Darktable blocks the use of the OpenCL bookstore with some GPUs including the widespread Intel UHD620 or UHD630. These include GPUs embedded in Intel processors.
To Activate OpenCL: Global Preferences ''CPU/GPU/Memory'' Check the box: Enable the open CL support
If this box is grayed: go into the darktable/bin directory (under windows: C:\Program File\darktable\bin) and run darktable-cltest
If it shows you about thirty lines, look towards the end and you will see that your device is Blacklisted.
0.100230 [opencl_init] found opencl runtime library 'OpenCL.dll' 0.100230 [opencl_init] opencl library 'OpenCL.dll' found on your system and loaded 0.200553 [opencl_init] found 1 platform 0.200553 [opencl_init] found 1 device 0.200553 [opencl_init] discarding device 0 `Intel(R) UHD Graphics 630' because the driver `OpenCL 3.0 NEO ' is blacklisted. 0.216080 [opencl_init] no suitable devices found. 0.216080 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system. 0.216080 [opencl_init] initial status of opencl enabled flag is OFF.
If so, the good news is that there is a simple solution:
· Edit the darktablerc config file (Under windows, it is in the directory C:\Users\[yourname]\AppData\Local\darktable)
· Change the line: opencl_disable_drivers_blacklist=FALSE by replacing the FALSE with TRUE opencl_disable_drivers_blacklist=TRUE
Relaunch darktable-cltest then you should have hundred line this time and at about the place where you had before the Blacklist notification, you should see:
0.115910 [opencl_init] found opencl runtime library 'OpenCL.dll' 0.115910 [opencl_init] opencl library 'OpenCL.dll' found on your system and loaded 0.215946 [opencl_init] found 1 platform 0.215946 [opencl_init] found 1 device 0.215946 [opencl_init] device 0 `Intel(R) UHD Graphics 630' supports image sizes of 16384 x 16384 0.231479 [opencl_init] device 0 `Intel(R) UHD Graphics 630' allows GPU memory allocations of up to 4095MB [opencl_init] device 0: Intel(R) UHD Graphics 630 GLOBAL_MEM_SIZE: 13047MB MAX_WORK_GROUP_SIZE: 256 MAX_WORK_ITEM_DIMENSIONS: 3 MAX_WORK_ITEM_SIZES: [ 256 256 256 ] DRIVER_VERSION: 126.96.36.19916 DEVICE_VERSION: OpenCL 3.0 NEO
Last step: Now the OpenCL configuration boxes are no longer grayed out in Darktable, all you have to do is activate them and verify that Darktable is using OpenCL.