[Bugfix][CI/Build][AMD][ROCm]Fixed the cmake build bug which generate garbage on certain devices (#5641)

This commit is contained in:
Hongxia Yang
2024-06-19 02:21:29 -04:00
committed by GitHub
parent e5150f2c28
commit f758aed0e8
2 changed files with 12 additions and 10 deletions

View File

@@ -155,8 +155,11 @@ macro(override_gpu_arches GPU_ARCHES GPU_LANG GPU_SUPPORTED_ARCHES)
# 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 ${CMAKE_HIP_ARCHITECTURES})
foreach (_ARCH ${VLLM_ROCM_SUPPORTED_ARCHS})
if (_ARCH IN_LIST _GPU_SUPPORTED_ARCHES_LIST)
list(APPEND ${GPU_ARCHES} ${_ARCH})
endif()