<div dir="ltr">Hi Simeon,<div><br></div><div>Thanks! that worked.</div><div><br></div><div>Cheers,</div><div>Navdeep</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 18 Feb 2021 at 18:43, Simeon Ehrig <<a href="mailto:s.ehrig@hzdr.de">s.ehrig@hzdr.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hi Navdeep,</p>
<p>you can emit the llvm IR code of the device side with `clang -S
-emit-llvm --cuda-gpu-arch=sm_75 --cuda-device-only <a href="http://code.cu" target="_blank">code.cu</a> -o
code.ll`</p>
<p>and with `clang -S --cuda-gpu-arch=sm_75 --cuda-device-only
<a href="http://code.cu" target="_blank">code.cu</a> -o code.ptx` you can emit the ptx code.</p>
<p>Cheers,<br>
Simeon<br>
</p>
<div>On 2/18/21 11:35 AM, Navdeep Kumar via
cfe-dev wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi all,
<div><br>
</div>
<div>Does anyone know how to emit LLVM IR for the kernel of a
CUDA C++ code? `clang++ -emit-llvm --cuda-gpu-arch=sm_75 <a href="http://x.cu/" target="_blank">x.cu</a>`
somehow only emits code for the host side code.<br>
</div>
<div><br>
</div>
<div>Thanks,<br>
Navdeep</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
cfe-dev mailing list
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<pre cols="72">--
Simeon Ehrig
Institut für Strahlenphysik
Helmholtz-Zentrum Dresden - Rossendorf e.V. (HZDR)
Bautzner Landstr. 400 | 01328 Dresden | Deutschland
Tel: +49 (0) 351 260 2974
<a href="http://www.hzdr.de" target="_blank">http://www.hzdr.de</a>
Vorstand: Prof. Dr. Sebastian M. Schmidt, Dr. Diana Stiller
Vereinsregister: VR 1693 beim Amtsgericht Dresden
Simeon Ehrig
Institute of Radiation Physics
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
Bautzner Landstr. 400 | 01328 Dresden | Germany
Phone: +49 351 260 2974
<a href="http://www.hzdr.de" target="_blank">http://www.hzdr.de</a>
Board of Directors: Prof. Dr. Sebastian M. Schmidt, Dr. Diana Stiller
Company Registration Number VR 1693, Amtsgericht Dresden</pre>
</div>
</blockquote></div>