Cycles AMD HIP device feedback

@Alaska @Nik, I should clarify my concern is support in a timely manner, it is over 5 months since 3.0 released.

Current AMD GPU support for Blender 3.0+

Generation / Feature Windows (HIP) Linux (HIP) MAC (Metal)
Polaris X X O
Vega X X O
RDNA O X O
RDNA2 O N O
Mobile variants (any generation) X X O
Hardware Ray Tracing (RDNA2 Only) X X X

X = no support
N = nightly support through alpha / beta
O = Official support

4 Likes

The addition of AMD ray-tracing in Cycles has a long history. Its important to remember those that purchased RDNA2 near release with ā€œ(Patch to be public soon)ā€ on T82557 have been let down.

Put yourself in their shoes, would you consider 18+ months or after the release of RDNA3 ā€œsoonā€ in late 2020?

2 Likes

HIP on Linux has been enabled in the daily builds on March the 16th, it has been switched on by differential D14360. The HIP SDK for Windows so far hasnā€™t been publicly available for Windows, but it is available for Linux. It needs the hipcc compiler, but this can be installed from the ROCm package. Because of this, itā€™s possible to compile Blender on Linux. This version will recognise the GPU, and try to run HIP on it. Unfortunately it looks like there are issues on Linux as well. AMD has just released ROCm 5.1.2, but this hasnā€™t solved the issues as far as I can see.

Support for Linux has been committed by Brecht Van Lommel on April the 22th: rB179100c02126: Cycles: enable AMD RDNA GPU support on Linux.

1 Like

Cool, but:

This enables building of HIP binaries for AMD RDNA and RDNA2 GPUs.

Why isnā€™t Vega enabled on Linux?

Because Vega support in Cycles HIP is currently too buggy at the moment to be officially enabled in the Windows or Linux builds of Cycles.

Also during the testing of the enabling of Cycles HIP on Linux, some issues were experienced related to Vega. So Vega support was disabled pre-maturely for Linux Cycles HIP to ensure Cycles HIP was enabled on Linux in a usable form for some users in a timely manner.

Source for Vega issues on Linux:
https://developer.blender.org/D14360#389721
https://developer.blender.org/D14360#395747

Well, ROCM 5.1.3 is out for Arch, but obviously I canā€™t test it since Vega is disabled on Linux.

Just tested 5.1.3 on classroom with a RX6800, similar performance to 5.1.2.

Might get some insights on Vega support at the fortnightly cycles meeting, however May 11th never got posted so who knows if the upcoming May 25th will be posted. Pretty poor communication overall.

@bigmad and @L_S are either of you able to make an official bug report on the Blender bug tracker about the performance loss with Resizable Bar?

5.1.3 did nothing to fix the hipTexObjectCreate crash on RDNA1 GPUs, at least. Looking at Github, I donā€™t know if HIP was even updated - there have been no changes to the 5.1.x branch in a month.

When you compile the current code, you can enable Vega on Linux by changing just 2 lines. Commit rBc46e58817cd7 has been reverted later because Vega is crashing when using HIP, but you can redo these changes.
You need to install ROCm with use cases hip, and hiplibsdk, but this does contain everything thatā€™s needed to support running HIP on Linux. Itā€™s working, you get the HIP panel in the System Preferences, and it will list the Vega 64. When you then render a scene, it will start, and it will invoke hippc, but this will unfortunately throws an error a couple of times, and the kernel will fail.
However, I understand this may well be fixed by a future version of ROCm. I had high hopes for 5.1.2, but the same error still is thrown. I havenā€™t tried 5.1.3 yet, but I somehow doubt it will fix it right now. Maybe ROCm 5.2.0?

For my Linux setup the difference was about 1%, I do not believe it is worthy to annoy the devs with a bug at this stage. Feel free to open one for Windows however.

So Iā€™ve applied those changes back and tried to build with Rocm 5.1.3 and Vega enabled, and it fails with these errors:

src/blender/intern/cycles/kernel/../kernel/device/gpu/image.h:34:18: note: candidate function not viable: call to __device__ function from __host__ function
ccl_device float cubic_g0(float a)
                 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated when compiling for gfx1010.

It doesnā€™t fail at building for Vega, it fails in general for any arch.

UPD: I was building the latest alpha from git source, and in fact it fails to build without Vega enabled, so this may be some unrelated bug:

blender-git 3.3.r115256.gdc6fe73e707-1

Iā€™ve installed ROCm 5.1.3 today, updated Blender, and then applied the patch to add Vega to the list of HIP Devices. Iā€™ve done this a number of times, and I havenā€™t had issues compiling the code so far, and had in fact no issues today. Iā€™ve run Debian, but have mainly been using Ubuntu.

Have you compiled the latest alpha Blender from git or the stable one?

Iā€™ve been compiling the code cloned from the Blender git according to the building instructions on the Blender Wiki for Ubuntu found here. So far the whole process of updating and compiling the code has gone remarkably smoothly.

All that needs to be done to add Vega is to add gfx900 to line 448 of CMakeLists.txt, and to change line 54 of file util.h to return (major >= 9). So far this change has compiled successfully every time.

gfx900 should be added to line 444 of CMakeLists.txt nowadays.

Does anyone know when gfx1035 is going to be added to the cmakelists? Basing it off of this āš™ D13495 Enabling HIP on some tested GPUs . Itā€™s a bit weird that this isnā€™t added yet for 6700s gpu which is RDNA gpu. Another one discussing this āš“ T96397 Cycles HIP rendering does not work with RDNA2 integrated GPU.

Only discrete GPUs are supported at the moment, not integrated GPUs. I donā€™t have a timeline for when they will be supported, or if that will still happen at all.

1 Like

Hello thanks for the reply. Shouldnā€™t the rx 6700s gpu be fine since itā€™s a dedicated graphics card on the new asus g14. The radeon 680m is the integrated gpu of the g14 which I understand not working but the 6700s is one of the switchable dedicated amd gpu that can be used by the computer similar to how nvidia has optimus since it has two graphics cards.

edit: Found out rx 6700s and rx 6800s gpu are gfx1032 but some reviewers had issues with hip cycles involving a kernel error. Wonder if this is related to the igpu 680m in the laptop they tested. Anyways just wanted to add thank you the blender software is awesome with awesome developer and I appreciate the work you guys do :smiley: