Greetings! Today I got my new video card. It is a Radeon XFX R9 390 8GB. It’s working great so far, but there is one issue: Blender does not detect it as an OpenCL compute device for Cycles rendering. I previously had a GCN 1.0 card, which I understand was unsupported thus I didn’t pursue it further… this one however is GCN 2.0, Blender should support it and there are already videos of people rendering on it:
I’m immediately assuming this is because I’m a Linux user, and I’m also using the free video drivers rather than the proprietary ones. My version of Mesa is 18.1.7 (amdgpu driver), Blender 2.79b, running on Linux openSUSE Tumbleweed x64.
Does anyone know what I’m missing and can help with instructions for this OS? Please however don’t suggest installing proprietary drivers: I’m fine with those and don’t wish to ruin my system.
mircea@linux-qz0r:~> clinfo
Number of platforms 1
Platform Name Clover
Platform Vendor Mesa
Platform Version OpenCL 1.1 Mesa 18.1.7
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix MESA
Platform Name Clover
Number of devices 1
Device Name AMD Radeon (TM) R9 390 Series (HAWAII, DRM 3.26.0, 4.18.9-1-default, LLVM 6.0.1)
Device Vendor AMD
Device Vendor ID 0x1002
Device Version OpenCL 1.1 Mesa 18.1.7
Driver Version 18.1.7
Device OpenCL C Version OpenCL C 1.1
Device Type GPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Max compute units 40
Max clock frequency 1015MHz
Max work item dimensions 3
Max work item sizes 256x256x256
Max work group size 256
Preferred work group size multiple 64
Preferred / native vector sizes
char 16 / 16
short 8 / 8
int 4 / 4
long 2 / 2
half 8 / 8 (cl_khr_fp16)
float 4 / 4
double 2 / 2 (cl_khr_fp64)
Half-precision Floating-point support (cl_khr_fp16)
Denormals No
Infinity and NANs Yes
Round to nearest Yes
Round to zero No
Round to infinity No
IEEE754-2008 fused multiply-add No
Support is emulated in software No
Single-precision Floating-point support (core)
Denormals No
Infinity and NANs Yes
Round to nearest Yes
Round to zero No
Round to infinity No
IEEE754-2008 fused multiply-add No
Support is emulated in software No
Correctly-rounded divide and sqrt operations No
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 8589934592 (8GiB)
Error Correction support No
Max memory allocation 6438518784 (5.996GiB)
Unified memory for Host and Device No
Minimum alignment for any data type 128 bytes
Alignment of base address 32768 bits (4096 bytes)
Global Memory cache type None
Image support No
Local memory type Local
Local memory size 32768 (32KiB)
Max number of constant args 16
Max constant buffer size 2147483647 (2GiB)
Max size of kernel argument 1024
Queue properties
Out-of-order execution No
Profiling Yes
Profiling timer resolution 0ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
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_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64 cl_khr_fp16
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) Clover
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [MESA]
clCreateContext(NULL, ...) [default] Success [MESA]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)
Platform Name Clover
Device Name AMD Radeon (TM) R9 390 Series (HAWAII, DRM 3.26.0, 4.18.9-1-default, LLVM 6.0.1)
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)
Platform Name Clover
Device Name AMD Radeon (TM) R9 390 Series (HAWAII, DRM 3.26.0, 4.18.9-1-default, LLVM 6.0.1)
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 Clover
Device Name AMD Radeon (TM) R9 390 Series (HAWAII, DRM 3.26.0, 4.18.9-1-default, LLVM 6.0.1)
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.2.11
ICD loader Profile OpenCL 2.1
Not that I recall for sure off the top of my head, but I think you need newer OpenCL support. In the list above it says OpenCL 1.1 but by now OpenCL 2.0 is out. I think cycles requires OpenCL 1.2 at minimum though this might have already changed. The 390 does support 2.0 though so that shouldn’t be an issue.
To get the latest drivers you might have to update your kernel. Though more likely you will have to bite the bullet and go for the amdgpu-pro driver stack.
It’s been a while since I’ve used linux though so I can only be of limited help.
One forum I can recommend you to join is https://forum.level1techs.com/ there’s alot of linux users with amd gpus over there and it tends to be a more technical crowd in there to boot so likely that someone in there can help you out.
Thank you for explaining the issue. So it’s the drivers as I expected. Could it be that Mesa / amdgpu haven’t yet implemented support for OpenCL 2.0? I already have a very recent Kernel (4.18.9) as well as Mesa version (18.1.7) since I use a rolling release distribution. Like I said I don’t plan to put proprietary drivers into my system, which includes amdgpu-pro (Linux comes packed with the simpler amdgpu)… if this is the case I’ll have to wait until OpenCL 2.0 gets implemented by the FreeDesktop crew.
I think I remember reading that you need the OpenCL proprietary implementation for AMD. Is your graphics card not currently supported by the proprietary driver?
I don’t know: I don’t use the proprietary driver nor plan to get it. I wish to get this working with the normal builtin setup. If I cannot, I’ll have to wait until Mesa finally implements the needed support.
Very interesting post, thanks! If I can just download and extract the proprietary OpenCL libraries separately then point Blender to them at runtime, that’s definitely an option I may consider for the time being.