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!

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.