Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

cmake: use property list for GPU_TARGETS #1

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions hip-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,14 @@ if(HIP_COMPILER STREQUAL "clang")
if(NOT WIN32)
find_dependency(AMDDeviceLibs)
endif()
set(AMDGPU_TARGETS "gfx900;gfx906;gfx908;gfx90a;gfx1030" CACHE STRING "AMD GPU targets to compile for")
set(GPU_TARGETS "${AMDGPU_TARGETS}" CACHE STRING "GPU targets to compile for")
set(GPU_DEFAULT_TARGETS "gfx900;gfx906;gfx908;gfx90a;gfx1030")

if(NOT DEFINED AMDGPU_TARGETS)
set(GPU_TARGETS "${GPU_DEFAULT_TARGETS}" CACHE STRING "GPU targets to compile for. Adding features is supported e.g. gfx908:xnack+")
else()
message(WARNING "Variable AMDGPU_TARGETS is deprecated! Please use GPU_TARGETS to choose architectures.")
set(GPU_TARGETS "${AMDGPU_TARGETS}" CACHE STRING "GPU targets to compile for. Adding features is supported e.g. gfx908:xnack+")
endif()
endif()

if(NOT WIN32)
Expand Down