nkavv at physics.auth.gr
2013-Feb-04 15:46 UTC
[LLVMdev] Problem with PTX assembly printing (NVPTX backend)
Hi all, I'm trying to use the newly added (in LLVM 3.2) NVPTX backend for producing PTX (Parallel Thread eXecution) assembly from simple C programs. While using llc with -march for mips and x86 works, -march=nvptx doesn't work. This seems reasonable since I can see that the libLLVMNVPTXAsmPrinter.a library is about 500 bytes (thus empty). However, the strange thing is that AsmPrinter code can be found in the NVPTX backend directory. I would expect that this code would be compiled to the corresponding assembly printing library. Has anyone had similar problems with the NVPTX backend? Shouldn't this code be linked to the AsmPrinter library for NVPTX (already)? BTW I've built LLVM with mingw (strange mixture of gcc-3.4.5 and g++-4.6.1). Native compilation, MIPS backend and other things that i've tested, all work properly. Any help is appreciated. Best regards, Nikolaos Kavvadias
Justin Holewinski
2013-Feb-04 17:52 UTC
[LLVMdev] Problem with PTX assembly printing (NVPTX backend)
On Mon, Feb 4, 2013 at 10:46 AM, <nkavv at physics.auth.gr> wrote:> Hi all, > > I'm trying to use the newly added (in LLVM 3.2) NVPTX backend for > producing PTX (Parallel Thread eXecution) assembly from simple C programs. > > While using llc with -march for mips and x86 works, -march=nvptx doesn't > work. This seems reasonable since I can see that the > libLLVMNVPTXAsmPrinter.a library is about 500 bytes (thus empty). However, > the strange thing is that AsmPrinter code can be found in the NVPTX backend > directory. I would expect that this code would be compiled to the > corresponding assembly printing library. > > Has anyone had similar problems with the NVPTX backend? Shouldn't this > code be linked to the AsmPrinter library for NVPTX (already)? >What do you mean by "doesn't work"? The AsmPrinter library really houses the MCInst printer, which isn't implemented for NVPTX yet. The older assembly printer works just fine. This is transparent to users. The NVPTX target can be used just like MIPS and X86 with llc (and library users). Is llc saying nvptx is an invalid target? If so, you probably built LLVM without NVPTX.> > BTW I've built LLVM with mingw (strange mixture of gcc-3.4.5 and > g++-4.6.1). Native compilation, MIPS backend and other things that i've > tested, all work properly. >Perhaps this "strange mixture" is causing some symbol errors somewhere. Can you post the exact sequence of steps you used to build LLVM, along with the llc command-line that fails for you?> > Any help is appreciated. > > Best regards, > Nikolaos Kavvadias > > > > ______________________________**_________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev> >-- Thanks, Justin Holewinski -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130204/d39e9c47/attachment.html>
nkavv at physics.auth.gr
2013-Feb-04 18:09 UTC
[LLVMdev] Problem with PTX assembly printing (NVPTX backend)
Hi Justin,>> Has anyone had similar problems with the NVPTX backend? Shouldn't this >> code be linked to the AsmPrinter library for NVPTX (already)? > > What do you mean by "doesn't work"? The AsmPrinter library really houses > the MCInst printer, which isn't implemented for NVPTX yet. The older > assembly printer works just fine. This is transparent to users. The NVPTX > target can be used just like MIPS and X86 with llc (and library users). > > Is llc saying nvptx is an invalid target? If so, you probably built LLVM > without NVPTX.I've used -enable-targets=all, and all libLLVMNVPTX*.a libs were produced. However, the AsmPrinter one looks dummy. Further, nvptx appears as a registered target when running llc --version. llc doesn't complain, but just "runs" forever with apparently no output>> BTW I've built LLVM with mingw (strange mixture of gcc-3.4.5 and >> g++-4.6.1). Native compilation, MIPS backend and other things that i've >> tested, all work properly. > > Perhaps this "strange mixture" is causing some symbol errors somewhere. > Can you post the exact sequence of steps you used to build LLVM, along with > the llc command-line that fails for you?My configuration options were: --prefix=/my/local/path/or/so --enable-shared --enable-targets=all --enable-optimized --disable-libffi --disable-debug-runtime --disable-assertions --disable-expensive-checks Following configuration i did the typical make and make install (to a selected path by --prefix. Best regards Nikolaos Kavvadias> > >> >> Any help is appreciated. >> >> Best regards, >> Nikolaos Kavvadias >> >> >> >> ______________________________**_________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev> >> > > > > -- > > Thanks, > > Justin Holewinski >
Apparently Analagous Threads
- [LLVMdev] Problem with PTX assembly printing (NVPTX backend)
- [LLVMdev] Problem with PTX assembly printing (NVPTX backend)
- [LLVMdev] Problem with PTX assembly printing (NVPTX backend)
- [LLVMdev] Problem with PTX assembly printing (NVPTX backend)
- [LLVMdev] Problem with PTX assembly printing (NVPTX backend)