Optimizing OpenCL for dual GPUs on Mac Pro 2013 ("trashcan")

I’m running darktable 5.0.0 on a Mac Pro (2013) with dual AMD FirePro D500 GPUs with 3 GB of VRAM each. The GPUs are identical, but only one is connected to the displays. Most software only takes advantage of the GPU with the display engine. darktable is able to use both, and it makes a difference in performance. Kudos to the developers. But I’d like to squeeze even more performance out of that 2nd GPU.

Since one GPU isn’t involved in display refresh, I’d like to be able to set the micronap parameter to 0 on that card. But there’s only one set of OpenCL parameters for both GPUs. I don’t see a way to do this in the darktablerc file. The forced VRAM headroom parameter is per GPU, and for that GPU is correctly set to 1. It would be nice to be able to set micronap independently for the two GPUs as well.

I realize these “trashcan” Macs are obsolete and no longer supported by Apple, so I don’t blame the developers for ignoring this special case. And I imagine the performance improvement is minimal. But if I’m missing a setting somewhere in the darktablerc file, please let me know.

Tangentially related, why is OpenCL disabled by default on this platform, and why is opencl_mandatory_timeout set to 200 when the documented default is 400? Or are these settings carried over from the darktablerc file for the previous darktable release?

Thanks.

What OS are you running?

Its carried over from past use, most likely.

macOS Monterey, 12.7.6. The last supported OS for this machine.

I’ve briefly tried installing a newer OS with OpenCore Legacy Patcher, but returned to 12.7.6 after encountering difficulties.

darktable seems to be unable to properly decide if gpu processing is more performant than cpu processing on apple devices - so it disables opencl.

If you run darktable-cltest from terminal then both cards should be identified resulting in two cldevice_v5_xxx= lines in .config/darktable/darktablerc.
(see darktable user manual - memory & performance tuning)

if not, then then please report the result of darktable-cltest and create an issue report at github. Then a developer might help to find a proper solution.

Since the developers doesn’t have access to a trashcan (the most active opencl developer even doesn’t have access to a mac) no one is ignoring something :wink:

This is what I see in darktablerc after enabling OpenCL and running darktable-cltest again:

cldevice_v5_appleamdradeonhdfireprod500computeengine=0 250 0 16 16 256 1 0 0.000 0.000 0.250
cldevice_v5_appleamdradeonhdfireprod500computeengine_building=-cl-fast-relaxed-math
cldevice_v5_appleamdradeonhdfireprod500computeengine_id0=1
cldevice_v5_appleamdradeonhdfireprod500computeengine_id1=400
cldevice_v5_appleintelrxeonrcpue52667v2330ghz=0 1000 0 16 16 128 0 1 0.000 0.000 0.250
cldevice_v5_appleintelrxeonrcpue52667v2330ghz_id0=400

As I said, I recognize this is an obsolete machine, and it’s unlikely there are many users on any platform with identical twin GPUs. I’m just looking to squeeze a little more speed out of this antique. The fact that darktable works so well already (once OpenCL is enabled) is a testament to the developers’ hard work. And thanks to @MStraeten in particular for supporting users of antique Macs with the builds for older OS versions!