Darktable crashing with opencl (Win 11)

Hi, I’m having trouble with opencl.

It’s working great until I use highlight reconstruction in filmic otherwise other seems to work fine with opencl enable.

My configuration is:
Ryzen 5 5600h (I use the integrated gpu of the processor to run opencl)

16go ram

Darktable 4.4.2

Windows 11

Thanks in advance for your help.
Julien.

Have you checked if you have the latest version of the GPU drivers?

Can you share the output of darktable-cltest ?

I installed it this afternoon. No change unfortunately

here the result:

0,0824 [dt_get_sysresource_level] switched to 3 as `unrestricted’
0,0844 total mem: 15775MB
0,0855 mipmap cache: 1971MB
0,0863 available mem: 252408MB
0,0872 singlebuff: 15775MB
0,0880 OpenCL tune mem: OFF
0,0887 OpenCL pinned: WANTED
[opencl_init] opencl related configuration options:
[opencl_init] opencl: ON
[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 library ‘OpenCL.dll’ found on your system and loaded
[opencl_init] found 2 platforms
[opencl_init] found 3 devices

[dt_opencl_device_init]
DEVICE: 0: ‘gfx90c’
PLATFORM NAME & VENDOR: AMD Accelerated Parallel Processing, Advanced Micro Devices, Inc.
CANONICAL NAME: amdacceleratedparallelprocessinggfx90c
DRIVER VERSION: 3570.0 (PAL,HSAIL)
DEVICE VERSION: OpenCL 2.0 AMD-APP (3570.0)
DEVICE_TYPE: GPU
GLOBAL MEM SIZE: 6235 MB
MAX MEM ALLOC: 4865 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: NO
PINNED MEMORY TRANSFER: WANTED
MEMORY TUNING: NO
FORCED HEADROOM: 400
AVOID ATOMICS: NO
MICRO NAP: 250
ROUNDUP WIDTH: 16
ROUNDUP HEIGHT: 16
CHECK EVENT HANDLES: 128
PERFORMANCE: 0.000
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
KERNEL BUILD DIRECTORY: C:\Program Files\darktable\share\darktable\kernels
KERNEL DIRECTORY: C:\Users\gamer\AppData\Local\Microsoft\Windows\INetCache\darktable\cached_v1_kernels_for_AMDAcceleratedParallelProcessinggfx90c_35700PALHSAIL
CL COMPILER OPTION: -cl-fast-relaxed-math
KERNEL LOADING TIME: 0.1231 sec

[dt_opencl_device_init]
DEVICE: 1: ‘AMD Radeon™ Graphics’
PLATFORM NAME & VENDOR: OpenCLOn12, Microsoft
CANONICAL NAME: openclon12amdradeontmgraphics
DRIVER VERSION: 1.1.0
DEVICE VERSION: OpenCL 1.2 D3D12 Implementation
DEVICE_TYPE: GPU
GLOBAL MEM SIZE: 7888 MB
MAX MEM ALLOC: 1024 MB
MAX IMAGE SIZE: 16384 x 16384
MAX WORK GROUP SIZE: 1024
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 1024 1024 64 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: WANTED
MEMORY TUNING: NO
FORCED HEADROOM: 400
AVOID ATOMICS: NO
MICRO NAP: 250
ROUNDUP WIDTH: 16
ROUNDUP HEIGHT: 16
CHECK EVENT HANDLES: 128
PERFORMANCE: 0.000
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
KERNEL BUILD DIRECTORY: C:\Program Files\darktable\share\darktable\kernels
KERNEL DIRECTORY: C:\Users\gamer\AppData\Local\Microsoft\Windows\INetCache\darktable\cached_v1_kernels_for_OpenCLOn12AMDRadeonTMGraphics_110
CL COMPILER OPTION: -cl-fast-relaxed-math
KERNEL LOADING TIME: 2.8894 sec

[dt_opencl_device_init]
DEVICE: 2: ‘Microsoft Basic Render Driver’
PLATFORM NAME & VENDOR: OpenCLOn12, Microsoft
CANONICAL NAME: openclon12microsoftbasicrenderdriver
DRIVER VERSION: 1.1.0
DEVICE VERSION: OpenCL 1.2 D3D12 Implementation
DEVICE_TYPE: GPU
GLOBAL MEM SIZE: 7888 MB
MAX MEM ALLOC: 1024 MB
MAX IMAGE SIZE: 16384 x 16384
MAX WORK GROUP SIZE: 1024
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 1024 1024 64 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: WANTED
MEMORY TUNING: NO
FORCED HEADROOM: 400
AVOID ATOMICS: NO
MICRO NAP: 250
ROUNDUP WIDTH: 16
ROUNDUP HEIGHT: 16
CHECK EVENT HANDLES: 128
PERFORMANCE: 0.000
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
KERNEL BUILD DIRECTORY: C:\Program Files\darktable\share\darktable\kernels
KERNEL DIRECTORY: C:\Users\gamer\AppData\Local\Microsoft\Windows\INetCache\darktable\cached_v1_kernels_for_OpenCLOn12MicrosoftBasicRenderDriver_110
CL COMPILER OPTION:
KERNEL LOADING TIME: 2.5646 sec
[opencl_init] OpenCL successfully initialized. Internal numbers and names of available devices:
[opencl_init] 0 ‘AMD Accelerated Parallel Processing gfx90c’
[opencl_init] 1 ‘OpenCLOn12 AMD Radeon™ Graphics’
[opencl_init] 2 ‘OpenCLOn12 Microsoft Basic Render Driver’
[opencl_init] FINALLY: opencl is AVAILABLE and ENABLED.
[dt_opencl_update_priorities] these are your device priorities:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 0 1 0 0 1
[dt_opencl_update_priorities] 1 2 1 1 2
[dt_opencl_update_priorities] 2 -1 2 2 -1
[dt_opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 0 0 0 0 0
[opencl_synchronization_timeout] synchronization timeout set to 200
[dt_opencl_update_priorities] these are your device priorities:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 0 1 0 0 1
[dt_opencl_update_priorities] 1 2 1 1 2
[dt_opencl_update_priorities] 2 -1 2 2 -1
[dt_opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 0 0 0 0 0
[opencl_synchronization_timeout] synchronization timeout set to 200

press any key to exit

Exactly what I was expecting. You have 1 GPU card but 3 drivers. Two of them are Microsoft stuff that cause issues (PLATFORM NAME & VENDOR: OpenCLOn12, Microsoft). I have a PR (change request) in github trying to limit this problem on windows system, but you wont see it until the next release (Dec23).

Meanwhile you have two options. Go to your windows install and remove the OpenCL Compatibility. It is pre-installed in Windows.

The second options (maybe easier) is to edit your darktablerc file to disable those two drivers. Here is the location of the file faq | darktable .

In the file you will see something like:
cldevice_v5_OpenCLOn12AMDRadeonTMGraphics_110=0 250 0 16 16 128 0 0 0.051739 0.000

change the 3rd to last group number from 0 to 1 like this:
cldevice_v5_OpenCLOn12AMDRadeonTMGraphics_110=0 250 0 16 16 128 0 1 0.051739 0.000

Do this for both of the Microsoft drivers to disable them.

1 Like

i tried it and it’s not crashing anymore with opencl enable. but my gpu usage is still between 0 and 7 percent in module like diffuse and sharper.

wich one am i suppose to modify ?

cldevice_v4_amdradeontmgraphics=0 250 0 16 16 128 0 0 0.559609 0.000
cldevice_v4_amdradeontmgraphics_building=-cl-fast-relaxed-math
cldevice_v4_amdradeontmgraphics_id1=400
cldevice_v4_gfx90c=0 250 0 16 16 128 0 0 0.369272 0.000
cldevice_v4_gfx90c_building=-cl-fast-relaxed-math
cldevice_v4_gfx90c_id0=400
cldevice_v4_microsoftbasicrenderdriver=0 250 0 16 16 128 0 0 0.128237 0.000
cldevice_v4_microsoftbasicrenderdriver_building=-cl-fast-relaxed-math
cldevice_v4_microsoftbasicrenderdriver_id2=400
cldevice_v5_amdacceleratedparallelprocessinggfx90c=0 250 0 16 16 128 0 0 1000000.000000 0.000
cldevice_v5_amdacceleratedparallelprocessinggfx90c_building=-cl-fast-relaxed-math
cldevice_v5_amdacceleratedparallelprocessinggfx90c_id0=400
cldevice_v5_openclon12amdradeontmgraphics=0 250 0 16 16 128 0 0 1000000.000000 0.000
cldevice_v5_openclon12amdradeontmgraphics_building=-cl-fast-relaxed-math
cldevice_v5_openclon12amdradeontmgraphics_id1=400
cldevice_v5_openclon12microsoftbasicrenderdriver=0 250 0 16 16 128 0 0 1000000.000000 0.000
cldevice_v5_openclon12microsoftbasicrenderdriver_building=
cldevice_v5_openclon12microsoftbasicrenderdriver_id2=400

When you say I tired it, can you describe what it is?

You can delete everything with V4, since that’s from a previous version of darktable.

For the rest, you can use this:
cldevice_v5_amdacceleratedparallelprocessinggfx90c=0 250 0 16 16 128 0 0 1000000.000000 0.000 cldevice_v5_amdacceleratedparallelprocessinggfx90c_building=-cl-fast-relaxed-math cldevice_v5_amdacceleratedparallelprocessinggfx90c_id0=400 cldevice_v5_openclon12amdradeontmgraphics=0 250 0 16 16 128 0 1 1000000.000000 0.000 cldevice_v5_openclon12amdradeontmgraphics_building=-cl-fast-relaxed-math cldevice_v5_openclon12amdradeontmgraphics_id1=400 cldevice_v5_openclon12microsoftbasicrenderdriver=0 250 0 16 16 128 0 1 1000000.000000 0.000 cldevice_v5_openclon12microsoftbasicrenderdriver_building= cldevice_v5_openclon12microsoftbasicrenderdriver_id2=400

Keep in mind that you have an internal GPU (part of the CPU) vs a real GPU. It is not going to give you a significant performance increase because it is a shared resource.

ok, never mind windows was not reporting correct information i open amd adrenalin software and when i enable and disable openCL i see if the gou is used or not.

yeah, i know that it’s not going to be night and day but a little better is always a little better ahah.

in any case thanks a lot for helping me ! :slight_smile:

yeah by i tried it i mean your solution ahah.

g-man proposed two solutions. Which one did you implement?

the second one.

1 Like

Small question that is not related to the original but I don’t think creating a new thread worth it.

Is host memory limit to prevent tiling still available somewhere like maybe in darktablerc because I can’t find it in the preferences menu in darktable.

Thanks in advance.

I dont understand the question. Tiling is a function of available memory. If the raw is too large for the available memory, dt will create tiles. I dont think we are using host memory settings anymore. The resources settings in preference should take care of the memory.

Okay I see! Yes there was a setting that might have been removed that set the memory that darktable could use before using tiling.