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 3359f89c41e..d344b88f255 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 64f7214530f..3f03118b105 100644 --- a/intern/cycles/kernel/CMakeLists.txt +++ b/intern/cycles/kernel/CMakeLists.txt @@ -564,13 +564,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} @@ -587,6 +596,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)