From 5ee327fd8906ef627edd24def4c39ac90ab47fb5 Mon Sep 17 00:00:00 2001 From: Illia Silin <98187287+illsilin@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:21:57 -0700 Subject: [PATCH] fix the target selection logic (#1561) [ROCm/composable_kernel commit: 2e1165c1a73552dbacf08ccd351314ae95de14f7] --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ad6307cb3..3f22bb4b61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,7 +132,11 @@ if(GPU_ARCHS) unset(GPU_TARGETS CACHE) unset(AMDGPU_TARGETS CACHE) endif() - +if(GPU_TARGETS) + set(USER_GPU_TARGETS 1) +else() + set(USER_GPU_TARGETS 0) +endif() find_package(hip) # No assumption that HIP kernels are launched with uniform block size for backward compatibility # SWDEV-413293 and https://reviews.llvm.org/D155213 @@ -162,7 +166,7 @@ endif() if(GPU_ARCHS) set(CK_GPU_TARGETS ${GPU_ARCHS}) else() - if(GPU_TARGETS) + if(USER_GPU_TARGETS) set(CK_GPU_TARGETS ${GPU_TARGETS}) endif() endif()