summaryrefslogtreecommitdiff
path: root/openmp/tools
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2021-06-28 15:34:15 -0400
committerJoseph Huber <jhuber6@vols.utk.edu>2021-06-28 17:05:07 -0400
commit2190c48fdece1712735c507e3f343ae5b872189e (patch)
tree16ee0ec52e8f4b992174bdccc9052bdfbab875fb /openmp/tools
parentc9f3240c9d94f8128371358887e8b9e5c10c122a (diff)
downloadllvm-2190c48fdece1712735c507e3f343ae5b872189e.tar.gz
[OpenMP][Documentation] Add FAQ entry for CMake module
This patch adds documentation for using the CMake find module for OpenMP target offloading provided by LLVM. It also removes the requirement for AMD's architecture to be set as this isn't necessary for upstream LLVM. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D105051
Diffstat (limited to 'openmp/tools')
-rw-r--r--openmp/tools/Modules/FindOpenMPTarget.cmake4
-rw-r--r--openmp/tools/Modules/README.rst2
2 files changed, 1 insertions, 5 deletions
diff --git a/openmp/tools/Modules/FindOpenMPTarget.cmake b/openmp/tools/Modules/FindOpenMPTarget.cmake
index d3917afdf280..a8a666512fab 100644
--- a/openmp/tools/Modules/FindOpenMPTarget.cmake
+++ b/openmp/tools/Modules/FindOpenMPTarget.cmake
@@ -140,10 +140,6 @@ endfunction()
# Get flags for setting the device's architecture for each compiler.
function(_OPENMP_TARGET_DEVICE_ARCH_CANDIDATES LANG DEVICE DEVICE_FLAG)
- # AMD requires the architecture, default to gfx908 if not provided.
- if((NOT OpenMPTarget_${DEVICE}_ARCH) AND ("${DEVICE}" STREQUAL "AMDGCN"))
- set(OpenMPTarget_${DEVICE}_ARCH "gfx908")
- endif()
if(OpenMPTarget_${DEVICE}_ARCH)
# Only Clang supports selecting the architecture for now.
set(OMPTarget_ARCH_Clang "-Xopenmp-target=${DEVICE_FLAG} -march=${OpenMPTarget_${DEVICE}_ARCH}")
diff --git a/openmp/tools/Modules/README.rst b/openmp/tools/Modules/README.rst
index d1ec32f52190..166118fb363f 100644
--- a/openmp/tools/Modules/README.rst
+++ b/openmp/tools/Modules/README.rst
@@ -15,7 +15,7 @@ This module will attempt to find OpenMP target offloading support for a given
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_NVPTX_FLAGS`` variable. Currently supported target
+target or the ``OpenMPTarget_<device>_FLAGS`` variable. Currently supported target
devices are ``NVPTX`` and ``AMDGCN``. This module is still under development so
some features may be missing.