[PATCH] D105191: [Clang][OpenMP] Add support for Static Device Libraries
Ye Luo via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 14 06:43:48 PDT 2021
ye-luo added a comment.
yeluo at epyc-server:~/opt/openmp-target/tests/math$ clang++ -fopenmp -fopenmp-targets=nvptx64 -Xopenmp-target=nvptx64 -march=sm_80 modf.cpp -c
yeluo at epyc-server:~/opt/openmp-target/tests/math$ clang-offload-bundler -type=o --inputs=modf.o --list
openmp-nvptx64
host-x86_64-unknown-linux-gnu
yeluo at epyc-server:~/opt/openmp-target/tests/math$ clang++ -fopenmp -fopenmp-targets=nvptx64 modf.cpp -c
yeluo at epyc-server:~/opt/openmp-target/tests/math$ clang-offload-bundler -type=o --inputs=modf.o --list
openmp-nvptx64
host-x86_64-unknown-linux-gnu
yeluo at epyc-server:~/opt/openmp-target/tests/math$ clang++ -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda modf.cpp -c
warning: linking module '/soft/llvm/main-20210910/lib/libomptarget-nvptx-sm_80.bc': Linking two modules of different target triples: '/soft/llvm/main-20210910/lib/libomptarget-nvptx-sm_80.bc' is 'nvptx64' whereas 'modf.cpp' is 'nvptx64-nvidia-cuda'
[-Wlinker-warnings]
1 warning generated.
yeluo at epyc-server:~/opt/openmp-target/tests/math$ clang-offload-bundler -type=o --inputs=modf.o --list
openmp-nvptx64-nvidia-cuda
host-x86_64-unknown-linux-gnu
Here is my clang build recipe
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$INSTALL_FOLDER \
-DLLVM_ENABLE_BACKTRACES=ON \
-DLLVM_ENABLE_WERROR=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;NVPTX" \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx;openmp" \
-DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES="80,61" \
-DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_80 \
-DLIBOMPTARGET_NVPTX_MAX_SM=38 \
-DLIBOMPTARGET_ENABLE_DEBUG=ON \
../llvm-project/llvm
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105191/new/
https://reviews.llvm.org/D105191
More information about the cfe-commits
mailing list