<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Thanks for the link to this hack!<br>
I have thought about doing something similar. But since the
reallocatable device code is only nice to have for me i don't want
to put to much work in it.<br>
<br>
Maybe its possible to generate IR with clang, hand it over to the
libnvvm backend and get a fatbinary which then can be included in
the host code compiled by clang. I think this would need the least
amount of hacking to being able to use the rdc flag.<br>
<br>
Regards<br>
Lorenz<br>
<br>
<div class="moz-cite-prefix">Am 19.06.17 um 11:37 schrieb Yuanfeng
Peng:<br>
</div>
<blockquote type="cite"
cite="mid:tencent_69DEB73019D4252032FBF5B5@qq.com">
<div>Hi Lorenz,</div>
<div><br>
</div>
<div>Thanks for letting me know! It seems that relocatable device
code for CUDA isn't being taken care of by anyone in the LLVM
developers community now, so I ended up with a little hacking
with nvcc to achieve my goal. I found the approach on
github: <a class="moz-txt-link-freetext" href="https://github.com/apc-llc/nvcc-llvm-ir">https://github.com/apc-llc/nvcc-llvm-ir</a> . Basically, I
used this method to get the unoptimized nvvm IR from nvcc( more
precisely, cicc), then invoked my own llvm pass on it to do the
transformation I need, and feed the transformed IR back to
nvcc's libnvvm backend. This way, nvcc still takes care of the
compilation and linking of device code.</div>
<div><br>
</div>
<div>I'm not sure whether this can be useful for your problem as
well, but I think I should let you know. Hope it helps!</div>
<div><br>
</div>
<div>Thanks!</div>
<div>Yuanfeng </div>
<div>
<div><br>
</div>
<div><br>
</div>
<div style="font-size: 12px;font-family: Arial
Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div>
<div style="font-size: 12px;background:#efefef;padding:8px;">
<div><b>From: </b> "via
llvm-dev";<a class="moz-txt-link-rfc2396E" href="mailto:llvm-dev@lists.llvm.org"><llvm-dev@lists.llvm.org></a>;</div>
<div><b>Send time:</b> Monday, Jun 19, 2017 4:07 PM</div>
<div><b>To:</b> "llvm-dev"<a class="moz-txt-link-rfc2396E" href="mailto:llvm-dev@lists.llvm.org"><llvm-dev@lists.llvm.org></a>; <wbr></div>
<div><b>Subject: </b> Re: [llvm-dev] Separate compilation of
CUDA code?</div>
</div>
<div><br>
</div>
Hi Yuanfeng,<br>
<br>
i have asked about this a few days ago. [0]<br>
As far as i know there is no such flag available and i did not
find any information whether this feature will be supported.
However i would be very interested on any updates on this
feature.<br>
<br>
Kind Regards<br>
Lorenz<br>
<p>[0] <a class="moz-txt-link-freetext"
href="http://lists.llvm.org/pipermail/llvm-dev/2017-June/113921.html"
moz-do-not-send="true">http://lists.llvm.org/pipermail/llvm-dev/2017-June/113921.html</a><br>
</p>
<br>
<div class="moz-cite-prefix">Am 14.06.17 um 19:18 schrieb
Yuanfeng Peng via llvm-dev:<br>
</div>
<blockquote type="cite"
cite="mid:tencent_080927ED5B450FBD38D58A50@qq.com">
<div>Hi,</div>
<div><br>
</div>
<div>I wonder whether the current version of LLVM supports
separate compilation and linking of device code, i.e., is
there a flag analogous to nvcc's --relocatable-device-code
flag? If not, is there any plan to support this?</div>
<div><br>
</div>
<div>Thanks!</div>
<div>Yuanfeng Peng </div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org" moz-do-not-send="true">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" moz-do-not-send="true">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Lorenz Braun
Research Associate
Institute of Computer Engineering (ZITI)
B6, 26, Building B, Office B2.20
68131 Mannheim
Phone: +49-621-181-2696
<a class="moz-txt-link-abbreviated" href="mailto:lorenz.braun@ziti.uni-heidelberg.de" moz-do-not-send="true">lorenz.braun@ziti.uni-heidelberg.de</a></pre>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Lorenz Braun
Research Associate
Institute of Computer Engineering (ZITI)
B6, 26, Building B, Office B2.20
68131 Mannheim
Phone: +49-621-181-2696
<a class="moz-txt-link-abbreviated" href="mailto:lorenz.braun@ziti.uni-heidelberg.de">lorenz.braun@ziti.uni-heidelberg.de</a></pre>
</body>
</html>