FWIW, Not all Linux distributions are the same.
Using Fedora 36 and 37 (in beta, about to be released), darktable uses OpenCL on a recent AMD GPU (in my case, AMD RX 6700XT) after you install the rocm-opencl
package. Aside from installing darktable — that’s all you need to do.
So, theoretically, it should work on other distributions too, like Ubuntu — but apparently (and sadly) it doesn’t. One of the AMD devs contributed and maintains the ROCm packages “unofficially” on Fedora, so that’s probably why it works so well in this distro. Hopefully someone sorts it out for Ubuntu (and others) too.
Here’s my darktable-cltest
as a point of comparison:
$ darktable-cltest
[dt_get_sysresource_level] switched to 2 as `large'
total mem: 32006MB
mipmap cache: 4000MB
available mem: 21879MB
singlebuff: 500MB
OpenCL tune mem: OFF
OpenCL pinned: WANTED
[opencl_init] opencl related configuration options:
[opencl_init] opencl: ON
[opencl_init] opencl_scheduling_profile: 'default'
[opencl_init] opencl_library: 'default path'
[opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
[opencl_init] opencl_mandatory_timeout: 200
[opencl_init] opencl_synch_cache: active module
[opencl_init] opencl library 'libOpenCL' found on your system and loaded
[opencl_init] found 1 platform
[opencl_init] found 1 device
[dt_opencl_device_init]
DEVICE: 0: 'gfx1031'
CANONICAL NAME: gfx1031
PLATFORM NAME & VENDOR: AMD Accelerated Parallel Processing, Advanced Micro Devices, Inc.
DRIVER VERSION: 3452.0 (HSA1.1,LC)
DEVICE VERSION: OpenCL 2.0
DEVICE_TYPE: GPU
GLOBAL MEM SIZE: 12272 MB
MAX MEM ALLOC: 10431 MB
MAX IMAGE SIZE: 16384 x 16384
MAX WORK GROUP SIZE: 256
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 1024 1024 1024 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: WANTED
MEMORY TUNING: NO
FORCED HEADROOM: 400
AVOID ATOMICS: NO
MICRO NAP: 250
ROUNDUP WIDTH: 16
ROUNDUP HEIGHT: 16
CHECK EVENT HANDLES: 128
PERFORMANCE: 3.113406
DEFAULT DEVICE: NO
KERNEL DIRECTORY: /usr/share/darktable/kernels
CL COMPILER OPTION: -cl-fast-relaxed-math
KERNEL LOADING TIME: 0.0370 sec
[opencl_init] OpenCL successfully initialized.
[opencl_init] here are the internal numbers and names of OpenCL devices available to darktable:
[opencl_init] 0 'gfx1031'
[opencl_init] FINALLY: opencl is AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is ON.
[dt_opencl_update_priorities] these are your device priorities:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 0 -1 0 0 -1
[dt_opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[dt_opencl_update_priorities] image preview export thumbs preview2
[dt_opencl_update_priorities] 0 0 0 0 0
[opencl_synchronization_timeout] synchronization timeout set to 200
And here’s the output of clinfo
, as a text attachment (as it’s VERY verbose):
clinfo.txt (10.2 KB)
Notably, it does have image support. Here’s the relevant excerpt from clinfo
:
Image support Yes
Max number of samplers per kernel 29663
Max size for 1D images from buffer 134217728 pixels
Max 1D or 2D image array size 8192 images
Base address alignment for 2D image buffers 256 bytes
Pitch alignment for 2D image buffers 256 pixels
Max 2D image size 16384x16384 pixels
Max 3D image size 16384x16384x8192 pixels
Max number of read image args 128
Max number of write image args 8
Max number of read/write image args 64
(This is on Fedora Linux 37 beta, Silverblue edition with rocm-opencl
.)
I’m sorry that this doesn’t exactly help you all using Ubuntu, except to show that it can work on Linux and also as a comparison of when it is working. I hope it’s fixed soon for you.