Hey, I got a AMD Radeon RX 5700 XT. Back when Blender still used OpenCL, GPU render worked okay, albeit only slightly faster than my Ryzen 7 3700X. Now, I cannot seem to get HIP to work. I’m on Fedora. I installed the latest driver built for RHEL (a relative of Fedora) because they don’t package it for Fedora. I had to hack my way through it, but managed to get HIP libraries installed. I open Blender’s settings and see that my card is not detected. For a sanity check, I built Blender 3.3 from source with HIP explicitly enabled in Cmake. Still, nada. Is AMD gonna fix their trash and maybe move their drivers from RHEL (a dead platform) over to Fedora?
I’ve built Blender-git 3.3 Alpha from AUR with these changes and with proprietary HIP driver and mesa driver, and it works. I’ve rendered a textureless model, but it errors when I try to render a model with materials. It also worked in CPU+GPU mode, and so far Vega 64 is ~2.5 times faster than rendering on 5800X.
Should I report the material render bug somewhere or are you aware of it?
You could try this: mystro256/rocm-hip Copr
There’s also a SIG working on mainlining ROCm: SIGs/HC - Fedora Project Wiki
Be aware that even if you get HIP working in Blender, it’s kinda broken on RDNA1 GPUs right now and will require a driver update to work properly. No ETA though, sadly.
This sucks I tried getting the driver to install for over an hour on Fedora. IG it’s a good thing I couldn’t get it to, because I probably would have been even more disappointed. Do you know of any communication channels with AMD where we might be able to check up on their progress?
I have no idea, sorry. AMD’s bsavery suggested to subscribe to this issue: ⚓ T97591 Cycles HIP error with image textures on Linux and RDNA1
@TriVoxel and @wsippel , the driver issue for RDNA1 GPUs on Linux has been fixed, however it has not been released to the public (at least that I know of). You can find a comment from an AMD employee about it here: 2022-06-21 Render & Cycles Meeting - #2 by bsavery
Is there any ETA on working HIP render with materials on Vega? Being able to render plain meshes is a start, but when will it be fully supported?
Supposedly this patch when used in combination with a newer HIP SDK will fix issues with Vega. However I do no know the time line on the patch being merged with master and the new HIP SDK becoming publicly available.
I have no idea if the fix for this Vega problem will be in next ROCm release, but the repos are very active recently:
I assume that version 5.2 is coming rather soon.
On the Debian side rocm-hipamd package got ITP (Intent to Package) status and might land in experimental soon too:
The latest Blender 3.3 daily builds now have support for Vega on Windows on Linux.
I don’t think it’s been fixed. Just tried with ROCm 5.2, which was released a few hours ago, and it still crashes.
EDIT: Unless the bug is in the kernel driver, but bsavery never specified. I don’t use the kernel driver from AMD as I’d prefer not to mess with DKMS.
Still can’t render on Linux with materials using mesa driver, proprietary amd hip stack and Vega 64.
Invalid value in hipTexObjectCreate(&cmem->texobject, &resDesc, &texDesc, __null) (intern/cycles/device/hip/device_impl.cpp:1099)
Could you try the Junk Shop scene? Would be interesting to know if Vega runs into the same issue as RDNA1 cards: Art Gallery — Blender Cloud
I did some tests and while it is working without problems, it is slower than CPU on some cases. GPU seems to run better on less complex scenes.
r7 5800x, vega 64, win10
3.3a c0e453233132 2022-06-28
junk shop 1920x1080
128 samples
noise threshold: 0.01
tile size: 2048
cpu: 2:34
gpu: 6:48
cpu +gpu: 3:23
tile size: 512
cpu: 2:23
gpu: 3:04
cpu +gpu: 3:08
tile size: 256
cpu: 2:27
gpu: 3:21
cpu +gpu: 3:42
tile size: 64
cpu: 2:59
gpu: 8:56
cpu +gpu: 7:00
Shouldn’t CPU+GPU be always faster than GPU only?
Blender-git crashed:
:0:rocdevice.cpp :2615: 1454168181 us: 164579: [tid:0x7f0275dff000] Device::callbackQueue aborting with error : HSA_STATUS_ERROR_ILLEGAL_INSTRUCTION: The agent attempted to execute an illegal shader instruction. code: 0x2a
Aborted (core dumped)
The scheduler that distributes work between the GPU and CPU can sometimes make bad decisions and as such it can actually reduce performance. This is not an issue with HIP, but an issue with Cycles-X as it can be experience with CUDA, OptiX, HIP, Metal, and OneAPI with the respective GPUs.
Work is underway to try and resolve this issue. But at the moment this is what it is.
If your numbers are typical for Vega lets hope AMD has plans to improve performance by 500-1000%. If your interested in broad comparisons below is junkshop with HIP RDNA2.
OS: Arch Linux, CPU 5900x, GPU RX6800, Blender 3.2.0, HIP 22.10.3.50103-1
- Default (2000x1000, 50 samples, de-noising)
CPU: 00:37.01
GPU: 00:16.14
CPU+GPU: 00:18.04 - Your Settings (1920x1080, 128 samples, 0.01 noise threshold, no de-noise, 2048 tile)
CPU: 01:21.19
GPU: 00:25.66
CPU+GPU: 00:25.60
Writing code to correctly distribute stuff between 2 vastly different devices is very hard. So it’ll be a while I guess.
Can you do OpenCL GPU test with the same scene for comparison?
It might be interesting to see how big is this performance regression compared to old GPU backend.
I wonder if a workaround that allows users to manually distribute work could be possible. Like setting 70% work fo cpu and 30% gpu.
This scene in particular is very heavy on vega but i think it might have something to do with VRAM. I see VRAM maxing out on task manager almost at the same time RAM usage starts growing. Could you check how much VRAM this scene uses on your setup?
In scenes like BMW, gpu is twice as fast and doesn’t max out VRAM.
HIP can give better results than OpenCL, but I think that junk shop isn’t the best scene to show it.
I will test other scenes in the next days.
junk shop, 2.93.9 LTS
compiling kernels: ~1:30
auto tiles: on
cpu: 2:32
gpu: 4:28
cpu +gpu: 2:58
tile: 2048
cpu: DNF, I gave up after 15 minutes
gpu: 4:29
cpu +gpu: 4:40
tile: 512
cpu: 4:42
gpu: 4:41
cpu +gpu: 3:13
tile: 256
cpu: 2:54
gpu: 4:17
cpu +gpu: 3:01
tile: 64
cpu: 2:37
gpu: 4:29
cpu +gpu: 2:59