darktable and Radeon Vega Mobile Gfx gpu

I have a laptop with a Ryzen 7 3700U cpu with Radeon Vega Mobile Gfx gpu.

Apparently opencl is installed and working:

$ clinfo
Number of platforms 1
Platform Name Portable Computing Language
Platform Vendor The pocl project
Platform Version OpenCL 2.0 pocl 1.8 Linux, None+Asserts, RELOC, LLVM 11.1.0, SLEEF, DISTRO, POCL_DEBUG
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_pocl_content_size
Platform Extensions function suffix POCL
Platform Name Portable Computing Language
Number of devices 1
Device Name pthread-AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
Device Vendor AuthenticAMD
Device Vendor ID 0x1022
Device Version OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-znver1
Driver Version 1.8
Device OpenCL C Version OpenCL C 1.2 pocl
Device Type CPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 8
Max clock frequency 2300MHz
Device Partition (core)
Max number of sub-devices 8
Supported partition types equally, by counts
Supported affinity domains (n/a)
Max work item dimensions 3
Max work item sizes 4096x4096x4096
Max work group size 4096
Preferred work group size multiple (kernel) 8
Preferred / native vector sizes
char 16 / 16
short 16 / 16
int 8 / 8
long 4 / 4
half 0 / 0 (n/a)
float 8 / 8
double 4 / 4 (cl_khr_fp64)
Half-precision Floating-point support (n/a)
Single-precision Floating-point support (core)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Correctly-rounded divide and sqrt operations Yes
Double-precision Floating-point support (cl_khr_fp64)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Address bits 64, Little-Endian
Global memory size 5393359872 (5.023GiB)
Error Correction support No
Max memory allocation 2147483648 (2GiB)
Unified memory for Host and Device Yes
Minimum alignment for any data type 128 bytes
Alignment of base address 1024 bits (128 bytes)
Global Memory cache type Read/Write
Global Memory cache size 4194304 (4MiB)
Global Memory cache line size 64 bytes
Image support Yes
Max number of samplers per kernel 16
Max size for 1D images from buffer 134217728 pixels
Max 1D or 2D image array size 2048 images
Max 2D image size 8192x8192 pixels
Max 3D image size 2048x2048x2048 pixels
Max number of read image args 128
Max number of write image args 128
Local memory type Global
Local memory size 524288 (512KiB)
Max number of constant args 8
Max constant buffer size 524288 (512KiB)
Max size of kernel argument 1024
Queue properties
Out-of-order execution Yes
Profiling Yes
Prefer user sync for interop Yes
Profiling timer resolution 1ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels Yes
printf() buffer size 16777216 (16MiB)
Built-in kernels (n/a)
Device Extensions cl_khr_byte_addressable_store cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_3d_image_writes cl_khr_fp64 cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, …) Portable Computing Language
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, …) Success [POCL]
clCreateContext(NULL, …) [default] Success [POCL]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)
Platform Name Portable Computing Language
Device Name pthread-AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) Success (1)
Platform Name Portable Computing Language
Device Name pthread-AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1)
Platform Name Portable Computing Language
Device Name pthread-AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.2.14
ICD loader Profile OpenCL 3.0

However, dt cannot use it:

$ darktable-cltest
0,0387 [dt_get_sysresource_level] switched to 3 as \unrestricted’`
0,0388 total mem: 6858MB
0,0388 mipmap cache: 857MB
0,0388 available mem: 109728MB
0,0388 singlebuff: 6858MB
0,0388 OpenCL tune mem: OFF
0,0388 OpenCL pinned: OFF
[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 library ‘libOpenCL’ found on your system and loaded
[opencl_init] found 1 platform
[opencl_init] found 1 device
[dt_opencl_device_init]
DEVICE: 0: ‘pthread-AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx’
PLATFORM NAME & VENDOR: Portable Computing Language, The pocl project
CANONICAL NAME: portablecomputinglanguagepthreadamdryzen73700uwithradeonvegamobilegfx
DRIVER VERSION: 1.8
DEVICE VERSION: OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-znver1
DEVICE_TYPE: CPU
GLOBAL MEM SIZE: 5144 MB
MAX MEM ALLOC: 2048 MB
MAX IMAGE SIZE: 8192 x 8192
MAX WORK GROUP SIZE: 4096
MAX WORK ITEM DIMENSIONS: 3
MAX WORK ITEM SIZES: [ 4096 4096 4096 ]
ASYNC PIXELPIPE: NO
PINNED MEMORY TRANSFER: NO
MEMORY TUNING: NO
FORCED HEADROOM: 400
AVOID ATOMICS: NO
MICRO NAP: 1000
ROUNDUP WIDTH: 16
ROUNDUP HEIGHT: 16
CHECK EVENT HANDLES: 128
TILING ADVANTAGE: 0.000
DEFAULT DEVICE: NO
*** marked as disabled ***
[opencl_init] no suitable devices found.
[opencl_init] FINALLY: opencl is NOT AVAILABLE and NOT ENABLED.

Is there anything I can do to get dt using opencl?

what driver are you using and what OS? Have you tried with all default settings?

pocl drivers are not supported because of mediocre performance and not well tested stability.

pocl drivers are not supported

:frowning:

It’s simply not worth as I see it. No perf gain can be expected…

Is ROCm available for your GPU?

I found even a slow GPU worth the effort, if only to calculate the preview while the CPU does the main view.

I think you can edit your darktablerc file and to enable the card, but it might give you issues since it is not supported.