From a117126d2477966aa6aaa8f4116c577fe313b12e Mon Sep 17 00:00:00 2001 From: Lauren Wrubleski Date: Thu, 26 Sep 2024 14:12:28 -0600 Subject: [PATCH] Validate target IDs prior to setting variable --- share/rocmcmakebuildtools/cmake/ROCMArchitecture.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/rocmcmakebuildtools/cmake/ROCMArchitecture.cmake b/share/rocmcmakebuildtools/cmake/ROCMArchitecture.cmake index 96eac03..028f35f 100644 --- a/share/rocmcmakebuildtools/cmake/ROCMArchitecture.cmake +++ b/share/rocmcmakebuildtools/cmake/ROCMArchitecture.cmake @@ -2,6 +2,8 @@ # Copyright (C) 2024 Advanced Micro Devices, Inc. # ###################################################################################################################### +include(ROCMCheckTargetIds) + macro(_rocm_get_arch_keyword_list) # TODO: These lists are not accurate! They must be updated before this can be merged. set(_arches_rocm6.0 gfx900 gfx906:xnack- gfx908:xnack- gfx90a:xnack+ gfx90a:xnack- gfx940 gfx941 gfx942 gfx1010 gfx1012 gfx1030 gfx1100 gfx1101 gfx1102) @@ -73,5 +75,6 @@ function(rocm_determine_architecture) endif() # Remove arches listed in block, not listed in allow list(REMOVE_ITEM arch_list ${block_list}) + rocm_check_target_ids(arch_list TARGETS ${arch_list}) set(${arch_dest} "${arch_list}" CACHE STRING "") endfunction(rocm_determine_architecture)