[LLVMdev] PTX generation examples?

Eli Bendersky eliben at google.com
Fri Dec 6 12:32:45 PST 2013


On Fri, Dec 6, 2013 at 11:34 AM, Larry Gritz <lg at larrygritz.com> wrote:

> I have an app that uses LLVM API calls from C++ to generate IR and JIT it
> for x86 (for subsequent live execution).  I'm still using the old JIT, for
> what it's worth.
>
> I want to modify it (for prototype/experimental purposes for now) to JIT
> PTX (into a big string buffer?).
>
> Docs are sketchy.  I can wade through it and figure it out by trial and
> error, but would be so very happy if somebody could point me to code or
> docs addressing all the issues I'll face: how to find out at runtime if the
> libLLVM I'm linked against can generate PTX, how to change the
> initialization or JIT commands to request PTX rather than x86, anything I
> need to know about differences in the IR I should present, etc.
>
> Any pointers would be greatly appreciated, thanks.
> ___________________


You'll have to switch to MCJIT for this purpose. Legacy JIT doesn't emit
PTX.

Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131206/a1445f73/attachment.html>


More information about the llvm-dev mailing list