Using AMD APU as second OpenCL device?

Currently my PC is running with:

  • AMD APU A8-7600 Radeon R7
  • NVidia GeForce GTX 1050 Ti

OpenCL is active for the GeForce GPU.
But the AMD A8 contains a Radeon R7 and I’m asking myself if I could use this as a 2nd OpenCL device?

I already did research on the web but I didn’t find any clear information.

Wikipedia says that Radeon R7 family supports OpenCL, but in a detailed list different OpenCL versions are mentioned and different versions of the R7.

AMD CPU Specification only tells ‘R7’ and lists the following APU features:

Virtualization, AES, Catalyst Software, AMD Radeon™ Dual Graphics, Radeon™ FreeSync Technology, Switchable Graphics, The Vulkan® API, AMD Elite Experiences, AMD Enduro™ Technology, IOMMU v2.0, Out of Band Manageability, Per Core Power Gating (CC6), AMD PowerNow!™, System Image Stability, AMD TrueAudio Technology, Unified Video Decoder (UVD), Video Code Engine (VCE), Enhanced Virus Protection, AMD App Acceleration, AMD HD3D Technology, Heterogeneous System Architecture (HSA), AMD Mantle API, DirectX® 12 Technology, FMA4, AVX

Has anybody tried using an AMD APU as second OpenCL device for Darktable or has got such a configuration running?

Small update: I deactivated the APU graphics in BIOS when I built my PC some years ago. After activating and starting up Ubuntu 18.04 it appeared as an OpenCL device.

clinfo shows 2 devices now. Partial info from the GPU:

Platform Name NVIDIA CUDA
Number of devices 1
Device Name GeForce GTX 1050 Ti
Device Vendor NVIDIA Corporation
Device Vendor ID 0x10de
Device Version OpenCL 1.2 CUDA
Driver Version 396.54
Device OpenCL C Version OpenCL C 1.2
Device Type GPU
Device Topology (NV) PCI-E, 01:00.0
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes

Partial info from the APU:

Platform Name Clover
Number of devices 1
Device Name AMD KAVERI (DRM 2.50.0, 4.15.0-47-generic, LLVM 7.0.0)
Device Vendor AMD
Device Vendor ID 0x1002
Device Version OpenCL 1.1 Mesa 18.2.8
Driver Version 18.2.8
Device OpenCL C Version OpenCL C 1.1
Device Type GPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes

Unfortunately, Darktable only uses the GPU. In global settings I set the option ‘multiple GPU’ without changes.

Starting with ‘darktable -d opencl’ I see the following info for the GPU:

0.102580 [opencl_init] opencl related configuration options:
0.102610 [opencl_init]
0.102619 [opencl_init] opencl: 1
0.102629 [opencl_init] opencl_library: ‘’
0.102636 [opencl_init] opencl_memory_requirement: 768
0.102643 [opencl_init] opencl_memory_headroom: 1300
0.102648 [opencl_init] opencl_device_priority: ‘/!0,//
0.102654 [opencl_init] opencl_mandatory_timeout: 200
0.102659 [opencl_init] opencl_size_roundup: 16
0.102666 [opencl_init] opencl_async_pixelpipe: 1
0.102672 [opencl_init] opencl_synch_cache: 0
0.102680 [opencl_init] opencl_number_event_handles: 100
0.102687 [opencl_init] opencl_micro_nap: 100
0.102692 [opencl_init] opencl_use_pinned_memory: 0
0.102697 [opencl_init] opencl_use_cpu_devices: 1
0.102701 [opencl_init] opencl_avoid_atomics: 0
0.102705 [opencl_init]
0.102983 [opencl_init] found opencl runtime library ‘libOpenCL’
0.103023 [opencl_init] opencl library ‘libOpenCL’ found on your system and loaded
0.250187 [opencl_init] found 2 platforms
0.250234 [opencl_init] found 2 devices
0.250549 [opencl_init] device 0 GeForce GTX 1050 Ti' has sm_20 support. 0.250677 [opencl_init] device 0 GeForce GTX 1050 Ti’ supports image sizes of 16384 x 32768
0.250685 [opencl_init] device 0 `GeForce GTX 1050 Ti’ allows GPU memory allocations of up to 1009MB
[opencl_init] device 0: GeForce GTX 1050 Ti
GLOBAL_MEM_SIZE: 4039MB
MAX_WORK_GROUP_SIZE: 1024
MAX_WORK_ITEM_DIMENSIONS: 3
MAX_WORK_ITEM_SIZES: [ 1024 1024 64 ]
DRIVER_VERSION: 396.54
DEVICE_VERSION: OpenCL 1.2 CUDA

Later I find the following info for the APU:

0.434791 [opencl_init] discarding device 1 `AMD KAVERI (DRM 2.50.0, 4.15.0-47-generic, LLVM 7.0.0)’ due to missing image support.
0.434806 [opencl_init] OpenCL successfully initialized.
0.434815 [opencl_init] here are the internal numbers and names of OpenCL devices available to darktable:
0.434825 [opencl_init] 0 ‘GeForce GTX 1050 Ti’
0.434832 [opencl_init] FINALLY: opencl is AVAILABLE on this system.
0.434840 [opencl_init] initial status of opencl enabled flag is ON.

and later…

0.435271 [opencl_priorities] these are your device priorities:
0.435278 [opencl_priorities] image preview export thumbnail
0.435288 [opencl_priorities] 0 0 0 0
0.435297 [opencl_priorities] show if opencl use is mandatory for a given pixelpipe:
0.435302 [opencl_priorities] image preview export thumbnail
0.435312 [opencl_priorities] 0 0 0 0

Seems to be that ‘missing image support’. Any information about this?

Clover doesn’t have image support. Use ROCm …

OK, finally I managed to install the OpenCL-only installation of ROCm. But I see no difference.
The APU still is identified as ‘clover’ and the ROCm website says that Kaveri APUs like mine are not supported.

Think that I’m on a dead end here, or do you have any idea?

I have an AMD APU A12-9800. (Also Radeon R7)
(8 GPU cores, 4 CPU cores)
I have installed the proprietary driver and OpenCL works fine, although I have yet to run the “benchmark” tests recently mentioned in this thread

1 Like

Benchmarks: 59s with opencl enabled, 124 with opencl disabled. Not a fantastic speedup, but at least 2x and change.

[This for device ‘Carrizo’ on my AMD A12-9800 APU]

Which driver do you use? I checked the AMD website and found the following link:
https://www.amd.com/en/support
When I choose my APU (A8-7600) I only find drivers that are for Ubuntu 12 and 14 (I got 18.04)

The drivers I found for Ubuntu 18.04 are Radeon drivers and I don’t know if they work for the Radeon R7 of my APU:
https://www.amd.com/en/support/kb/release-notes/rn-prorad-lin-18-20

I have downloaded from the Radeon drivers page you cite amdgpu-pro-18.20-579836
The current version for Ubuntu 18.04 on that page is 18.20-673703
I would suggest giving that a (cautious) go.