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
This commit is contained in:
Sayak Biswas 2022-11-17 16:16:41 +01:00 committed by Brecht Van Lommel
parent 3e81d177ea
commit c94583cd64
Notes: blender-bot 2023-12-08 16:39:08 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3
Referenced by issue #100891, blender3.3 HIP performance down 30% on Windows
3 changed files with 13 additions and 3 deletions

View File

@ -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()

View File

@ -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:

View File

@ -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)