From c174a61628fd925c9973acbcb993d0cc4e9d37b5 Mon Sep 17 00:00:00 2001 From: Vin Huang Date: Tue, 13 Aug 2024 11:41:11 +0800 Subject: [PATCH] Forced using xnack+ for ASAN build --- CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c903d893..1b488443 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,10 +125,17 @@ if (BUILD_CUDA) list( APPEND HIP_INCLUDE_DIRS "${HIP_ROOT_DIR}/include" ) else() - #Set the AMDGPU_TARGETS with backward compatiblity - rocm_check_target_ids(DEFAULT_AMDGPU_TARGETS - TARGETS "gfx940;gfx941;gfx942;" - ) + if (BUILD_ADDRESS_SANITIZER) + #Set the AMDGPU_TARGETS for ASAN build + rocm_check_target_ids(DEFAULT_AMDGPU_TARGETS + TARGETS "gfx940:xnack+;gfx941:xnack+;gfx942:xnack+;" + ) + else() + #Set the AMDGPU_TARGETS with backward compatiblity + rocm_check_target_ids(DEFAULT_AMDGPU_TARGETS + TARGETS "gfx940;gfx941;gfx942;" + ) + endif() if (AMDGPU_TARGETS) set(TMPAMDGPU_TARGETS "${AMDGPU_TARGETS}")