My main goal is to make Blender 2.82a able to detect my system's GPU then use as OpenCL compute to fasten the time in rendering.
The problem seems to be my Ubuntu distribution version is too high as I have 19.10 (with kernel
5.5.11-050511-lowlatency) + AMDGPU-PRO's OpenCL component can only officially support up to Ubuntu 18.04, same goes to ROCm.
I did try install AMDGPU-PRO's OpenCL via its installation script targeting only OpenCL component (via
--headless), and even manually install one by one package; all with no success. It is clear as stated, not support shown up in error message. I would like to try again with ROCm but its package seems to be large. With no pre-built package available for my distro, I guess it will fail the same.
So what would be my options if going back to 18.04 would be a last resort in installing OpenCL driver for my GPU (APU from Ryzen 3 2200g to be exact, I have no discrete GPU) alongside already installed open-source OpenGL/Vulkan driver from Mesa ?
In the mean time, I did what I can to test things out by installing OpenCL 1.1 via
libclang-common-10-dev libclc-amdgcn libclc-dev libclc-r600 libllvm10 mesa-opencl-icd packages. It shows meaningful information via
clinfo. But Blender still didn't detect any GPU as OpenCL device.
I tested with ROCm. With good reports from here, and here, it becomes clear Ubuntu release version of 19.10 should not be a problem, only just need a proper kernel version. Thus I reverted my kernel version back to 5.3.x (specifically use 5.3.18 generic as 5.3 is stated as a supported version for ROCm, and from the report).
Note that I minimally install packages as stated in 2nd report link as ROCm packages are huge then follow the less of installation instruction from README.md of its github page. Although I'm on
eoan and the package is from
xenial, I do take the risk for now. All passed. I can validate via
clinfo or its
/opt/rocm-3.1.0/opencl/bin/x86_64/clinfo both give meaningful result that I now have OpenCL 2.1 but with NO device found!!!.
Number of platforms 1 Platform Name AMD Accelerated Parallel Processing Platform Vendor Advanced Micro Devices, Inc. Platform Version OpenCL 2.1 AMD-APP (3084.0) Platform Profile FULL_PROFILE Platform Extensions cl_khr_icd cl_amd_event_callback cl_amd_offline_devices Platform Host timer resolution 1ns Platform Extensions function suffix AMD Platform Name AMD Accelerated Parallel Processing Number of devices 0 NULL platform behavior clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) AMD Accelerated Parallel Processing clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) clCreateContext(NULL, ...) [default] No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform 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) No devices found in platform 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
Number of platforms: 1 Platform Profile: FULL_PROFILE Platform Version: OpenCL 2.1 AMD-APP (3084.0) Platform Name: AMD Accelerated Parallel Processing Platform Vendor: Advanced Micro Devices, Inc. Platform Extensions: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices Platform Name: AMD Accelerated Parallel Processing ERROR: clGetDeviceIDs(-1)
Asides testing with Blender still doesn't detect GPU, that's right as now I'm having a problem with device not found.
I'm further investigating ...
Problem solved although performance is not good. See my answer of this question below.