How can I get started with Blender Cycles/HIP Rendering?

As of Blender 3.2, “AMD GPU Rendering for Linux has been enabled.” I’d like to accelerate Cycles rendering with my Radeon RX 5700 XT, but there are several parts that I would like help with.

  1. I need to use the Heterogeneous Interface for Portability (HIP), which is part of ROCm. There are 6 ROCm packages for Fedora. Which one(s) should I install?

  2. The Blender package for Fedora 36 is outdated and does not support AMD GPU rendering. I can think of several ways to install a newer version of Blender, but I would like advice on which to choose:

  3. There’s a serious known bug involving the use of image textures; I could probably work around this by either avoiding image textures entirely or double-checking the resolution of every image texture I wnat to use.

I just found that Blender 3.2.1 has been added to the Fedora 36 updates-testing repository, so I think I’ll go with that version for now.

I went ahead and installed Blender 3.2.1 from updates-testing, along with all 6 ROCm packages. I rebooted and checked for my GPU in blender under Edit > Preferences > Cycles Render Devices > HIP. However, Blender reported that “No compatible GPUs” were found:

I ran rocminfo, which produced the following output:

ROCk module is loaded
=====================    
HSA System Attributes    
=====================    
Runtime Version:         1.1
System Timestamp Freq.:  1000.000000MHz
Sig. Max Wait Duration:  18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)
Machine Model:           LARGE                              
System Endianness:       LITTLE                             

==========               
HSA Agents               
==========               
*******                  
Agent 1                  
*******                  
  Name:                    AMD Ryzen 7 5800X 8-Core Processor 
  Uuid:                    CPU-XX                             
  Marketing Name:          AMD Ryzen 7 5800X 8-Core Processor 
  Vendor Name:             CPU                                
  Feature:                 None specified                     
  Profile:                 FULL_PROFILE                       
  Float Round Mode:        NEAR                               
  Max Queue Number:        0(0x0)                             
  Queue Min Size:          0(0x0)                             
  Queue Max Size:          0(0x0)                             
  Queue Type:              MULTI                              
  Node:                    0                                  
  Device Type:             CPU                                
  Cache Info:              
    L1:                      32768(0x8000) KB                   
  Chip ID:                 0(0x0)                             
  Cacheline Size:          64(0x40)                           
  Max Clock Freq. (MHz):   3800                               
  BDFID:                   0                                  
  Internal Node ID:        0                                  
  Compute Unit:            16                                 
  SIMDs per CU:            0                                  
  Shader Engines:          0                                  
  Shader Arrs. per Eng.:   0                                  
  WatchPts on Addr. Ranges:1                                  
  Features:                None
  Pool Info:               
    Pool 1                   
      Segment:                 GLOBAL; FLAGS: FINE GRAINED        
      Size:                    32676344(0x1f299f8) KB             
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Alignment:         4KB                                
      Accessible by all:       TRUE                               
    Pool 2                   
      Segment:                 GLOBAL; FLAGS: KERNARG, FINE GRAINED
      Size:                    32676344(0x1f299f8) KB             
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Alignment:         4KB                                
      Accessible by all:       TRUE                               
    Pool 3                   
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED      
      Size:                    32676344(0x1f299f8) KB             
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Alignment:         4KB                                
      Accessible by all:       TRUE                               
  ISA Info:                
