Hacker News new | ask | show | jobs
by alcari 4671 days ago
I haven't dealt much with PyCUDA recently, but Continuum's wrapper is interesting in that it compiles python code (or at least a subset thereof) to run natively on the GPU, via LLVM if I'm not mistaken. As far as I'm aware, PyCUDA only allows Python code to call pre-compiled CUDA kernels.
2 comments

A labmate did some great work similar to Continuum's wrapper and has been continuing on now at NVIDIA: http://copperhead.github.io/ . He basically identified an ML-like subset of Python (sort of like asm.js vs js) and specializes it.

For me, the big surprise is that Copperhead departs from NESL-like flattening transformations (e.g., those used by Data Parallel Haskell.) It's a bit less surprising when you realize the creator is a GPU expert :)

Edit: Vasily, the guy behind the paper advertised in Continuum's blog post, is also from our lab ;-)

Is Bryan still working on Copperhead?

Also, do you know if the DPH folks ever managed to iron out a version of higher order flattening which gives a predictable performance gain?

I think Bryan has been doing a followup to Copperhead, probably easy to just ask him :)

I don't know what you mean by predictable performance. Flattening is a direct transformation and seems simple to reason about on SIMD architectures, though the recent dynamic schedule (work stealing) approach for multicore/distributed has the usual caveats. (I tend to avoid it for HPC.) Given the 10+ year history of the researchers involved, it seems like a slow-but-steady project..

PyCUDA lets you define new kernels by plopping CUDA source as a triple-quoted string in the middle of your Python code. It's not the most elegant thing in the world but you quickly get used to it. It seems on the surface that Continuum's CUDA is essentially the same thing sans-quotations. The semantic level of the "Python" code you're compiling doesn't look significantly more abstract than what you would find in a .cu file. But, it's not fair to judge from a few blog posts, which is why I'm wondering what peoples' actual experiences have been.