Skip to main content

Running ROCm on AMD Raven Ridge Mobile

The HP Envy x360 Convertible powered with Ryzen 2500U turned out an impressive laptop for Fedora 29 despite some issues like lack of accelerometer driver for Linux kernel and some ACPI related problems seemly affecting majority of HP laptops.

AMD recently released ROCm 2.0 enabling the support of Raven Ridge Mobile for the first time. The installation has to be clean (remove beignet and pocl)  and requires additional dependency not found on Fedora repository, pth located on COPR. Once completed and rebooted, rocminfo should runs as follow:

/opt/rocm/bin/rocminfo 
=====================    
HSA System Attributes    
=====================    
Runtime Version:         1.1
System Timestamp Freq.:  1000.000000MHz
Sig. Max Wait Duration:  18446744073709551615 (number of timestamp)
Machine Model:           LARGE                              
System Endianness:       LITTLE                             

==========               
HSA Agents               
==========               
*******                  
Agent 1                  
*******                  
  Name:                    AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx
  Vendor Name:             CPU                                
  Feature:                 None specified                     
  Profile:                 FULL_PROFILE                       
  Float Round Mode:        NEAR                               
  Max Queue Number:        0                                  
  Queue Min Size:          0                                  
  Queue Max Size:          0                                  
  Queue Type:              MULTI                              
  Node:                    0                                  
  Device Type:             CPU                                
  Cache Info:              
    L1:                      32KB                               
  Chip ID:                 5597                               
  Cacheline Size:          64                                 
  Max Clock Frequency (MHz):2000                               
  BDFID:                   768                                
  Compute Unit:            8                                  
  Features:                None
  Pool Info:               
    Pool 1                   
      Segment:                 GLOBAL; FLAGS: KERNARG, FINE GRAINED
      Size:                    16776832KB                         
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Alignment:         4KB                                
      Acessible by all:        TRUE                               
  ISA Info:                
    N/A                      
*******                  
Agent 2                  
*******                  
  Name:                    gfx902                             
  Vendor Name:             AMD                                
  Feature:                 KERNEL_DISPATCH                    
  Profile:                 FULL_PROFILE                       
  Float Round Mode:        NEAR                               
  Max Queue Number:        128                                
  Queue Min Size:          4096                               
  Queue Max Size:          131072                             
  Queue Type:              MULTI                              
  Node:                    0                                  
  Device Type:             GPU                                
  Cache Info:              
    L1:                      16KB                               
  Chip ID:                 5597                               
  Cacheline Size:          64                                 
  Max Clock Frequency (MHz):1100                               
  BDFID:                   768                                
  Compute Unit:            11                                 
  Features:                KERNEL_DISPATCH 
  Fast F16 Operation:      FALSE                              
  Wavefront Size:          64                                 
  Workgroup Max Size:      1024                               
  Workgroup Max Size Per Dimension:
    Dim[0]:                  67109888                           
    Dim[1]:                  50332672                           
    Dim[2]:                  0                                  
  Grid Max Size:           4294967295                         
  Waves Per CU:            160                                
  Max Work-item Per CU:    10240                              
  Grid Max Size per Dimension:
    Dim[0]:                  4294967295                         
    Dim[1]:                  4294967295                         
    Dim[2]:                  4294967295                         
  Max number Of fbarriers Per Workgroup:32                                 
  Pool Info:               
    Pool 1                   
      Segment:                 GROUP                              
      Size:                    64KB                               
      Allocatable:             FALSE                              
      Alloc Granule:           0KB                                
      Alloc Alignment:         0KB                                
      Acessible by all:        FALSE                              
  ISA Info:                
    ISA 1                    
      Name:                    amdgcn-amd-amdhsa--gfx902+xnack    
      Machine Models:          HSA_MACHINE_MODEL_LARGE            
      Profiles:                HSA_PROFILE_BASE                   
      Default Rounding Mode:   NEAR                               
      Default Rounding Mode:   NEAR                               
      Fast f16:                TRUE                               
      Workgroup Max Dimension: 
        Dim[0]:                  67109888                           
        Dim[1]:                  1024                               
        Dim[2]:                  16777217                           
      Workgroup Max Size:      1024                               
      Grid Max Dimension:      
        x                        4294967295                         
        y                        4294967295                         
        z                        4294967295                         
      Grid Max Size:           4294967295                         
      FBarrier Max Size:       32                                 
*** Done ***

Interesting attention is the number of compute units for Vega8 (gfx902): 11 instead of 8 suggesting that Vega8 is nothing more than a cut-down Vega11.

ROCm OpenCL is also installed as seen below

/opt/rocm/opencl/bin/x86_64/clinfo 
Number of platforms:                 1
  Platform Profile:                 FULL_PROFILE
  Platform Version:                 OpenCL 2.1 AMD-APP (2783.0)
  Platform Name:                 AMD Accelerated Parallel Processing
  Platform Vendor:                 Advanced Micro Devices, Inc.
  Platform Extensions:                 cl_khr_icd cl_amd_event_callback cl_amd_offline_devices 


  Platform Name:                 AMD Accelerated Parallel Processing