*******                  
Agent 2                  
*******                  
  Name:                    gfx1010                            
  Uuid:                    GPU-XX                             
  Marketing Name:          AMD Radeon RX 5700 XT              
  Vendor Name:             AMD                                
  Feature:                 KERNEL_DISPATCH                    
  Profile:                 BASE_PROFILE                       
  Float Round Mode:        NEAR                               
  Max Queue Number:        128(0x80)                          
  Queue Min Size:          64(0x40)                           
  Queue Max Size:          131072(0x20000)                    
  Queue Type:              MULTI                              
  Node:                    1                                  
  Device Type:             GPU                                
  Cache Info:              
    L1:                      16(0x10) KB                        
    L2:                      4096(0x1000) KB                    
  Chip ID:                 29471(0x731f)                      
  Cacheline Size:          64(0x40)                           
  Max Clock Freq. (MHz):   2100                               
  BDFID:                   2048                               
  Internal Node ID:        1                                  
  Compute Unit:            40                                 
  SIMDs per CU:            2                                  
  Shader Engines:          4                                  
  Shader Arrs. per Eng.:   2                                  
  WatchPts on Addr. Ranges:4                                  
  Features:                KERNEL_DISPATCH 
  Fast F16 Operation:      TRUE                               
  Wavefront Size:          32(0x20)                           
  Workgroup Max Size:      1024(0x400)                        
  Workgroup Max Size per Dimension:
    x                        1024(0x400)                        
    y                        1024(0x400)                        
    z                        1024(0x400)                        
  Max Waves Per CU:        40(0x28)                           
  Max Work-item Per CU:    1280(0x500)                        
  Grid Max Size:           4294967295(0xffffffff)             
  Grid Max Size per Dimension:
    x                        4294967295(0xffffffff)             
    y                        4294967295(0xffffffff)             
    z                        4294967295(0xffffffff)             
  Max fbarriers/Workgrp:   32                                 
  Pool Info:               
    Pool 1                   
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED      
      Size:                    8372224(0x7fc000) KB               
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Alignment:         4KB                                
      Accessible by all:       FALSE                              
    Pool 2                   
      Segment:                 GROUP                              
      Size:                    64(0x40) KB                        
      Allocatable:             FALSE                              
      Alloc Granule:           0KB                                
      Alloc Alignment:         0KB                                
      Accessible by all:       FALSE                              
  ISA Info:                
    ISA 1                    
      Name:                    amdgcn-amd-amdhsa--gfx1010:xnack-  
      Machine Models:          HSA_MACHINE_MODEL_LARGE            
      Profiles:                HSA_PROFILE_BASE                   
      Default Rounding Mode:   NEAR                               
      Default Rounding Mode:   NEAR                               
      Fast f16:                TRUE                               
      Workgroup Max Size:      1024(0x400)                        
      Workgroup Max Size per Dimension:
        x                        1024(0x400)                        
        y                        1024(0x400)                        
        z                        1024(0x400)                        
      Grid Max Size:           4294967295(0xffffffff)             
      Grid Max Size per Dimension:
        x                        4294967295(0xffffffff)             
        y                        4294967295(0xffffffff)             
        z                        4294967295(0xffffffff)             
      FBarrier Max Size:       32

The only commercial support of Blender software widely used in industry is buy Canonical that as something to do with Ubuntu, ask a quote, any platform is supported …

I don’t see my question as being strictly about Blender; it involves the ROCm compute stack and the corresponding Fedora packages. Should the title be reworded?

Hey there! I wanted this exact same thing! I had to do a little work and research to get there, but Blender now uses HIP on my Fedora 36 install. Here’s a post I wrote about the process. Hope it helps!

1 Like

Taking a high level approach … kernel programming model is used in several C++ extension frameworks being HIP, Cuda or DPC++ supported by AMD, NVidia or Intel with enormous stake as thought to be ideal tool for AI neural network. Red Hat/CentOS/Fedora implement SELinux, a National Security Agency program and you find information at Fedora Docs/F36/System Administrator Guide/Kernel, Module and Driver Configuration about signed/tainted kernel modules. NVidia, Google Coral, Intel Altera, AMD Xilinx, … all send you to Ubuntu as liberal with closed source software and Canonical only commercial support of Blender software massively used in industry. You can implement in Fedora, can be complicated, no sure of the pertinence of specific point of view … not Fedora vs Ubuntu but global approach to open source concept.

Thank you for your post! I’d like to give that process a shot, but I’m confused about a few parts of it:

HIP GPU rendering under AMD … doesn’t work without their proprietary OpenCL magic.

Which packages listed in that post are proprietary? According to AMD, amdgpu-install is for installing their All-Open stack.

Also, I was under the impression while that HIP & OpenCL serve similar purposes, neither depends on the other.

