Darktable 3.0 and OpenCL on modern hardware

Hello,

here are some suggestions for configuring OpenCL for modern hardware. I own an AMD Radeon RX470 (8GB RAM). If you have a similar card, the settings will work for you too.

Here are the values I use in my ~/.config/darktable/darktablerc

opencl_async_pixelpipe=true
opencl_avoid_atomics=false
opencl_device_priority=*/!0,*/*/*
opencl_number_event_handles=250
opencl_scheduling_profile=very fast GPU
opencl_micro_nap=100

For AMD GPU only:

opencl_use_pinned_memory=true

This speeds up exporting of images with AMD GPUs.

More details are at: “darktable and OpenCL” in the darktable usermanual

This also applies to darktable 2.x :wink:

9 Likes

If you have an Intel graphics card, make sure you have the Intel NEO compute runtime installed!

https://github.com/intel/compute-runtime/blob/master/documentation/Neo_in_distributions.md

My notebook has an Intel UHD Graphics 620. I’m using the following configuration changes from the first post on my Notebook:

opencl_number_event_handles=75
opencl_micro_nap=250

Did I get this right from this darktable.org page, that priority is only acknowledged, when scheduling_profile is set to default?

For my nvidia, I have further set (from above page):

opencl_disable_drivers_blacklist=false
opencl_enable_markesteijn=true
opencl_micro_nap=100
opencl_omit_whitebalance=false
opencl_size_roundup=16
opencl_synch_cache=active module

I wonder, we ever have the chance, multiple GPU’s will be used for exporting

I’m sorry @AlexG but the values you suggest are either non-existent or the default values!

  • opencl_enable_markesteijn=true: grep’ping for it in the source code doesn’t find anything for this option!
  • opencl_omit_whitebalance=false: grep’ping the source code doesn’t find any this config value!
  • opencl_size_roundup=16 16 is the default, round width/height of global work groups to a multiple of this value. reasonable values are powers of 2.
  • opencl_synch_cache=active module active module is the default,

The only valid one is:

opencl_micro_nap=100

Also you should add which hardware you have, values often don’t fit for every hardware.

1 Like

SORRY, seems I sold an old story :wink: :blush:

IIRC they where really recommended some time. That merely proves, I’m an old dt-dog.
Sorry for the noise. :smile:

I have two GTX1060 6GB OC on a core i9 9900k with 32GB ram

In the darktable package should be a darktablerc.html which describes each config value.

  1. This is file shold be available on the website
  2. This file should be converted to a manpage

I’ve opened bugs for both.

1 Like

@asn

thru this discussion, I was just now experimenting with opencl_memory_requirement and bumped it up to 2048.

in this issue #2724 I said, the WB (for instance) getting vers smooth, when I grab the slider a second time.

Now with opencl_memory_requirement=2048 this effect disappears to the negative, means it remains sluggish, no matter how often I “re-grab”. Values from 512 to 1024 do behave like I described in that issue.
Can you conclude something out of this?

Edit 1

I did some benchmarking and also had "watch nvidia-smi " running. With opencl_memory_requirement=2048 opencl obviously switches off completely (in case that is documented somewhere, sorry, I did not see that)

Edit 2

O.k. I got reminded from darktable.org, opencl_memory_requirement means, that amount is to be present at least, so the card will be accepted. Anyhow I cannot understand, as merely 420MB are occupied by plasma, so 5,5GB should be available, why opencl gets switched of? From here, we are running OT, I guess…

Just to recover my little repuation :slight_smile: here you can see, I was not the only one who used it :slight_smile:

I have no idea why it gets switched of if you raise it. The default is 768.

I think it should not mess your thread here, I opened an issue #3365. Let’s see…

2 Likes

a) You had good input, I’ve updated the main post.
b) We fixed your config :slight_smile:
c) We found a bug with opencl memory which just has been fixed!

4 Likes

I am using Windows 10 , with UHD 620. Can I install the same driver to enable OpenCL ?

I think on Windows all you need is their Graphics driver from https://downloadcenter.intel.com/

The windows driver showed the same issues as the linux driver. so they want something like the neo driver for windows as well.

I have not seen an official Neo release for Windows - as a result back when I submitted the patch that un-blacklisted Neo as a result of discoveries made as to the root cause of original failures (improper cache invalidation on driver updates), due to not having any testing done on Windows (and the most recent information being that failures had occurred), the blacklisting was ONLY removed for Linux platforms on which I (and a few others) could confirm that recent NEO drivers were working well.

A potential outstanding issue is that some distributions are packaging the drivers in such a way as to report a 1.0.0 version regardless of actual version, which may break cache invalidation. I was going to look into that but switched away from darktable for other reasons instead.

For Linux platforms, Intel provides status of whether the driver passed Khronos conformance tests at Releases · intel/compute-runtime · GitHub - no such testing artifacts are provided for Windows builds (and in fact Windows has no official releases.)

1 Like

Hi! Did you experience some speedups during export? I’ve tried exporting with open CL active and entire system interface freeze. Plus I’ve not experienced any speedup, also with your settings.
Intel uhd 620 here

Do you have a discrete GPU or just the built-in Intel? Intel’s openCL can be funky.

Only the integrated Intel with new neo drivers