<font size=2 face="sans-serif">Hi Siegmar,</font><br><br><font size=2 face="sans-serif">It all depends on how you build the
compiler.</font><br><br><font size=2 face="sans-serif">If you want to build the .bc library
you will need to have the following two cmake flags:</font><br><br><font size=2 face="sans-serif"> -DOPENMP_ENABLE_LIBOMPTARGET=ON</font><br><font size=2 face="sans-serif"> -DLIBOMPTARGET_NVPTX_ENABLE_BCLIB=true</font><br><br><font size=2 face="sans-serif">This will enable the building of libomptarget
library and the ...sm_35.bc library. sm_35 is the default compute capability
used by the compiler if you don't specify anything else.</font><br><br><font size=2 face="sans-serif">You can control this default value when
you build your compiler by passing the following flag to your cmake command:</font><br><br><font size=2 face="sans-serif"> -DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_50</font><br><br><font size=2 face="sans-serif">You can also build the .bc library for
more than one compute capability using the following cmake flag:</font><br><br><font size=2 face="sans-serif"> -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=50,60,70</font><br><br><font size=2 face="sans-serif">Make sure to also include the default
in the list (in this case 50).</font><br><br><br><br><font size=2 face="sans-serif">When you compile your application/program
you can control which compute capability the OpenMP device offloading toolchain
uses by passing the following flag to clang/clang++:</font><br><br><font size=2 face="sans-serif">-Xopenmp-target -march=sm_70</font><br><br><font size=2 face="sans-serif">This compile line flag is only required
if you want a compute capability other than the default (in this case sm_50)
i.e. the one specified using the -DCLANG_OPENMP_NVPTX_DEFAULT_ARCH flag.</font><br><br><font size=2 face="sans-serif">I hope this helps,</font><br><br><font size=2 face="sans-serif">--Doru<br></font><br><br><br><br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Siegmar Gross via Openmp-dev
<openmp-dev@lists.llvm.org></font><br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">llvm-openmp-dev <openmp-dev@lists.llvm.org></font><br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">07/02/2018 09:27 AM</font><br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">[Openmp-dev]
clang-7: warning: No library 'libomptarget-nvptx-sm_35.bc'</font><br><font size=1 color=#5f5f5f face="sans-serif">Sent by:
</font><font size=1 face="sans-serif">"Openmp-dev"
<openmp-dev-bounces@lists.llvm.org></font><br><hr noshade><br><br><br><tt><font size=2>Hi,<br><br>today I've built the latest version of llvm-trunk using Cmake on my "SUSE<br>Linux Enterprise Server 12.3 (x86_64)". I get the following warnings,
if I<br>compile a small program.<br><br>loki introduction 162 \clang --cuda-gpu-arch=sm_50 -fopenmp <br>-fopenmp-targets=nvptx64-nvidia-cuda dot_prod_accelerator_OpenMP.c -lomptarget<br>clang-7: warning: No library 'libomptarget-nvptx-sm_35.bc' found in the
default <br>clang lib directory or in LIBRARY_PATH. Expect degraded performance due
to no <br>inlining of runtime functions on target devices. [-Wopenmp-target]<br>clang-7: warning: argument unused during compilation: '--cuda-gpu-arch=sm_50'
<br>[-Wunused-command-line-argument]<br>loki introduction 163<br><br><br>Why does the compiler ignore "--cuda-gpu-arch=sm_50". How can
I create<br>"libomptarget-nvptx-sm_35.bc" and probably "libomptarget-nvptx-sm_50.bc"?<br><br><br>Why do I get different numbers of devices, if I compile the program with<br>different options. I use a machine with two "Intel Xeon E5-2620 v3"<br>processors (6 cores and 12 hwthreads each) and one Nvidia Quadro K2200<br>device.<br><br><br>loki introduction 183 clang -fopenmp -fopenmp-targets=x86_64-pc-linux-gnu
\<br>? dot_prod_accelerator_OpenMP.c -lomptarget<br>loki introduction 184 a.out<br>Number of processors: 24<br>Number of devices: 4<br>Default device: 0<br>sum = 6.000000e+08<br><br>loki introduction 185 clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda
\<br>? dot_prod_accelerator_OpenMP.c -lomptarget<br>clang-7: warning: No library 'libomptarget-nvptx-sm_35.bc' found in the
default <br>clang lib directory or in LIBRARY_PATH. Expect degraded performance due
to no <br>inlining of runtime functions on target devices. [-Wopenmp-target]<br>loki introduction 186 a.out<br>Number of processors: 24<br>Number of devices: 1<br>Default device: 0<br>sum = 6.000000e+08<br>loki introduction 187<br><br><br>Thank you very much for any answers in advance.<br><br><br>Kind regards<br><br>Siegmar<br>_______________________________________________<br>Openmp-dev mailing list<br>Openmp-dev@lists.llvm.org<br></font></tt><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev"><tt><font size=2>http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</font></tt></a><tt><font size=2><br><br></font></tt><br><br><BR>