Now, DNF told me that amdgpu-core failed to install, and that the Transaction failed, but the other two packages installed successfully which is what’s important!

Would it make more sense to just install the libdrm-amdgpu & libdrm-amdgpu-common packages, then?


On a separate note, Jeremy Newton (mystro256) of AMD has uploaded an experimental rocm-hip package to his copr repository. I haven’t gotten Blender to work with it, though.

1 Like

When DPC++ came out, it targeted heterogeneous environment being CPU, GPU and FPGA with SYCL replacing OpenCL. Works with Altera devices. AMD made noise so opened to them being an open source sort of thing, look up about it. Cuda is specific to NVidia devices, HIP to AMD devices moving from Vivado to Vitis for Xilinx devices. The DPC++ project is fascinating as you program a project on a mix, the compiler choosing where, when, how device by device.
AI is hot topic now using neural networks similar to those used for computer vision. That is where you are cornered between Blender and the rest …

Sorry for the late reply!

On your first point:

Which packages listed in that post are proprietary? According to AMD, amdgpu-install is for installing their All-Open stack.
Also, I was under the impression while that HIP & OpenCL serve similar purposes, neither depends on the other.

You may be better qualified to make those distinctions than I am. It was my impression that the packages were proprietary because they aren’t apart of the regular mesa libraries (again, I’m not an expert!).

As far as the HIP vs OpenCL is concerned, you may be onto something there where the opencl portion of the install is not necessary, but since I was following a guide from Reddit, I thought it best to stick to what got it working for the writer at the time. It’s totally possible that on step 5 that you can omit the opencl portion of the install and just include the hip portion.

This statement makes sense! Call me superstitious, but again I blindly followed the guide from Reddit which I simply regurgitated on the Fedora forum (with links to the original).

I very much hope that this kind of work around isn’t necessary forever (the one I linked to) and that something like what you’ve mentioned here will become a mainstay for us instead!

Let me know if you have any further questions or need more detail!

1 Like

Please also check out this user’s input. They got HIP under Blender to work (the rpm from Fedora’s repo) via a slightly different method. I’ve tested it and found it to be more stable than the method I detailed above. The latest comments discuss the alternate (and more stable in my opinion) approach.

1 Like

Something else … HIP is only compatible with AMD Radeon 6000 series, with Blender probably only high end with sufficient memory. You can install drivers but if incompatible HIP/Blender you will get no message or minimal mention in logs. HIP/Blender is still experimental, AMD trying to catch up on NVidia Grace Hopper hardware architecture.

Thanks for the info!

The latest comments discuss the alternate (and more stable in my opinion) approach.

So, the alternate approach is to first follow u/szooloo’s instructions, then perform the “extra steps” described by @joni999 & summarized by you?


Also, here are the steps I took for my failed attempt to use rocm-hip with Blender:

  1. Enabled Jeremy Newton’s copr repository with his experimental rocm-hip package:
    sudo dnf copr enable mystro256/rocm-hip
    
  2. Added myself to the video group as described in the ROCm documentation
    sudo usermod -a -G video flavonol
    
    … then rebooted to apply the change.
  3. Installed rocm-hip:
    sudo dnf install -y rocm-hip
    
  4. Opened Blender and checked the Preferences menu. Saw the same “No compatible GPUs” message as shown in one of my earlier replies in this thread.
  5. Rebooted & checked again. No visible change in Blender.
  6. Installed rocm-opencl:
    sudo dnf install -y rocm-opencl
    
  7. Rebooted & checked again. No visible change in Blender.

HIP is only compatible with AMD Radeon 6000 series

While only certain CDNA & RDNA2 cards are officially supported by ROCm, others have gotten HIP to (mostly) work with older cards & Blender Cycles. See the image texture bug link at the start of this thread.

Using PNY Quadro RTX 4000, works fine but not a gaming video card … just a calculator specific for programming Cuda, NVidia frameworks and supported by Blender. HIP by AMD is very ambitious similar to DPC++ going to heterogeneous hardware mix including CPU, GPU and FPGA and the screenshot at the beginning of this post shows (error).
You can tweak software all day long but the star is finally compatible hardware/software. Advice is to download AMD software, Blender directly from their respective website, see if it works and come back to DNF packaging after. AMD and Blender give ample information about something utterly new for AMD. The real question is about SYCL replacing OpenCL with Khronos Group …

