<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 11, 2015 at 10:31 AM, Mueller-Roemer, Johannes Sebastian <span dir="ltr"><<a href="mailto:Johannes.Sebastian.Mueller-Roemer@igd.fraunhofer.de" target="_blank">Johannes.Sebastian.Mueller-Roemer@igd.fraunhofer.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="DE" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I started experimenting with the NVPTX backend and have been successful so far, however I ran into two issues:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p><u></u><span lang="EN-US"><span>1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span lang="EN-US">How do I access createNVVMReflectPass properly? The header in which it is defined is not installed along with other headers when (using CMake, if that matters), so I am currently declaring it directly in my
code.</span></p></div></div></blockquote><div>Yes, that is an unfortunate part of the current implementation. I've been thinking of how to address this better. For now, just declaring the init function prototype in your source file is fine.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="DE" link="blue" vlink="purple"><div><p><span lang="EN-US"><u></u><u></u></span></p>
<p><u></u><span lang="EN-US"><span>2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span lang="EN-US">When using mathematical functions like powf or sqrtf, I need to use __nv_powf and __nv_sqrtf from libdevice. This works fine but unlike powf, expressions like powf(x, 0.5f), where .5f is constant are not optimized/strength
reduced.<br>
Is there any way to call powf, then optimize then rename these calls later on (and probably optimize again…)? Or is there a better approach?</span></p></div></div></blockquote><div>How are you linking with libdevice? The recommended way is to link the IR before calling any optimization passes to allow the optimizers to see the implementation. Or are you referring to LLVM not understanding that __nv_powf is a "built-in" function like libm's powf?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="DE" link="blue" vlink="purple"><div><p><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Johannes<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span>--<u></u><u></u></span></p>
<p class="MsoNormal"><span>Johannes S. Mueller-Roemer, MSc<u></u><u></u></span></p>
<p class="MsoNormal"><span>Wiss. Mitarbeiter - Interactive Engineering Technologies (IET)<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Fraunhofer-Institut für Graphische Datenverarbeitung IGD<u></u><u></u></span></p>
<p class="MsoNormal"><span>Fraunhoferstr. 5 | 64283 Darmstadt | Germany<u></u><u></u></span></p>
<p class="MsoNormal"><span>Tel <a href="tel:%2B49%206151%20155-606" value="+496151155606" target="_blank">+49 6151 155-606</a> | Fax <a href="tel:%2B49%206151%20155-139" value="+496151155139" target="_blank">+49 6151 155-139</a><u></u><u></u></span></p>
<p class="MsoNormal"><span><a href="mailto:johannes.mueller-roemer@igd.fraunhofer.de" target="_blank">johannes.mueller-roemer@igd.fraunhofer.de</a> | <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.igd.fraunhofer.de&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=ZJH8Qb0NlXeEmzeTwmG05_I_oCvKszSTrrFM25PkxNQ&s=SQv6P__RCpY-tF3Wmg-JAtPY-pGJJCoXUIbfWXl9ZSk&e=" target="_blank">www.igd.fraunhofer.de</a><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div></div>
</div></div>