I don’t think that there is currently a way to get NVVM IR other than to generate it yourself.
I’m sure someone will correct me if I am wrong.
As an alternative, you can try playing around with the public CLANG compiler frontend to
generate LLVM IR, then use the NVPTX backend in LLVM to generate PTX and target an
Since your program will be in LLVM IR at that point, it should be very similar to NVVM.
I’ve not tried converting it directly into NVVM, but that might work. If not, you can
feed it directly into the NVPTX backend and still get an executable program.
If you already have LLVM 3.4 installed from source you should have the NVPTX backend.
You may also need to install CLANG (see the website for installation instructions).
There is also some documentation for the NVPTX backend.