<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<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 code.cu -o
code.ll`</p>
<p>and with `clang -S --cuda-gpu-arch=sm_75 --cuda-device-only
code.cu -o code.ptx` you can emit the ptx code.</p>
<p>Cheers,<br>
Simeon<br>
</p>
<div class="moz-cite-prefix">On 2/18/21 11:35 AM, Navdeep Kumar via
cfe-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGTEkcRGkp=4HYZWUhNmQvDLP8d5rqFTgeqGfWi3rFkqJAcBEg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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" moz-do-not-send="true">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 class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" 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 class="moz-txt-link-freetext" href="http://www.hzdr.de">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 class="moz-txt-link-freetext" href="http://www.hzdr.de">http://www.hzdr.de</a>
Board of Directors: Prof. Dr. Sebastian M. Schmidt, Dr. Diana Stiller
Company Registration Number VR 1693, Amtsgericht Dresden</pre>
</body>
</html>