<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi, Doru,</p>
<p>What's the underlying problem and how does clang-ykt fix it? Do we have open reviews that resolve this upstream?</p>
<p>I recall that these functions are provided by libdevice.*.bc and that some renaming needs to happen to get this to work. Also, I recall there being some reviews open on this, but I don't now recall which ones and where.<br>
</p>
<p>Thanks again,</p>
<p>Hal<br>
</p>
<div class="moz-cite-prefix">On 3/19/19 9:22 AM, Gheorghe-Teod Bercea via Openmp-dev wrote:<br>
</div>
<blockquote type="cite" cite="mid:OFD657F2D3.BE3A6EC9-ON002583C2.004E8AA8-852583C2.004EEB73@notes.na.collabserv.com">
<font size="2" face="sans-serif">Hi James,</font><br>
<br>
<font size="2" face="sans-serif">If you're installing the compiler from source please use the following version.</font><br>
<br>
<font size="2" face="sans-serif">This is a mirror of trunk:</font><br>
<br>
<a href="https://github.com/clang-ykt" moz-do-not-send="true"><font size="2" face="sans-serif" color="blue">https://github.com/clang-ykt</font></a><br>
<br>
<font size="2" face="sans-serif">Clone Clang, LLVM and OpenMP runtime.</font><br>
<br>
<font size="2" face="sans-serif" color="#008000">IMPORTANT: For each repo checkout
<b>patched-upstream</b> branch.</font><br>
<br>
<font size="2" face="sans-serif">The Clang <b>patched-upstream</b> branch contains a patch that fixes your problem.</font><br>
<br>
<font size="2" face="sans-serif">Thanks,</font><br>
<br>
<font size="2" face="sans-serif">--Doru</font><br>
<font size="2" face="sans-serif"><br>
</font><br>
<br>
<br>
<br>
<font size="1" face="sans-serif" color="#5f5f5f">From:        </font><font size="1" face="sans-serif">James Price via Openmp-dev
<a class="moz-txt-link-rfc2396E" href="mailto:openmp-dev@lists.llvm.org"><openmp-dev@lists.llvm.org></a></font><br>
<font size="1" face="sans-serif" color="#5f5f5f">To:        </font><font size="1" face="sans-serif"><a class="moz-txt-link-rfc2396E" href="mailto:openmp-dev@lists.llvm.org">"openmp-dev@lists.llvm.org"</a>
<a class="moz-txt-link-rfc2396E" href="mailto:openmp-dev@lists.llvm.org"><openmp-dev@lists.llvm.org></a></font><br>
<font size="1" face="sans-serif" color="#5f5f5f">Date:        </font><font size="1" face="sans-serif">03/19/2019 07:51 AM</font><br>
<font size="1" face="sans-serif" color="#5f5f5f">Subject:        </font><font size="1" face="sans-serif">[Openmp-dev] Math functions when offloading to CUDA devices</font><br>
<font size="1" face="sans-serif" color="#5f5f5f">Sent by:        </font><font size="1" face="sans-serif">"Openmp-dev"
<a class="moz-txt-link-rfc2396E" href="mailto:openmp-dev-bounces@lists.llvm.org">
<openmp-dev-bounces@lists.llvm.org></a></font><br>
<hr noshade="noshade">
<br>
<br>
<br>
<tt><font size="2">Hi,<br>
<br>
One of the issues we frequently hit when using the Clang OpenMP implementation on NVIDIA GPUs is the lack of support for many common math functions (e.g. cos/sin). Trying to use them produces errors of the form:<br>
<br>
   fatal error: error in backend: Cannot select: 0x47b33a0: f64 = fsin 0x47b2f90<br>
<br>
Translating math functions in target regions is listed as a feature that isn’t supported yet, but is this something that is expected to be implemented soon? Failing that, if someone can describe the desired approach to implement this I might be able to take
 a stab at getting some initial patches together (depending on the complexity).<br>
<br>
Some functions such as sqrt work fine, but I assume this is because they map directly to NVVM intrinsics.<br>
<br>
Cheers,<br>
<br>
James<br>
<br>
_______________________________________________<br>
Openmp-dev mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:Openmp-dev@lists.llvm.org">Openmp-dev@lists.llvm.org</a><br>
</font></tt><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev" moz-do-not-send="true"><tt><font size="2">https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</font></tt></a><tt><font size="2"><br>
<br>
</font></tt><br>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Openmp-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Openmp-dev@lists.llvm.org">Openmp-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>