[llvm-dev] Separate compilation of CUDA code?

Hal Finkel via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 19 08:50:49 PDT 2017


On 06/19/2017 04:37 AM, Yuanfeng Peng via llvm-dev wrote:
> Hi Lorenz,
>
> 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,

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.

  -Hal

> so I ended up with a little hacking with nvcc to achieve my goal.  I 
> found the approach on github: https://github.com/apc-llc/nvcc-llvm-ir 
> .  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.
>
> 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!
>
> Thanks!
> Yuanfeng
>
>
> ------------------ Original ------------------
> *From: * "via llvm-dev";<llvm-dev at lists.llvm.org>;
> *Send time:* Monday, Jun 19, 2017 4:07 PM
> *To:* "llvm-dev"<llvm-dev at lists.llvm.org>;
> *Subject: * Re: [llvm-dev] Separate compilation of CUDA code?
>
> Hi Yuanfeng,
>
> i have asked about this a few days ago. [0]
> 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.
>
> Kind Regards
> Lorenz
>
> [0] http://lists.llvm.org/pipermail/llvm-dev/2017-June/113921.html
>
>
> Am 14.06.17 um 19:18 schrieb Yuanfeng Peng via llvm-dev:
>> Hi,
>>
>> 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?
>>
>> Thanks!
>> Yuanfeng Peng
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
> -- 
> Lorenz Braun
> Research Associate
> Institute of Computer Engineering (ZITI)
> B6, 26, Building B, Office B2.20
> 68131 Mannheim
>
> Phone: +49-621-181-2696
> lorenz.braun at ziti.uni-heidelberg.de
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170619/89e9bcbd/attachment.html>


More information about the llvm-dev mailing list