Hugh Perkins via llvm-dev
2016-Sep-26 14:27 UTC
[llvm-dev] How to use llvm to compile CUDA to IR?
How to use llvm to compile CUDA to IR? I have got as far as llvm to ptx, ie/eg: clang++-3.8 -I/usr/local/cuda-7.5/include llvm-sample.cu -S -o llvm-sample.ll (except the ".ll" is actually ptx...) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160926/2f1e62c6/attachment.html>
Hugh Perkins via llvm-dev
2016-Sep-26 23:11 UTC
[llvm-dev] How to use llvm to compile CUDA to IR?
adding `-emit-llvm` causes ir to be emitted, instead of ptx. However, it's only emitting the host-side ir, and I need device side ir. (Well... I need both, but device side is pretty high priority...). Currently I'm doing: clang++-3.8 -I/usr/local/cuda-7.5/include llvm-sample.cu -emit-llvm -S -o llvm-sample.ll How to emit device-side ir? On Mon, Sep 26, 2016 at 3:27 PM, Hugh Perkins <hughperkins at gmail.com> wrote:> How to use llvm to compile CUDA to IR? > > I have got as far as llvm to ptx, ie/eg: > > clang++-3.8 -I/usr/local/cuda-7.5/include llvm-sample.cu -S -o > llvm-sample.ll > > (except the ".ll" is actually ptx...) > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160927/33561d02/attachment.html>