forked from blender/blender
index-of-nearest-104619 #2
@ -521,7 +521,8 @@ endif()
|
|||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
option(WITH_CYCLES_DEVICE_HIP "Enable Cycles AMD HIP support" ON)
|
option(WITH_CYCLES_DEVICE_HIP "Enable Cycles AMD HIP support" ON)
|
||||||
option(WITH_CYCLES_HIP_BINARIES "Build Cycles AMD HIP binaries" OFF)
|
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 gfx1100 gfx1101 gfx1102 CACHE STRING "AMD HIP architectures to build binaries for")
|
# Radeon VII (gfx906) not currently working with HIP SDK, so left out of the list.
|
||||||
|
set(CYCLES_HIP_BINARIES_ARCH gfx900 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(WITH_CYCLES_DEVICE_HIP)
|
||||||
mark_as_advanced(CYCLES_HIP_BINARIES_ARCH)
|
mark_as_advanced(CYCLES_HIP_BINARIES_ARCH)
|
||||||
endif()
|
endif()
|
||||||
|
@ -37,18 +37,24 @@ elseif(HIP_HIPCC_EXECUTABLE)
|
|||||||
set(HIP_VERSION_MINOR 0)
|
set(HIP_VERSION_MINOR 0)
|
||||||
set(HIP_VERSION_PATCH 0)
|
set(HIP_VERSION_PATCH 0)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set(_hipcc_executable ${HIP_HIPCC_EXECUTABLE}.bat)
|
||||||
|
else()
|
||||||
|
set(_hipcc_executable ${HIP_HIPCC_EXECUTABLE})
|
||||||
|
endif()
|
||||||
|
|
||||||
# Get version from the output.
|
# Get version from the output.
|
||||||
execute_process(COMMAND ${HIP_HIPCC_EXECUTABLE} --version
|
execute_process(COMMAND ${_hipcc_executable} --version
|
||||||
OUTPUT_VARIABLE HIP_VERSION_RAW
|
OUTPUT_VARIABLE _hip_version_raw
|
||||||
ERROR_QUIET
|
ERROR_QUIET
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
# Parse parts.
|
# Parse parts.
|
||||||
if(HIP_VERSION_RAW MATCHES "HIP version: .*")
|
if(_hip_version_raw MATCHES "HIP version: .*")
|
||||||
# Strip the HIP prefix and get list of individual version components.
|
# Strip the HIP prefix and get list of individual version components.
|
||||||
string(REGEX REPLACE
|
string(REGEX REPLACE
|
||||||
".*HIP version: ([.0-9]+).*" "\\1"
|
".*HIP version: ([.0-9]+).*" "\\1"
|
||||||
HIP_SEMANTIC_VERSION "${HIP_VERSION_RAW}")
|
HIP_SEMANTIC_VERSION "${_hip_version_raw}")
|
||||||
string(REPLACE "." ";" HIP_VERSION_PARTS "${HIP_SEMANTIC_VERSION}")
|
string(REPLACE "." ";" HIP_VERSION_PARTS "${HIP_SEMANTIC_VERSION}")
|
||||||
list(LENGTH HIP_VERSION_PARTS NUM_HIP_VERSION_PARTS)
|
list(LENGTH HIP_VERSION_PARTS NUM_HIP_VERSION_PARTS)
|
||||||
|
|
||||||
@ -71,7 +77,13 @@ elseif(HIP_HIPCC_EXECUTABLE)
|
|||||||
|
|
||||||
# Construct full semantic version.
|
# Construct full semantic version.
|
||||||
set(HIP_VERSION "${HIP_VERSION_MAJOR}.${HIP_VERSION_MINOR}.${HIP_VERSION_PATCH}")
|
set(HIP_VERSION "${HIP_VERSION_MAJOR}.${HIP_VERSION_MINOR}.${HIP_VERSION_PATCH}")
|
||||||
unset(HIP_VERSION_RAW)
|
unset(_hip_version_raw)
|
||||||
|
unset(_hipcc_executable)
|
||||||
else()
|
else()
|
||||||
set(HIP_FOUND FALSE)
|
set(HIP_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(HIP
|
||||||
|
REQUIRED_VARS HIP_HIPCC_EXECUTABLE
|
||||||
|
VERSION_VAR HIP_VERSION)
|
||||||
|
@ -82,7 +82,7 @@ if(NOT APPLE)
|
|||||||
set(WITH_CYCLES_DEVICE_OPTIX ON CACHE BOOL "" FORCE)
|
set(WITH_CYCLES_DEVICE_OPTIX ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
|
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_CYCLES_CUBIN_COMPILER OFF CACHE BOOL "" FORCE)
|
set(WITH_CYCLES_CUBIN_COMPILER OFF CACHE BOOL "" FORCE)
|
||||||
set(WITH_CYCLES_HIP_BINARIES OFF CACHE BOOL "" FORCE)
|
set(WITH_CYCLES_HIP_BINARIES ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_CYCLES_DEVICE_ONEAPI ON CACHE BOOL "" FORCE)
|
set(WITH_CYCLES_DEVICE_ONEAPI ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_CYCLES_ONEAPI_BINARIES ON CACHE BOOL "" FORCE)
|
set(WITH_CYCLES_ONEAPI_BINARIES ON CACHE BOOL "" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
@ -9,7 +9,7 @@ buildbot:
|
|||||||
cuda11:
|
cuda11:
|
||||||
version: '11.4.1'
|
version: '11.4.1'
|
||||||
hip:
|
hip:
|
||||||
version: '5.3.22480'
|
version: '5.5.30571'
|
||||||
optix:
|
optix:
|
||||||
version: '7.3.0'
|
version: '7.3.0'
|
||||||
ocloc:
|
ocloc:
|
||||||
|
@ -1683,9 +1683,6 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
|||||||
col.label(text=iface_("and NVIDIA driver version %s or newer") % driver_version,
|
col.label(text=iface_("and NVIDIA driver version %s or newer") % driver_version,
|
||||||
icon='BLANK1', translate=False)
|
icon='BLANK1', translate=False)
|
||||||
elif device_type == 'HIP':
|
elif device_type == 'HIP':
|
||||||
if True:
|
|
||||||
col.label(text="HIP temporarily disabled due to compiler bugs", icon='BLANK1')
|
|
||||||
else:
|
|
||||||
import sys
|
import sys
|
||||||
if sys.platform[:3] == "win":
|
if sys.platform[:3] == "win":
|
||||||
driver_version = "21.Q4"
|
driver_version = "21.Q4"
|
||||||
@ -1693,6 +1690,9 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
|||||||
col.label(text=iface_("and AMD Radeon Pro %s driver or newer") % driver_version,
|
col.label(text=iface_("and AMD Radeon Pro %s driver or newer") % driver_version,
|
||||||
icon='BLANK1', translate=False)
|
icon='BLANK1', translate=False)
|
||||||
elif sys.platform.startswith("linux"):
|
elif sys.platform.startswith("linux"):
|
||||||
|
if True:
|
||||||
|
col.label(text="HIP temporarily disabled due to compiler bugs", icon='BLANK1')
|
||||||
|
else:
|
||||||
driver_version = "22.10"
|
driver_version = "22.10"
|
||||||
col.label(text="Requires AMD GPU with Vega or RDNA architecture", icon='BLANK1')
|
col.label(text="Requires AMD GPU with Vega or RDNA architecture", icon='BLANK1')
|
||||||
col.label(text=iface_("and AMD driver version %s or newer") % driver_version, icon='BLANK1',
|
col.label(text=iface_("and AMD driver version %s or newer") % driver_version, icon='BLANK1',
|
||||||
|
@ -42,15 +42,19 @@ endif()
|
|||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
if(WITH_CYCLES_HIP_BINARIES AND WITH_CYCLES_DEVICE_HIP)
|
if(WITH_CYCLES_HIP_BINARIES AND WITH_CYCLES_DEVICE_HIP)
|
||||||
|
if(UNIX)
|
||||||
|
# Disabled until there is a HIP 5.5 release for Linux.
|
||||||
set(WITH_CYCLES_HIP_BINARIES OFF)
|
set(WITH_CYCLES_HIP_BINARIES OFF)
|
||||||
message(STATUS "HIP temporarily disabled due to compiler bugs")
|
message(STATUS "HIP temporarily disabled due to compiler bugs")
|
||||||
|
else()
|
||||||
|
# Need at least HIP 5.5 to solve compiler bug affecting the kernel.
|
||||||
|
find_package(HIP 5.5.0)
|
||||||
|
set_and_warn_library_found("HIP compiler" HIP_FOUND WITH_CYCLES_HIP_BINARIES)
|
||||||
|
|
||||||
# find_package(HIP)
|
if(HIP_FOUND)
|
||||||
# set_and_warn_library_found("HIP compiler" HIP_FOUND WITH_CYCLES_HIP_BINARIES)
|
message(STATUS "Found HIP ${HIP_HIPCC_EXECUTABLE} (${HIP_VERSION})")
|
||||||
|
endif()
|
||||||
# if(HIP_FOUND)
|
endif()
|
||||||
# message(STATUS "Found HIP ${HIP_HIPCC_EXECUTABLE} (${HIP_VERSION})")
|
|
||||||
# endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT WITH_HIP_DYNLOAD)
|
if(NOT WITH_HIP_DYNLOAD)
|
||||||
|
@ -137,7 +137,7 @@ void device_hip_info(vector<DeviceInfo> &devices)
|
|||||||
info.num = num;
|
info.num = num;
|
||||||
|
|
||||||
info.has_nanovdb = true;
|
info.has_nanovdb = true;
|
||||||
info.has_light_tree = false;
|
info.has_light_tree = true;
|
||||||
info.denoisers = 0;
|
info.denoisers = 0;
|
||||||
|
|
||||||
info.has_gpu_queue = true;
|
info.has_gpu_queue = true;
|
||||||
|
@ -79,9 +79,8 @@ CCL_NAMESPACE_BEGIN
|
|||||||
#define __VISIBILITY_FLAG__
|
#define __VISIBILITY_FLAG__
|
||||||
#define __VOLUME__
|
#define __VOLUME__
|
||||||
|
|
||||||
/* TODO: solve internal compiler errors and enable light tree on HIP. */
|
|
||||||
/* TODO: solve internal compiler perf issue and enable light tree on Metal/AMD. */
|
/* TODO: solve internal compiler perf issue and enable light tree on Metal/AMD. */
|
||||||
#if defined(__KERNEL_HIP__) || defined(__KERNEL_METAL_AMD__)
|
#if defined(__KERNEL_METAL_AMD__)
|
||||||
# undef __LIGHT_TREE__
|
# undef __LIGHT_TREE__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user