Skip to content

Commit

Permalink
[offload] Support LIBOMPTARGET_DEVICE_ARCHITECTURES={amdgpu|nvptx} (#…
Browse files Browse the repository at this point in the history
…119070)

Add two more special values for LIBOMPTARGET_DEVICE_ARCHITECTURES:
`amdgpu` and `nvptx`, to support building for all AMDGPU and NVPTX
targets respectively. This can be used in place of `all` when offload is
built with one of the GPU plugins only.
  • Loading branch information
mgorny authored Dec 7, 2024
1 parent ccdd284 commit 69227a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions offload/DeviceRTL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ set(LIBOMPTARGET_DEVICE_ARCHITECTURES "all" CACHE STRING

if(LIBOMPTARGET_DEVICE_ARCHITECTURES STREQUAL "all")
set(LIBOMPTARGET_DEVICE_ARCHITECTURES ${all_gpu_architectures})
elseif(LIBOMPTARGET_DEVICE_ARCHITECTURES STREQUAL "amdgpu")
set(LIBOMPTARGET_DEVICE_ARCHITECTURES ${all_amdgpu_architectures})
elseif(LIBOMPTARGET_DEVICE_ARCHITECTURES STREQUAL "nvptx")
set(LIBOMPTARGET_DEVICE_ARCHITECTURES ${all_nvptx_architectures})
elseif(LIBOMPTARGET_DEVICE_ARCHITECTURES STREQUAL "auto" OR
LIBOMPTARGET_DEVICE_ARCHITECTURES STREQUAL "native")
if(NOT LIBOMPTARGET_NVPTX_ARCH AND NOT LIBOMPTARGET_AMDGPU_ARCH)
Expand Down

0 comments on commit 69227a1

Please sign in to comment.