Alles wat aar zoal meemaakt

5915Darktable on GPU or CPU

posted by on oktober 9th, 2019

I’m processing 42MP raw images using Darktable on an older laptop with these specifications:

  • CPU: Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz
  • GPU: NVIDIA Corporation GF108M [GeForce GT 425M] (rev a1)

Ubuntu Studio 18.04 installed the Nouveau open source driver by default but exporting images took a long time. Therefore the Ubuntu binary driver (nvidia-384 390.116-0ubuntu0.18.04.1) was installed. And guess what: exporting images took even longer: about 50%. Why, how?

Maybe this CPU is relatively fast (I’m running with 8 threads – however this throttles the chip down considerably due to heat dissipation). Or the GT 425M is rather slow? Or is there a lack of dedicated video memory (1GB onboard)? When exporting an image with opencl support only a single thread runs on the CPU (except when a module is not supported in opencl).

$ darktable -d perf 2>/dev/null dsc00801.arw
12,245726 [dev] took 0,000 secs (0,000 CPU) to load the image.
12,390377 [export] creating pixelpipe took 0,143 secs (0,181 CPU)
12,438697 [dev_pixelpipe] took 0,048 secs (0,134 CPU) initing base buffer [export]
12,508381 [dev_pixelpipe] took 0,070 secs (0,056 CPU) processed `raw black/white point' on GPU, blended on GPU [export]
12,552541 [dev_pixelpipe] took 0,044 secs (0,033 CPU) processed `white balance' on GPU, blended on GPU [export]
12,592998 [dev_pixelpipe] took 0,040 secs (0,031 CPU) processed `highlight reconstruction' on GPU, blended on GPU [export]
13,527287 [dev_pixelpipe] took 0,934 secs (0,625 CPU) processed `demosaic' on GPU with tiling, blended on CPU [export]
14,221728 [dev_pixelpipe] took 0,694 secs (0,523 CPU) processed `base curve' on GPU with tiling, blended on CPU [export]
14,675627 [dev_pixelpipe] took 0,454 secs (0,424 CPU) processed `input color profile' on GPU with tiling, blended on CPU [export]
15,707754 [dev_pixelpipe] took 1,032 secs (0,840 CPU) processed `crop and rotate' on GPU with tiling, blended on CPU [export]
101,875460 [dev_pixelpipe] took 86,168 secs (58,746 CPU) processed `denoise (non-local means)' on GPU with tiling, blended on CPU [export]
102,680297 [dev_pixelpipe] took 0,805 secs (0,628 CPU) processed `sharpen' on GPU with tiling, blended on CPU [export]
103,370905 [dev_pixelpipe] took 0,691 secs (0,521 CPU) processed `output color profile' on GPU with tiling, blended on CPU [export]
103,474120 [dev_pixelpipe] took 0,103 secs (0,781 CPU) processed `gamma' on CPU, blended on CPU [export]
103,474459 [dev_process_export] pixel pipeline processing took 91,084 secs (63,343 CPU)
[export_job] exported to `dsc00801.jpg'
$ darktable --disable-opencl -d perf 2>/dev/null dsc00801.arw
21,905118 [dev] took 0,000 secs (0,000 CPU) to load the image.
22,053316 [export] creating pixelpipe took 0,146 secs (0,183 CPU)
22,102107 [dev_pixelpipe] took 0,049 secs (0,108 CPU) initing base buffer [export]
22,131318 [dev_pixelpipe] took 0,029 secs (0,076 CPU) processed `raw black/white point' on CPU, blended on CPU [export]
22,158311 [dev_pixelpipe] took 0,027 secs (0,091 CPU) processed `white balance' on CPU, blended on CPU [export]
22,178494 [dev_pixelpipe] took 0,020 secs (0,120 CPU) processed `highlight reconstruction' on CPU, blended on CPU [export]
22,848160 [dev_pixelpipe] took 0,670 secs (4,030 CPU) processed `demosaic' on CPU, blended on CPU [export]
23,051582 [dev_pixelpipe] took 0,203 secs (1,040 CPU) processed `base curve' on CPU, blended on CPU [export]
23,208922 [dev_pixelpipe] took 0,157 secs (1,164 CPU) processed `input color profile' on CPU, blended on CPU [export]
24,867515 [dev_pixelpipe] took 1,659 secs (13,088 CPU) processed `crop and rotate' on CPU, blended on CPU [export]
79,649894 [dev_pixelpipe] took 54,782 secs (430,211 CPU) processed `denoise (non-local means)' on CPU, blended on CPU [export]
80,092760 [dev_pixelpipe] took 0,443 secs (3,198 CPU) processed `sharpen' on CPU, blended on CPU [export]
80,409923 [dev_pixelpipe] took 0,317 secs (2,397 CPU) processed `output color profile' on CPU, blended on CPU [export]
80,515835 [dev_pixelpipe] took 0,106 secs (0,752 CPU) processed `gamma' on CPU, blended on CPU [export]
80,515892 [dev_process_export] pixel pipeline processing took 58,463 secs (456,276 CPU)
[export_job] exported to `dsc00801.jpg'

91 seconds using the GPU and only 58,5 on the CPU. Rather close to the 50% difference found looking at file time stamps.

TODO: when back home, test using the same software versions and a faster CPU + much faster GPU on the same target file.

 

 

Geef een reactie

Het e-mailadres wordt niet gepubliceerd.

Time limit is exhausted. Please reload CAPTCHA.