Multiple GPU, OpenCL Priority setting NOT working as desired

Yes, have read it but there is something amiss in the guide, it talks about 4 settings.
center image
preview pixelpipe
the export pixelpipes
the thumbnail pixelpipes
But if you run DT with -d opencl from terminal it shows

1.648834 [opencl_priorities] these are your device priorities:
1.648836 [opencl_priorities] image preview export thumbs preview2
1.648841 [opencl_priorities] 0 0 0 0 0
1.648845 [opencl_priorities] 1 1 1 1 1
1.648849 [opencl_priorities] show if opencl use is mandatory for a given pixelpipe:
1.648851 [opencl_priorities] image preview export thumbs preview2
1.648855 [opencl_priorities] 0 0 0 0 0

So now there are 5 setting with addition of preview2
Is the Guide not updated?

My DT version is
darktable 3.7.0~git1263.b9383373cc-1
Ubuntu 20.04.3

opencl_device_priority=*/!1,*/1,*/1,*/1,*

Better visible like this (the forum thought your * characters were meant to indicate italics).

You may want to give +1 a try:

You can enforce GPU processing by prefixing the list of allowed GPUs with a plus sign +. In this case darktable will not use the CPU but rather suspend processing until the next permitted OpenCL device is available.

Also, this looks weird to me:

1.648834 [opencl_priorities] these are your device priorities:
1.648836 [opencl_priorities] image preview export thumbs preview2
1.648841 [opencl_priorities] 0 0 0 0 0
1.648845 [opencl_priorities] 1 1 1 1 1

I think this is one line per device (so, first device #0, then #1). Why is device #1 listed for preview, when that is configured as !1,*, meaning anything but #1?

you are correct when I pasted from darktablerc it was jumbled, your setting is what I have.

but that is what I have

Er…

To me this looks as if darktable ignored the config string, if the profile is set to multiple GPUs or
very fast GPU: dt_conf_get_string_const("opencl_device_priority") is only used if some other value (e.g. default) is used for opencl_scheduling_profile.

So is it a bug? Should it be rectified?

No, not a bug in the code (it automatically sets some reasonable default values if those profiles are used – that is their purpose). In fact, the documentation says it, see https://darktable-org.github.io/dtdocs/special-topics/opencl/multiple-devices/:

[…] you need to select the “default” scheduling profile and change the settings in the “opencl_device_priority” configuration parameter.

you might get better performance if you just prioritize full pixel pipe to be done on your faster gpu. If you set same priorities for each pixel pipe then it’s first come first serve - so the full pixel pipe might be done on a slower device since the faster is already in user for preview or thumbnail pipe …
The custom prioritization just works if you’re using standard mode

i’ll do that but my setting is right?

so what should be my setting according to you?

Also I noticed this behavior when doing the benchmark so there was no thumbnails or other UI

you might do some test to find the best configuration by logging the processing time:

darktable -d perf -d opencl | grep -e’dev_process_’ -e’using device’ -e’

<your fastest device>,* first section
maybe exclude your faster device in preview pipe !<your fastest device>, *

Given the manual’s example:

As the GTS450 is slower than the HD7950, an optimized “opencl_device_priority” could look like: !GeForce GTS450,*/!Tahiti,*/Tahiti,*/Tahiti,*.

And ‘Intel(R) UHD Graphics 630 [0x3e92]’ being slower than ‘Ellesmere’, I’d set

opencl_device_priority=default
opencl_device_priority=!Intel(R) UHD Graphics 630 [0x3e92],*/!Ellesmere,*/Ellesmere,*/Ellesmere,*/*

Note that the manual recommends the use of names over numerical IDs. Also, cards have ‘canonical’ names, maybe those would be a better choice:

opencl_device_priority=!intelru,*/!ellesme,*/ellesme,*/ellesme,*/*

0.021208 [opencl_init] opencl_scheduling_profile: 'default’
0.021210 [opencl_init] opencl_library: ‘’
0.021212 [opencl_init] opencl_memory_requirement: 768
0.021213 [opencl_init] opencl_memory_headroom: 400
0.021215 [opencl_init] opencl_device_priority: '!Intel(R) UHD Graphics 630 [0x3e92],/!Ellesmere,/Ellesmere,/Ellesmere,/*'

0.317430 [opencl_priorities] these are your device priorities:
0.317432 [opencl_priorities] image preview export thumbs preview2
0.317437 [opencl_priorities] 0 0 0 0 0
0.317442 [opencl_priorities] 1 1 1 1 1
0.317446 [opencl_priorities] show if opencl use is mandatory for a given pixelpipe:
0.317448 [opencl_priorities] image preview export thumbs preview2
0.317451 [opencl_priorities] 0 0 0 0 0

8.912390 [dev_process_export] pixel pipeline processing took 7.339 secs (8.153 CPU)
[export_job] exported to test.jpg' 9.465691 [opencl_summary_statistics] device 'Intel(R) UHD Graphics 630 [0x3e92]' (0): 221 out of 221 events were successful and 0 events lost 9.467400 [opencl_summary_statistics] device 'Ellesmere' (1): NOT utilized 8.912390 [dev_process_export] pixel pipeline processing took 7.339 secs (8.153 CPU) [export_job] exported to test.jpg’
9.465691 [opencl_summary_statistics] device ‘Intel(R) UHD Graphics 630 [0x3e92]’ (0): 221 out of 221 events were successful and 0 events lost
9.467400 [opencl_summary_statistics] device ‘Ellesmere’ (1): NOT utilized

I don’t know. Maybe you should report this on github.

@kofa I am sorry but I don’t know how to report it on github.

But you may want to connect to the channel where developers hang out, and ask them if this is indeed a problem or if we don’t understand the documentation:
https://webchat.oftc.net/?channels=%23darktable

Simply ask them to check out the issue here (copy the link of your reply where you have already updated the config but still get the ‘not utilized’ message).

Raised the issue at GitHub
Thanks

I have found a workaround with playing with different opencl settings. My Current setting is
> opencl=TRUE
> opencl_async_pixelpipe=true
> opencl_avoid_atomics=false
> opencl_checksum=766871645
> opencl_device_priority=+1/!1,/+1,/+0,/+0,
> opencl_library=
> opencl_mandatory_timeout=200
> opencl_memory_headroom=400
> opencl_memory_requirement=768
> opencl_micro_nap=500
> opencl_number_event_handles=100
> opencl_scheduling_profile=default
> opencl_size_roundup=16
> opencl_synch_cache=false
> opencl_use_cpu_devices=false
> opencl_use_pinned_memory=true

Special mention to opencl_synch_cache=false

if I put the value to =active modules DT will will not start and in the terminal will give error opencl NULL pointer error BUT if I try the second/third time it will start but in some modules it will not do mouse click and give signal error as mentioned in my earlier post here https://discuss.pixls.us/t/cannot-import-many-mouse-clicks-on-modules-not-working/27334?u=rajkhand and sometimes everything will work perfectly!

but after changing the value to false everything works. (I donn’t know the logic/reason)

Can someone tell me why? What exactly this setting does?

thanks

Set “opencl sheduling profile” to “default”, modify “darktablerc” in .config & in system, with the same values