Number of devices:                 1
  Device Type:                     CL_DEVICE_TYPE_GPU
  Vendor ID:                     1002h
  Board name:                     AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx
  Device Topology:                 PCI[ B#3, D#0, F#0 ]
  Max compute units:                 11
  Max work items dimensions:             3
    Max work items[0]:                 1024
    Max work items[1]:                 1024
    Max work items[2]:                 1024
  Max work group size:                 256
  Preferred vector width char:             4
  Preferred vector width short:             2
  Preferred vector width int:             1
  Preferred vector width long:             1
  Preferred vector width float:             1
  Preferred vector width double:         1
  Native vector width char:             4
  Native vector width short:             2
  Native vector width int:             1
  Native vector width long:             1
  Native vector width float:             1
  Native vector width double:             1
  Max clock frequency:                 1100Mhz
  Address bits:                     64
  Max memory allocation:             6256727654
  Image support:                 Yes
  Max number of images read arguments:         128
  Max number of images write arguments:         8
  Max image 2D width:                 16384
  Max image 2D height:                 16384
  Max image 3D width:                 2048
  Max image 3D height:                 2048
  Max image 3D depth:                 2048
  Max samplers within kernel:             5597
  Max size of kernel argument:             1024
  Alignment (bits) of base address:         1024
  Minimum alignment (bytes) for any datatype:     128
  Single precision floating point capability
    Denorms:                     Yes
    Quiet NaNs:                     Yes
    Round to nearest even:             Yes
    Round to zero:                 Yes
    Round to +ve and infinity:             Yes
    IEEE754-2008 fused multiply-add:         Yes
  Cache type:                     Read/Write
  Cache line size:                 64
  Cache size:                     16384
  Global memory size:                 7360856064
  Constant buffer size:                 6256727654
  Max number of constant args:             8
  Local memory type:                 Scratchpad
  Local memory size:                 65536
  Max pipe arguments:                 16
  Max pipe active reservations:             16
  Max pipe packet size:                 1961760358
  Max global variable size:             6256727654
  Max global variable preferred total size:     7360856064
  Max read/write image args:             64
  Max on device events:                 1024
  Queue on device max size:             8388608
  Max on device queues:                 1
  Queue on device preferred size:         262144
  SVM capabilities:                 
    Coarse grain buffer:             Yes
    Fine grain buffer:                 Yes
    Fine grain system:                 Yes
    Atomics:                     No
  Preferred platform atomic alignment:         0
  Preferred global atomic alignment:         0
  Preferred local atomic alignment:         0
  Kernel Preferred work group size multiple:     64
  Error correction support:             0
  Unified memory for Host and Device:         1
  Profiling timer resolution:             1
  Device endianess:                 Little
  Available:                     Yes
  Compiler available:                 Yes
  Execution capabilities:                 
    Execute OpenCL kernels:             Yes
    Execute native function:             No
  Queue on Host properties:                 
    Out-of-Order:                 No
    Profiling :                     Yes
  Queue on Device properties:                 
    Out-of-Order:                 Yes
    Profiling :                     Yes
  Platform ID:                     0x7f3b9d3b9ed0
  Name:                         gfx902-xnack
  Vendor:                     Advanced Micro Devices, Inc.
  Device OpenCL C version:             OpenCL C 2.0 
  Driver version:                 2783.0 (HSA1.1,LC)
  Profile:                     FULL_PROFILE
  Version:                     OpenCL 1.2 
  Extensions:                     cl_khr_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_media_ops cl_amd_media_ops2 cl_khr_subgroups cl_khr_depth_images cl_amd_copy_buffer_p2p cl_amd_assembly_program 

Notice again the number of compute units.

In term of applications, Blender will detect and use ROCm OpenCL. Unfortunately, the use of GPU Compute is very slow for rendering. Darktable, Gimp and Libre Office are able to use it as well.


Comments

Popular posts from this blog

GNOME extension Screen Autorotate available

 While waiting for a bug fix affecting majority of 2-in-1 laptops running on GNOME Wayland session, gnome-shell-extension-screen-autorotate is now available in Fedora repository and EPEL 9 . Give a try on your device Possibly this extension will get added on the incoming Fedora Design Suite 39 as default for the owners of convertible laptops.

Wayland support coming to Blender for Fedora 37

As mentioned on Phoronix' article ,  Blender received Wayland support on Blender 3.3.1 for Fedora 37 as an update in preparation of the incoming version 3.4 next month. The update has a dependency of libdecor , a client-side decoration for Wayland in addition of DBus for the cursor theme. Currently, the window decoration may have yet to use the system theme but remains functional as intended.

Testing Design Suite on Asus X550ZE

I recently bought an ASUS X550ZE to replace the venerable Sony VAIO N250E laptop. The reason of choosing an AMD powered laptop is for long term support i.e. the use of Vulkan API in future AMD GPU driver. In summary, here is the ASUS X550ZE specification taken from ASUS website : Processor AMD® APU A10-7400P /A8-7200P/FX-7600P Processor Chipset AMD A76M FCH Memory DDR3L 1600 MHz SDRAM, 8 GB Display 15.6" 16:9 /Full HD (1920x1080) Graphic AMD Radeon® R5 M230 + Radeon® R7 M265 DX Dual Graphics with 2GB DDR3 VRAM Built-in A10-7400P Storage 2.5" 9.5mm SATA 1TB 5400/7200 RPM Optical Drive Super-Multi DVD Card Reader 2 -in-1 card reader ( SD/ SDHC/ MMC) Camera VGA Web Camera Networking Integrated 802.11 b/g/n Built-in Bluetooth™ V4.0 (Optional) 10/100/1000/Gigabits Base T Interface 1 x COMBO audio jack 1 x VGA port/Mini D-sub 15-pin for external monitor 2 x USB 3.0 port(s) 1 x RJ45 LAN Jack for LAN insert 1 x HDMI Audio Built-in