[Openmp-commits] [openmp] 54e0217 - [Libomptarget] Build the static library without CUDA installed
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Fri May 13 13:31:10 PDT 2022
Author: Joseph Huber
Date: 2022-05-13T16:30:58-04:00
New Revision: 54e02179b33f6bfd1c7bd836e790effd5ffb715c
URL: https://github.com/llvm/llvm-project/commit/54e02179b33f6bfd1c7bd836e790effd5ffb715c
DIFF: https://github.com/llvm/llvm-project/commit/54e02179b33f6bfd1c7bd836e790effd5ffb715c.diff
LOG: [Libomptarget] Build the static library without CUDA installed
Summary:
This patch allows users to compile the static library without CUDA
installed on the system. This requires the new flag `--cuda-feature` to
indicate that we need `+ptx61` in order to compile the runtime.
Added:
Modified:
openmp/libomptarget/DeviceRTL/CMakeLists.txt
Removed:
################################################################################
diff --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
index 216fd198264b6..08ed44aad80a5 100644
--- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
@@ -243,7 +243,7 @@ foreach(mcpu ${amdgpu_mcpus})
endforeach()
# Set the flags to build the device runtime from clang.
-set(clang_lib_flags -fopenmp -fopenmp-cuda-mode -foffload-lto -fvisibility=hidden -mllvm -openmp-opt-disable -nogpulib -nostdinc -DSHARED_SCRATCHPAD_SIZE=512)
+set(clang_lib_flags -fopenmp -fopenmp-cuda-mode -foffload-lto -fvisibility=hidden -Xopenmp-target=nvptx64-nvidia-cuda --cuda-feature=+ptx61 -mllvm -openmp-opt-disable -nocudalib -nogpulib -nostdinc -DSHARED_SCRATCHPAD_SIZE=512)
foreach(arch ${nvptx_sm_list})
set(clang_lib_flags ${clang_lib_flags} --offload-arch=sm_${arch})
endforeach()
More information about the Openmp-commits
mailing list