Radeon RX Vega M GL not recognized on Linux #68009

Closed
opened 2019-07-31 17:13:19 +02:00 by Rémi Verschelde · 8 comments

System Information
Operating system: Mageia 7 x86_64 (Linux)
Graphics card: Intel HD Graphics 630 + discrete AMD Radeon RX Vega M GL

Blender Version
Broken: 2.80 (release) and 2.81-5359b7a03307 (2019-07-30)
Worked: not tested

Short description of error
My HP Spectre x360 laptop has an integrated Intel HD Graphics 630 processor, as well as a discrete AMD Radeon RX Vega M GL.
I use the open source Mesa 19.1.3 driver for both of them, with kernel/amdgpu 5.1.20 for the latter.

To use the discrete GPU, I use the DRI_PRIME=1 environment variable.
Blender then throws this warning in the terminal:

Warning: Could not find a matching GPU name. Things may not behave as expected.
Detected OpenGL configuration:
Vendor: X.Org
Renderer: AMD VEGAM (DRM 3.30.0, 5.1.20-desktop-2.mga7, LLVM 8.0.0)

System info: system-info.txt

While the above file shows that the OpenCL capabilities of the AMD GPU seem fine (confirmed by opencl), it is not listed as recognized in Edit > Settings > System.

Exact steps for others to reproduce the error

  • Start Blender 2.80 with DRI_PRIME=1 ./blender on a system with AMD Radeon RX Vega M GL.
**System Information** Operating system: Mageia 7 x86_64 (Linux) Graphics card: Intel HD Graphics 630 + discrete AMD Radeon RX Vega M GL **Blender Version** Broken: 2.80 (release) and 2.81-5359b7a03307 (2019-07-30) Worked: not tested **Short description of error** My HP Spectre x360 laptop has an integrated Intel HD Graphics 630 processor, as well as a discrete AMD Radeon RX Vega M GL. I use the open source Mesa 19.1.3 driver for both of them, with kernel/amdgpu 5.1.20 for the latter. To use the discrete GPU, I use the `DRI_PRIME=1` environment variable. Blender then throws this warning in the terminal: ``` Warning: Could not find a matching GPU name. Things may not behave as expected. Detected OpenGL configuration: Vendor: X.Org Renderer: AMD VEGAM (DRM 3.30.0, 5.1.20-desktop-2.mga7, LLVM 8.0.0) ``` System info: [system-info.txt](https://archive.blender.org/developer/F7639795/system-info.txt) While the above file shows that the OpenCL capabilities of the AMD GPU seem fine (confirmed by `opencl`), it is not listed as recognized in Edit > Settings > System. **Exact steps for others to reproduce the error** - Start Blender 2.80 with `DRI_PRIME=1 ./blender` on a system with AMD Radeon RX Vega M GL.

Added subscriber: @akien

Added subscriber: @akien

I found that this might be related to https://developer.blender.org/D2171 since my AMD GPU does use Mesa's Clover OpenCL implementation:

$ ./clinfo --list
Platform #0: Clover
 `-- Device #0: AMD VEGAM (DRM 3.30.0, 5.1.20-desktop-2.mga7, LLVM 8.0.0)
Platform #1: Intel(R) OpenCL HD Graphics
 `-- Device #0: Intel(R) Gen9 HD Graphics NEO
I found that this might be related to https://developer.blender.org/D2171 since my AMD GPU does use Mesa's Clover OpenCL implementation: ``` $ ./clinfo --list Platform #0: Clover `-- Device #0: AMD VEGAM (DRM 3.30.0, 5.1.20-desktop-2.mga7, LLVM 8.0.0) Platform #1: Intel(R) OpenCL HD Graphics `-- Device #0: Intel(R) Gen9 HD Graphics NEO ```

Added subscriber: @Memento

Added subscriber: @Memento

While the above file shows that the OpenCL capabilities of the AMD GPU seem fine (confirmed by opencl), it is not listed as recognized in Edit > Settings > System.

For the reference, D5392 does not fix that.

OpenCL capabilities are checked in 7c5838cfd6:/intern/cycles/device/opencl/opencl_util.cpp#l731 and currently the only supported devices seem to have to match AMD Accelerated Parallel Processing (I assume it's the platform name on Windows?), which my device doesn't match (AMD VEGAM (DRM 3.30.0, 5.1.20-desktop-2.mga7, LLVM 8.0.0)).

That being said, there might be a good reason for it :)

