<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Jost, most probably the compiler cannot correctly find CUDA
installation or cannot detect its version correctly. Check, if
your CUDA installation directiry has version.txt file.<br>
</p>
<pre class="moz-signature" cols="72">-------------
Best regards,
Alexey Bataev</pre>
<div class="moz-cite-prefix">24.08.2020 4:58 PM, Jost, Gabriele
(ARC-TNC)[Supersmith] via llvm-dev пишет:<br>
</div>
<blockquote type="cite"
cite="mid:%3C18DB2391-2249-495A-988D-1AF45FB6B470@contoso.com%3E">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:-webkit-standard;
panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I have
installed clang12 with OpenMP target-offload on a cluster of
v100 nodes using cuda 10.1 and gcc 8.2.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">When I try
to test it:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">clang -c
-I../common -O3 -g -fopenmp
-fopenmp-targets=nvptx64-nvida-cuda
-Xopenmp-target=nvptx64-nvidia-cuda -march=sm_70
-mcmodel=medium -DCRPL_COMP=0 ft.c<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">clang-12:
error: cannot find libdevice for sm_<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">with a blank
architecture.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I have the
openmp target bc libraries<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">lrwxrwxrwx 1
gjost scicon 19 Aug 21 14:39 libRemarks.so ->
libRemarks.so.12git<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">-rw-r--r-- 1
gjost scicon 69656 Aug 21 14:52
libomptarget-nvptx-sm_35.bc<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">-rw-r--r-- 1
gjost scicon 69196 Aug 21 14:52
libomptarget-nvptx-sm_70.bc<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">-rw-r--r-- 1
gjost scicon 69608 Aug 21 14:52
libomptarget-nvptx-sm_60.bc<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">lrwxrwxrwx 1
gjost scicon 9 Aug 21 15:07 libgomp.so ->
libomp.so<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">lrwxrwxrwx 1
gjost scicon 9 Aug 21 15:07 libiomp5.so ->
libomp.so<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The only
place in the llvm code where I see a message like this is
here:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">grep "cannot
find libdevice for sm_"
<b>llvm-project/clang/test/Driver/cuda-detect.cu<o:p></o:p></b></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">//
MISSINGLIBDEVICE: error: cannot find libdevice for sm_20.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">pfe25.gjost
69> grep MISSINGLIBDEVICE
llvm-project/clang/test/Driver/cuda-detect.cu<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">// RUN: |
FileCheck %s -check-prefix COMMON -check-prefix
MISSINGLIBDEVICE<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">// RUN: |
FileCheck %s -check-prefix COMMON -check-prefix
MISSINGLIBDEVICE<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">//
MISSINGLIBDEVICE: error: cannot find libdevice for sm_20.<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span
style="font-size:10.5pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.5pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.5pt;color:black">Have you seen this
behavior before? Maybe clang12/cuda/10.1 and gcc8.2 is a
bad combo?<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.5pt;color:black">Thanks in advance and
greetings,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.5pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.5pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span
style="font-size:10.5pt;color:black">Gabriele Jost<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span
style="font-size:10.5pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span
style="font-size:10.5pt;font-family:"-webkit-standard",serif;color:black">************************************************************************<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span
style="font-size:10.5pt;font-family:"-webkit-standard",serif;color:black">Gabriele
Jost NASA Ames Research Center<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span
style="font-size:10.5pt;font-family:"-webkit-standard",serif;color:black">Email: <a class="moz-txt-link-abbreviated" href="mailto:Gabriele.Jost@nasa.gov">Gabriele.Jost@nasa.gov</a>
Mail Stop 258-6<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span
style="font-size:10.5pt;font-family:"-webkit-standard",serif;color:black">Work
Phone: (650) 604-0468 Bldg. 258, Rm. 232-4<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span
style="font-size:10.5pt;font-family:"-webkit-standard",serif;color:black">Scientific
& HPC Application P.O. Box 1<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span
style="font-size:10.5pt;font-family:"-webkit-standard",serif;color:black">Development/Optimization
Moffett Field, CA 94035-0001<o:p></o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal"><span
style="font-size:10.5pt;font-family:"-webkit-standard",serif;color:black">************************************************************************</span><o:p></o:p></p>
</div>
</blockquote>
</body>
</html>