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. -- Larry Gritz lg at larrygritz.com
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>
OK, fine -- an example of MCJIT that sets up for PTX JIT would also be helpful. On Dec 6, 2013, at 12:32 PM, Eli Bendersky <eliben at google.com> wrote:> > You'll have to switch to MCJIT for this purpose. Legacy JIT doesn't emit PTX. > > Eli-- Larry Gritz lg at larrygritz.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131206/57cb47ab/attachment.html>