I brute-forced support for my card with:

diff --git a/intern/cycles/device/opencl/opencl.h b/intern/cycles/device/opencl/opencl.h
index 82b961b8de7..04f07f30365 100644
--- a/intern/cycles/device/opencl/opencl.h
+++ b/intern/cycles/device/opencl/opencl.h
@@ -90,7 +90,7 @@ class OpenCLInfo {
   static bool device_version_check(cl_device_id device, string *error = NULL);
   static string get_hardware_id(const string &platform_name, cl_device_id device_id);
   static void get_usable_devices(vector<OpenCLPlatformDevice> *usable_devices,
-                                 bool force_all = false);
+                                 bool force_all = true);
 
   /* **Some handy shortcuts to low level cl*GetInfo() functions.** */
 

and it then shows up as a possible OpenCL platform:

I0801 12:04:15.703794 22404 device_opencl.cpp:48] CLEW initialization succeeded.
I0801 12:04:17.453339 22404 opencl_util.cpp:899] Enumerating devices for platform Clover.
I0801 12:04:17.453392 22404 opencl_util.cpp:937] Adding new device AMD VEGAM (DRM 3.30.0, 5.1.20-desktop-2.mga7, LLVM 8.0.0).

But attempting a Cycles render of default cube with this card leads to various errors which point to an OpenCL version mismatch?

OpenCL build failed with error CL_BUILD_PROGRAM_FAILURE, errors in console.
OpenCL program split_bundle build output: source/kernel/kernel_compat_opencl.h:155:9: warning: 'NULL' macro redefined
/usr/include/clc/clcmacros.h:12:9: note: previous definition is here
source/kernel/svm/svm_math_util.h:120:1: error: OpenCL C version 1.1 does not support the 'static' storage class specifier
source/kernel/kernel_compat_opencl.h:39:29: note: expanded from macro 'ccl_static_constant'
source/kernel/svm/svm_math_util.h:129:1: error: OpenCL C version 1.1 does not support the 'static' storage class specifier
source/kernel/kernel_compat_opencl.h:39:29: note: expanded from macro 'ccl_static_constant'
source/kernel/svm/svm_math_util.h:138:1: error: OpenCL C version 1.1 does not support the 'static' storage class specifier
source/kernel/kernel_compat_opencl.h:39:29: note: expanded from macro 'ccl_static_constant'
source/kernel/svm/svm_wavelength.h:43:1: error: OpenCL C version 1.1 does not support the 'static' storage class specifier
source/kernel/kernel_compat_opencl.h:39:29: note: expanded from macro 'ccl_static_constant'

