[Hardware][AMD][CI/Build][Doc] Upgrade to ROCm 6.1, Dockerfile improvements, test fixes (#5422)
This commit is contained in:
@@ -147,19 +147,23 @@ macro(override_gpu_arches GPU_ARCHES GPU_LANG GPU_SUPPORTED_ARCHES)
|
||||
if (${GPU_LANG} STREQUAL "HIP")
|
||||
#
|
||||
# `GPU_ARCHES` controls the `--offload-arch` flags.
|
||||
# `CMAKE_HIP_ARCHITECTURES` is set up by torch and can be controlled
|
||||
# via the `PYTORCH_ROCM_ARCH` env variable.
|
||||
#
|
||||
|
||||
# If PYTORCH_ROCM_ARCH env variable exists, then we take it as a list,
|
||||
# if not, then we use CMAKE_HIP_ARCHITECTURES which was generated by calling
|
||||
# "rocm_agent_enumerator" in "enable_language(HIP)"
|
||||
# (in file Modules/CMakeDetermineHIPCompiler.cmake)
|
||||
#
|
||||
if(DEFINED ENV{PYTORCH_ROCM_ARCH})
|
||||
set(HIP_ARCHITECTURES $ENV{PYTORCH_ROCM_ARCH})
|
||||
else()
|
||||
set(HIP_ARCHITECTURES ${CMAKE_HIP_ARCHITECTURES})
|
||||
endif()
|
||||
#
|
||||
# Find the intersection of the supported + detected architectures to
|
||||
# set the module architecture flags.
|
||||
#
|
||||
|
||||
set(VLLM_ROCM_SUPPORTED_ARCHS "gfx908;gfx90a;gfx942;gfx1100")
|
||||
|
||||
set(${GPU_ARCHES})
|
||||
foreach (_ARCH ${VLLM_ROCM_SUPPORTED_ARCHS})
|
||||
foreach (_ARCH ${HIP_ARCHITECTURES})
|
||||
if (_ARCH IN_LIST _GPU_SUPPORTED_ARCHES_LIST)
|
||||
list(APPEND ${GPU_ARCHES} ${_ARCH})
|
||||
endif()
|
||||
@@ -167,7 +171,7 @@ macro(override_gpu_arches GPU_ARCHES GPU_LANG GPU_SUPPORTED_ARCHES)
|
||||
|
||||
if(NOT ${GPU_ARCHES})
|
||||
message(FATAL_ERROR
|
||||
"None of the detected ROCm architectures: ${CMAKE_HIP_ARCHITECTURES} is"
|
||||
"None of the detected ROCm architectures: ${HIP_ARCHITECTURES} is"
|
||||
" supported. Supported ROCm architectures are: ${_GPU_SUPPORTED_ARCHES_LIST}.")
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user