[Bf-blender-cvs] [c94583cd64b] blender-v3.4-release: Cycles: enable AMD RDNA3 GPUs and upgrade HIP compiler

Sayak Biswas noreply at git.blender.org
Fri Nov 18 13:55:21 CET 2022


Commit: c94583cd64b4effe489c6a0fb73c1c7fa69c9a17
Author: Sayak Biswas
Date:   Thu Nov 17 16:16:41 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rBc94583cd64b4effe489c6a0fb73c1c7fa69c9a17

Cycles: enable AMD RDNA3 GPUs and upgrade HIP compiler

* Enable AMD RDNA3 GPUs
* Fix T100891: performance regression with RDNA2 cards
* Workaround new compiler issue with Vega, by using -O1

Differential Revision: https://developer.blender.org/D16507

===================================================================

M	CMakeLists.txt
M	build_files/config/pipeline_config.yaml
M	intern/cycles/kernel/CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7155c15079e..7a621b859e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -484,7 +484,7 @@ endif()
 if(NOT APPLE)
   option(WITH_CYCLES_DEVICE_HIP        "Enable Cycles AMD HIP support" ON)
   option(WITH_CYCLES_HIP_BINARIES      "Build Cycles AMD HIP binaries" OFF)
-  set(CYCLES_HIP_BINARIES_ARCH gfx900 gfx906 gfx90c gfx902 gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1032 gfx1034 gfx1035 CACHE STRING "AMD HIP architectures to build binaries for")
+  set(CYCLES_HIP_BINARIES_ARCH gfx900 gfx906 gfx90c gfx902 gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1032 gfx1034 gfx1035 gfx1100 gfx1101 gfx1102 CACHE STRING "AMD HIP architectures to build binaries for")
   mark_as_advanced(WITH_CYCLES_DEVICE_HIP)
   mark_as_advanced(CYCLES_HIP_BINARIES_ARCH)
 endif()
diff --git a/build_files/config/pipeline_config.yaml b/build_files/config/pipeline_config.yaml
index 7c8f15de777..fc6cc267572 100644
--- a/build_files/config/pipeline_config.yaml
+++ b/build_files/config/pipeline_config.yaml
@@ -55,7 +55,7 @@ buildbot:
     cuda11:
         version: '11.4.1'
     hip:
-        version: '5.2.21440'
+        version: '5.3.22480'
     optix:
         version: '7.3.0'
     ocloc:
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index aa15838c116..39edb561ad4 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -542,13 +542,22 @@ if(WITH_CYCLES_HIP_BINARIES AND WITH_CYCLES_DEVICE_HIP)
     if(WIN32)
       set(hip_command ${CMAKE_COMMAND})
       set(hip_flags
-        -E env "HIP_PATH=${HIP_ROOT_DIR}" "PATH=${HIP_PERL_DIR}"
+        -E env "HIP_PATH=${HIP_ROOT_DIR}"
         ${HIP_HIPCC_EXECUTABLE}.bat)
     else()
       set(hip_command ${HIP_HIPCC_EXECUTABLE})
       set(hip_flags)
     endif()
 
+    # There's a bug in the compiler causing some scenes to fail to render on Vega cards
+    # A workaround currently is to set -O1 opt level during kernel compilation for these
+    # cards Remove this when a newer compiler is available with fixes.
+    if(WIN32 AND (${arch} MATCHES "gfx90[a-z0-9]+"))
+      set(hip_opt_flags "-O1")
+    else()
+      set(hip_opt_flags)
+    endif()
+
     set(hip_flags
       ${hip_flags}
       --amdgpu-target=${arch}
@@ -565,6 +574,7 @@ if(WITH_CYCLES_HIP_BINARIES AND WITH_CYCLES_DEVICE_HIP)
       -Wno-unused-value
       --hipcc-func-supp
       -ffast-math
+      ${hip_opt_flags}
       -o ${CMAKE_CURRENT_BINARY_DIR}/${hip_file})
 
     if(WITH_NANOVDB)



More information about the Bf-blender-cvs mailing list