I0801 11:56:51.540627 12555 opencl_util.cpp:297] OpenCL program split_bundle not found in cache.
I0801 11:56:51.592937 12555 opencl_util.cpp:297] OpenCL program split_bundle not found on disk.
Split kernel error: failed to load kernel_path_init
I0801 11:56:51.593288 12519 blender_session.cpp:585] Total render time: 3.27015
I0801 11:56:51.593300 12519 blender_session.cpp:586] Render time (without synchronization): -2.28938
I0801 11:56:51.593897 12519 util_task.cpp:347] De-initializing thread pool of task scheduler.
Error: Split kernel error: failed to load kernel_path_init
> While the above file shows that the OpenCL capabilities of the AMD GPU seem fine (confirmed by `opencl`), it is not listed as recognized in Edit > Settings > System. For the reference, [D5392](https://archive.blender.org/developer/D5392) does not fix that. OpenCL capabilities are checked in https://git.blender.org/gitweb/gitweb.cgi/blender.git/blob/7c5838cfd66a656e3ad422ddbe0f23b31dcff1e3:/intern/cycles/device/opencl/opencl_util.cpp#l731 and currently the only supported devices seem to have to match `AMD Accelerated Parallel Processing` (I assume it's the platform name on Windows?), which my device doesn't match (`AMD VEGAM (DRM 3.30.0, 5.1.20-desktop-2.mga7, LLVM 8.0.0)`). That being said, there might be a good reason for it :) I brute-forced support for my card with: ``` diff --git a/intern/cycles/device/opencl/opencl.h b/intern/cycles/device/opencl/opencl.h index 82b961b8de7..04f07f30365 100644 --- a/intern/cycles/device/opencl/opencl.h +++ b/intern/cycles/device/opencl/opencl.h @@ -90,7 +90,7 @@ class OpenCLInfo { static bool device_version_check(cl_device_id device, string *error = NULL); static string get_hardware_id(const string &platform_name, cl_device_id device_id); static void get_usable_devices(vector<OpenCLPlatformDevice> *usable_devices, - bool force_all = false); + bool force_all = true); /* **Some handy shortcuts to low level cl*GetInfo() functions.** */ ``` and it then shows up as a possible OpenCL platform: ``` I0801 12:04:15.703794 22404 device_opencl.cpp:48] CLEW initialization succeeded. I0801 12:04:17.453339 22404 opencl_util.cpp:899] Enumerating devices for platform Clover. I0801 12:04:17.453392 22404 opencl_util.cpp:937] Adding new device AMD VEGAM (DRM 3.30.0, 5.1.20-desktop-2.mga7, LLVM 8.0.0). ``` But attempting a Cycles render of default cube with this card leads to various errors which point to an OpenCL version mismatch? ``` OpenCL build failed with error CL_BUILD_PROGRAM_FAILURE, errors in console. OpenCL program split_bundle build output: source/kernel/kernel_compat_opencl.h:155:9: warning: 'NULL' macro redefined /usr/include/clc/clcmacros.h:12:9: note: previous definition is here source/kernel/svm/svm_math_util.h:120:1: error: OpenCL C version 1.1 does not support the 'static' storage class specifier source/kernel/kernel_compat_opencl.h:39:29: note: expanded from macro 'ccl_static_constant' source/kernel/svm/svm_math_util.h:129:1: error: OpenCL C version 1.1 does not support the 'static' storage class specifier source/kernel/kernel_compat_opencl.h:39:29: note: expanded from macro 'ccl_static_constant' source/kernel/svm/svm_math_util.h:138:1: error: OpenCL C version 1.1 does not support the 'static' storage class specifier source/kernel/kernel_compat_opencl.h:39:29: note: expanded from macro 'ccl_static_constant' source/kernel/svm/svm_wavelength.h:43:1: error: OpenCL C version 1.1 does not support the 'static' storage class specifier source/kernel/kernel_compat_opencl.h:39:29: note: expanded from macro 'ccl_static_constant' I0801 11:56:51.540627 12555 opencl_util.cpp:297] OpenCL program split_bundle not found in cache. I0801 11:56:51.592937 12555 opencl_util.cpp:297] OpenCL program split_bundle not found on disk. Split kernel error: failed to load kernel_path_init I0801 11:56:51.593288 12519 blender_session.cpp:585] Total render time: 3.27015 I0801 11:56:51.593300 12519 blender_session.cpp:586] Render time (without synchronization): -2.28938 I0801 11:56:51.593897 12519 util_task.cpp:347] De-initializing thread pool of task scheduler. Error: Split kernel error: failed to load kernel_path_init ```

Added subscribers: @fclem, @ZedDB

Added subscribers: @fclem, @ZedDB
Clément Foucault was assigned by Sebastian Parborg 2019-08-12 12:00:07 +02:00

@fclem I guess we just add Vega M to the GPU string list?

@akien You will not be able to use Clover with blender. It can not handel Cycles and there for we have disabled it.
The warning message is harmless.

@fclem I guess we just add Vega M to the GPU string list? @akien You will not be able to use Clover with blender. It can not handel Cycles and there for we have disabled it. The warning message is harmless.

This issue was referenced by b57d386dc1

This issue was referenced by b57d386dc1aed3945b9f4a85e37d38ac552a9626

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#68009
No description provided.