Yuanfeng Peng via llvm-dev
2017-Jun-14 17:18 UTC
[llvm-dev] Separate compilation of CUDA code?
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170615/1865e072/attachment.html>
Lorenz Braun via llvm-dev
2017-Jun-19 08:07 UTC
[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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170619/c90cab4e/attachment.html>
Yuanfeng Peng via llvm-dev
2017-Jun-19 09:37 UTC
[llvm-dev] Separate compilation of CUDA code?
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, 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170619/2f66d1d7/attachment.html>