OpenCL is mandatory, yet CPU is used (solved)

@priort, @MStraeten

opencl_scheduling_profile can be set to either very fast GPU or default. If it’s set to very fast GPU, priorities will be set as follows:

If set to default, it’ll honour whatever is specified using in opencl_device_priority:

So one piece of the puzzle is either to use opencl_scheduling_profile=very fast GPU or opencl_scheduling_profile=default. The latter also requires that one specify a setting for opencl_device_priority that forces processing on the GPU. I used opencl_device_priority=+0/+0/+0/+0/+0 (use the 1st device for everything – I have a single GPU), but the one forced by very fast GPU, +*/+*/+*/+*/+* (force the use of any GPU device) is also a good option (especially if one has multiple high-performance GPUs).

The third piece is opencl_mandatory_timeout. No matter what profile is used, the timeout logic applies: if for one of the pipelines the GPU is mandatory (+ sign in the priority), darktable will wait for a GPU to become available, but that wait is limited by opencl_mandatory_timeout (which sets the number of attempts, each attempt meaning a 5-ms wait). Setting very fast GPU also sets pixelpipe_synchronization_timeout, but it does not set anything that affects the wait-then-fallback-to-CPU logic:

So the simplest settings for my case are:

opencl_scheduling_profile=very fast GPU
opencl_mandatory_timeout=20000

With those, darktable will wait up to 100 s; opencl_device_priority specified in the file is ignored and overridden to +*/+*/+*/+*/+* (mandatory processing on any available GPU).