How to configure Darktable with OpenCL for your AMD APU

I was really curious for a piece of working opencl software. Then I found out that a software I love actually also does opencl! The only issue is, it did not work by default on my system with AMD APU, because the assigned graphics memory by my BIOS did not suffice. I can only dedicate a maximum of 512 MB to the GPU part of the APU. But this is probably also the minimum for a good setup.

Setting up the AMD OpenCL SDK is a requirement for this to work! Also you have to enable OpenCL support in the Darktable configuration. Also be aware that this may crash your system as the fglrx driver is not very stable with OpenCL yet. In my experience it likes to crash especially after a suspend to ram.

Anyway, so after all this what you have to do is to edit your darktable config file manually. Make sure to make a backup and then add these lines to .config/darktable/darktablerc:
opencl_memory_requirement=250
opencl_memory_headroom=150

Issue a "sync" command before starting darktable to be sure you don't lose data with a possible crash! ;)

These numbers work pretty well for me on a system with 512 MB dedicated memory. But they should probably work more or less on any AMD APU. I have bad experience with higher and lower numbers than these. Also I think vaapi/xvba did not work at the same time. You can still enable and disable OpenCL on demand in the GUI settings menu.

Let there be OpenCL! Enjoy!

No comments:

Post a Comment

I appreciate comments. And I do read them.