[PATCH] D105191: [Clang][OpenMP] Add support for Static Device Libraries
Ye Luo via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 13 13:18:33 PDT 2021
ye-luo added a comment.
the modf test still doesn't work. The issue was from unbundle.
case 1 works.
clang++ -fopenmp -fopenmp-targets=nvptx64 modf.cpp -c
clang++ -fopenmp -fopenmp-targets=nvptx64 modf.o
case 2
clang++ -fopenmp -fopenmp-targets=nvptx64 -Xopenmp-target=nvptx64 -march=sm_80 modf.cpp -c
clang++ -fopenmp -fopenmp-targets=nvptx64 -Xopenmp-target=nvptx64 -march=sm_80 modf.o
doesn't work. The issue was a failure in unbundling
"/soft/llvm/main-patched/bin/clang-offload-bundler" -type=o -targets=host-x86_64-unknown-linux-gnu,openmp-nvptx64-sm_80 -inputs=modf.o -outputs=/tmp/modf-99be57.o,/tmp/modf-88a9eb.cubin -unbundle -allow-missing-bundles
ends up an empty cubin file. If I remove -sm_80 on the unbundle line
It seems that we need to have sm_80 when the object file is created.
When clang is compiled CLANG_OPENMP_NVPTX_DEFAULT_ARCH can be used to set the default sm_XX so it doesn't needs to be provided at compile time. If not set default is sm_35.
So in general sm_XX is always known when the compiler is used for compiling.
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