On Fri, Sep 19, 2014 at 5:45 AM, Håvard Wormdal Høiby
<
havard...@gmail.com> wrote:
> So after a bit of research into POCL I see this as an interesting project to
> adapt. But Erik, in your paper[1] on page 10 the footnote that GPU support
> is not in place at this time. As the main focus of my project is GPU, this
> might be a show stopper for me. Any new developments?
There are two parts to supporting GPUs. One is generation code and
providing the built-in functions, and doing so with reasonable
efficiency. This pocl should already handle, thanks to LLVM as
back-end. The other is the very system specific mechanisms to transfer
code and data to and from the device, and run it there. This can
easily be added to pocl -- pocl supports three or four different
device types -- but there seems to be currently no volunteer e.g. for
Nvidia GPUs, Intel MICs, or other devices.
Since you use the term "GPU" without qualification, I assume you are
looking at Nvidia GPUs. In this case, one approach could be to make
LLVM emit PTX (can it do that?), and then use CUDA to run this PTX
code (is there an API for this)?
In essence, the idea is to convert Julia code to GPU-optimized LLVM
code instead of OpenCL C. LLVM code is system specific, and one needs
to perform certain transformations/optimizations to make code run
efficiently on a GPU (the code needs to be vectorized). I am hoping
that there is a rather straightforward way from having this LLVM code,
to running it on a GPU, but I'm not familiar enough with Nvidia's
design to be sure.
-erik