Okay, I’ve removed all the ROCm packages I previously installed & disabled the rocm-hip copr repository.

After that, I followed u/szooloo’s instructions and encountered the same issues as @joni999. Following @joni999’s instructions allowed me to render the default cube with Device set to GPU Compute.

After testing with another scene, I discovered that rendering performance had not improved when compared to the CPU. However, enabling the “Experimental” Feature Set fixed this!

So, in summary, following first u/szooloo’s instructions, then @joni999’s extra steps, then enabling the Experimental Feature Set and GPU Compute in the Cycles render settings allowed me to use my Radeon RX 5700 XT for rendering with Cycles.

Thank you all very much!

1 Like

Hi there!

Hey that’s me! :smiley:

Glad you got it working! I knew documenting this was the right thing to do :smiley:
It’s weird that it seems to work for other people without doing my workaround.

I have now benchmarked my render times because I was curious if the “Experimental” switch “issue” applies to me as well.

The results may be influenced by something like Cache - but I didn’t use the PC while doing the benchmark.

For the CPU Tests only the CPU was enabled in Blender System Settings and for GPU Tests only the GPU.

My Specs:
AMD RX6900XT
AMD Ryzen 7 5800X



**CPU TESTS:**

CPU Only (Supported && Open Shading Language is OFF ):
01min 44.34sec

CPU Only (Experimental && Open Shading Language is OFF ):
01min 45.05sec

CPU Only (Supported && Open Shading Language is ON ):
02min 21.49sec

CPU Only (Experimental && Open Shading Language is ON ):
02min 19.64sec

=> All of the above CPU cases show the CPU maxed out and the GPU was not used according to CoreCtl.

=> both CPU Renders show almost no activity on the GPU according to CoreCtl



**GPU TESTS:**

GPU Only ("Supported"):
25.16sec

GPU Only ("Experimental"):
25.16sec

=> Both “Supported” and “Experimental” cases above have my GPU maxed out according to CoreCtl

CPU and GPU Enabled in System Settings (Device: "GPU Compute"):
28.09sec

CPU and GPU Enabled in System Settings (Device: "CPU" && Open Shading Language is OFF ):
01min 42.90sec

CPU and GPU Enabled in System Settings (Device: "CPU" && Open Shading Language is ON ):
02min 20.28sec

=> Conclusion: Looks like I dont need the Experimental switch to utilize the GPU and I will switch off my CPU fully.

Best Regards and have fun rendering :slight_smile:

2 Likes

I suspect that the Experimental option is only needed for GPU architectures other than RDNA2. The image texture bug I linked before (which can cause Blender to crash) reportedly affects RDNA1 & Vega, but not RDNA2. I don’t own any RDNA2 or Vega hardware to test this with, though.

Thats’ a completely reasonable assumption so I just tried installing without amdgpu-core:

 [joni@linuxjoni02 Downloads]$ sudo dnf install libdrm-amdgpu-2.4.110.50200-1438747.el9.x86_64.rpm libdrm-amdgpu-common-1.0.0.50200-1438747.el9.noarch.rpm
AMDGPU 22.20 repository                                                                                                                                              38  B/s | 178  B     00:04    
[...]
Error: 
 Problem 1: conflicting requests
  - nothing provides amdgpu-core needed by libdrm-amdgpu-1:2.4.110.50200-1438747.el9.x86_64
 Problem 2: conflicting requests
  - nothing provides amdgpu-core needed by libdrm-amdgpu-common-1.0.0.50200-1438747.el9.noarch
(try to add '--skip-broken' to skip uninstallable packages)

Seems like amdgpu-core ist just included, because we have to trick dnf into installing the other packages which have dependencies to it.

1 Like

I’m unticking the “solution” box because it seems that Blender Cycles still doesn’t consistently use my GPU. I haven’t found a pattern yet.