[LLVMdev] GSoC 2012 Proposal: Automatic GPGPU code generation for llvm

Yabin Hu yabin.hwu at gmail.com
Tue Apr 3 15:44:54 PDT 2012


Hi Hongbin,

2012/4/3 Hongbin Zheng <etherzhhb at gmail.com>

> Instead of compile the LLVM IR to PTX asm string in a ScopPass, you
> can also the improve llc/lli or create new tools to support the code
> generation for Heterogeneous platforms[1], i.e. generate code for more
> than one target architecture at the same time. Something like this is
> not very complicated and had been implemented[2,3] by some people, but
> not available in LLVM mainstream. Implement this could make your GPU
> project more complete.
>
>
> [1]http://en.wikipedia.org/wiki/Heterogeneous_computing
> [2]http://llvm.org/devmtg/2010-11/Villmow-OpenCL.pdf
> [3]http://llvm.org/devmtg/2008-08/Sander_HW-SW-CoDesignflowWithLLVM.pdf


The original motivation we do this, is to provide a jit compiler for our
language frontend (a subset of matlab/octave). I've extended lli to
implement a jit compiler (named gvm) to use polly dynamically. However,
preliminary results show that the overhead is heavy. I choose to offload
the dynamic optimization from the jitting process.  And also putting the
LLVM to PTX asm string pass into polly can provide a kind of one-touch
experience to users.

Please imagine such a user scenario.  When a user open a matlab source file
or a folder contained source files, we can start to compile the source
statically and use polly and opt to optimize it to get the optimal version
llvm ir. Finally, when the user click run or the enter key, we just need
jit the llvm ir as normal one, minimizing the dynamic overhead.

Thanks for the recommendation of the references

best regards,
Yabin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120404/4b3c5682/attachment.html>


More information about the llvm-dev mailing list