<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 06/19/2017 04:37 AM, Yuanfeng Peng
      via llvm-dev wrote:<br>
    </div>
    <blockquote cite="mid:tencent_69DEB73019D4252032FBF5B5@qq.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <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,</div>
    </blockquote>
    <br>
    As I understand it, this is not exactly true. Relocatable device
    code is necessary for OpenMP offloading support, and essentially
    works in that context, we just don't currently have an option to
    enable it in CUDA mode. Hopefully, some of the folks from IBM who
    have been working on this can comment.<br>
    <br>
     -Hal<br>
    <br>
    <blockquote cite="mid:tencent_69DEB73019D4252032FBF5B5@qq.com"
      type="cite">
      <div> 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 moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.llvm.org/pipermail/llvm-dev/2017-June/113921.html">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 moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">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 moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:lorenz.braun@ziti.uni-heidelberg.de">lorenz.braun@ziti.uni-heidelberg.de</a></pre>
      </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">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </body>
</html>