aboutsummaryrefslogtreecommitdiff
path: root/openmp/tools
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2021-07-20 12:52:00 -0400
committerHuber, Joseph <huberjn@ornl.gov>2021-07-20 12:52:53 -0400
commitb917a1d713380ac83b13063e697ff6c65936ac15 (patch)
treeba5520bf20cec8bad3627be598b9b9ce468c0c05 /openmp/tools
parent0cc2346cbfaaaafdf15d5bb1909d51a04ca32b86 (diff)
downloadllvm-b917a1d713380ac83b13063e697ff6c65936ac15.zip
llvm-b917a1d713380ac83b13063e697ff6c65936ac15.tar.gz
llvm-b917a1d713380ac83b13063e697ff6c65936ac15.tar.bz2
[OpenMP] Change AMDGCN to AMDGPU in the Cmake Module
Summary: Change the name for targeting AMD offloading.
Diffstat (limited to 'openmp/tools')
-rw-r--r--openmp/tools/Modules/FindOpenMPTarget.cmake16
-rw-r--r--openmp/tools/Modules/README.rst2
2 files changed, 9 insertions, 9 deletions
diff --git a/openmp/tools/Modules/FindOpenMPTarget.cmake b/openmp/tools/Modules/FindOpenMPTarget.cmake
index a8a6665..3591a49 100644
--- a/openmp/tools/Modules/FindOpenMPTarget.cmake
+++ b/openmp/tools/Modules/FindOpenMPTarget.cmake
@@ -27,7 +27,7 @@ already. It does not need to be included separately to get full OpenMP support.
Variables
^^^^^^^^^
-The module exposes the components ``NVPTX`` and ``AMDGCN``. Each of these
+The module exposes the components ``NVPTX`` and ``AMDGPU``. Each of these
controls the various offloading targets to search OpenMP target offloasing
support for.
@@ -38,7 +38,7 @@ Depending on the enabled components the following variables will be set:
targets have been found.
This module will set the following variables per language in your
-project, where ``<device>`` is one of NVPTX or AMDGCN
+project, where ``<device>`` is one of NVPTX or AMDGPU
``OpenMPTarget_<device>_FOUND``
Variable indicating if OpenMP support for the ``<device>`` was detected.
@@ -62,7 +62,7 @@ be used to override the standard flag searching for a given compiler.
``OpenMPTarget_<device>_ARCH``
Sets the architecture of ``<device>`` to compile for. Such as `sm_70` for NVPTX
- or `gfx908` for AMDGCN.
+ or `gfx908` for AMDGPU.
``OpenMPTarget_<device>_DEVICE``
Sets the name of the device to offload to.
@@ -124,7 +124,7 @@ function(_OPENMP_TARGET_DEVICE_CANDIDATES LANG DEVICE)
if(DEFINED OMPTarget_DEVICE_${CMAKE_${LANG}_COMPILER_ID})
set(OpenMPTarget_DEVICE_CANDIDATES "${OMPTarget_DEVICE_${CMAKE_${LANG}_COMPILER_ID}}")
endif()
- elseif("${DEVICE}" STREQUAL "AMDGCN")
+ elseif("${DEVICE}" STREQUAL "AMDGPU")
set(OMPTarget_DEVICE_Clang "amdgcn-amd-amdhsa")
set(OMPTarget_DEVICE_GNU "hsa")
@@ -227,7 +227,7 @@ foreach(LANG IN ITEMS C CXX)
set(OpenMP_${LANG}_VERSION ${OpenMP_${LANG}_VERSION}
CACHE STRING "OpenMP Version" FORCE)
mark_as_advanced(OpenMP_${LANG}_VERSION)
- foreach(DEVICE IN ITEMS NVPTX AMDGCN)
+ foreach(DEVICE IN ITEMS NVPTX AMDGPU)
if(CMAKE_${LANG}_COMPILER_LOADED)
if(NOT DEFINED OpenMPTarget_${LANG}_FLAGS OR NOT DEFINED OpenMPTarget_${LANG}_DEVICE)
_OPENMP_TARGET_DEVICE_GET_FLAGS(${LANG} ${DEVICE}
@@ -242,9 +242,9 @@ foreach(LANG IN ITEMS C CXX)
CACHE STRING "${DEVICE} target compile flags for OpenMP target offloading" FORCE)
set(OpenMPTarget_${DEVICE}_ARCH ${_OpenMPTarget_${DEVICE}_ARCHS}
CACHE STRING "${DEVICE} target architecture flags for OpenMP target offloading" FORCE)
- set(OpenMPTarget_${DEVICE}_LIBS ${OpenMPTarget_${DEVICE}_LIBS_WORK}
+ set(OpenMPTarget_${DEVICE}_LIBRARIES ${OpenMPTarget_${DEVICE}_LIBS_WORK}
CACHE STRING "${DEVICE} target libraries for OpenMP target offloading" FORCE)
- mark_as_advanced(OpenMPTarget_${DEVICE}_FLAGS OpenMPTarget_${DEVICE}_ARCH OpenMPTarget_${DEVICE}_LIBS)
+ mark_as_advanced(OpenMPTarget_${DEVICE}_FLAGS OpenMPTarget_${DEVICE}_ARCH OpenMPTarget_${DEVICE}_LIBRARIES)
endif()
endif()
endforeach()
@@ -301,7 +301,7 @@ foreach(LANG IN ITEMS C CXX)
INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${OpenMP_${LANG}_INCLUDE_DIRS}>")
set_property(TARGET OpenMPTarget::OpenMPTarget_${DEVICE} PROPERTY
INTERFACE_LINK_LIBRARIES
- "${OpenMPTarget_${DEVICE}_LIBS}"
+ "${OpenMPTarget_${DEVICE}_LIBRARIES}"
"${OpenMP_${LANG}_LIBRARIES}")
# The offloading flags must also be passed during the linking phase so
# the compiler can pass the binary to the correct toolchain.
diff --git a/openmp/tools/Modules/README.rst b/openmp/tools/Modules/README.rst
index 166118fb..24da06b 100644
--- a/openmp/tools/Modules/README.rst
+++ b/openmp/tools/Modules/README.rst
@@ -16,7 +16,7 @@ device. The module will attempt to compile a test program using known compiler
flags for each requested architecture. If successful, the flags required for
offloading will be loaded into the ``OpenMPTarget::OpenMPTarget_<device>``
target or the ``OpenMPTarget_<device>_FLAGS`` variable. Currently supported target
-devices are ``NVPTX`` and ``AMDGCN``. This module is still under development so
+devices are ``NVPTX`` and ``AMDGPU``. This module is still under development so
some features may be missing.
To use this module, simply add the path to CMake's current module path and call