Unverified Commit 2e1165c1 authored by Illia Silin's avatar Illia Silin Committed by GitHub
Browse files

fix the target selection logic (#1561)

parent cfac9497
...@@ -132,7 +132,11 @@ if(GPU_ARCHS) ...@@ -132,7 +132,11 @@ if(GPU_ARCHS)
unset(GPU_TARGETS CACHE) unset(GPU_TARGETS CACHE)
unset(AMDGPU_TARGETS CACHE) unset(AMDGPU_TARGETS CACHE)
endif() endif()
if(GPU_TARGETS)
set(USER_GPU_TARGETS 1)
else()
set(USER_GPU_TARGETS 0)
endif()
find_package(hip) find_package(hip)
# No assumption that HIP kernels are launched with uniform block size for backward compatibility # No assumption that HIP kernels are launched with uniform block size for backward compatibility
# SWDEV-413293 and https://reviews.llvm.org/D155213 # SWDEV-413293 and https://reviews.llvm.org/D155213
...@@ -162,7 +166,7 @@ endif() ...@@ -162,7 +166,7 @@ endif()
if(GPU_ARCHS) if(GPU_ARCHS)
set(CK_GPU_TARGETS ${GPU_ARCHS}) set(CK_GPU_TARGETS ${GPU_ARCHS})
else() else()
if(GPU_TARGETS) if(USER_GPU_TARGETS)
set(CK_GPU_TARGETS ${GPU_TARGETS}) set(CK_GPU_TARGETS ${GPU_TARGETS})
endif() endif()
endif() endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment