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

Tobias Grosser tobias at grosser.es
Wed Apr 4 04:49:06 PDT 2012


On 04/03/2012 03:13 PM, Hongbin Zheng wrote:
> Hi Yabin,
>
> 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.

I agree with ether that we should ensure as much work as possible is 
done within generic, not Polly specific code.

In terms of heterogeneous code generation the approach Yabin proposed 
seems to work, but we should discuss other approaches. For the moment,
I believe his proposal is very similar the model of OpenCL and CUDA. He 
splits the code into host and kernel code. The host code is directly 
compiled to machine code by the existing tools (clang/llc). The kernel 
code is stored as a string and only at execution time it is compiled to 
platform specific code.

Are there any other approaches that could be taken? What specific 
heterogeneous platform support would be needed. At the moment, it seems 
to me we actually do not need too much additional support.

Cheers
Tobi



More information about the llvm-dev mailing list