archives

Accelerating Haskell Array Codes with Multicore GPUs

So, I stumbled on to a rather pleasant surprise today.

http://www.cse.unsw.edu.au/~chak/papers/CKLM+10.html

"
Abstract
Current GPUs are massively parallel multicore processors optimised for workloads with a large degree of SIMD parallelism. Good performance requires highly idiomatic programs, whose development is work intensive and requires expert knowledge.

To raise the level of abstraction, we propose a domain-specific high-level language of array computations that captures appropriate idioms in the form of collective array operations. We embed this purely functional array language in Haskell with an online code generator for NVIDIA's CUDA GPGPU programming environment. We regard the embedded language's collective array operations as algorithmic skeletons; our code generator instantiates CUDA implementations of those skeletons to execute embedded array programs.

This paper outlines our embedding in Haskell, details the design and implementation of the dynamic code generator, and reports on initial benchmark results. These results indicate that we can compete with moderately optimised native CUDA code, while enabling much simpler source programs.
"

I've been waiting for this paper for a pretty long time. I've known about the project for a while, but sadly had not seen too much on the implementation side of things. But as of a few weeks ago, now http://hackage.haskell.org/package/accelerate-0.8.1.0 has a CUDA backend (!!). I'm really excited, as I've been
waiting for a nice Haskell GPGPU binding for a while, and now, a usable proof of concept is here. What do you all think of it? Any interesting killer apps in mind? I'm personally thinking of some fun music programming stuff--the timing of this is excellent, you see, as the realtime kernel in Ubuntu Lucid is now usable enough to work pretty stably with my Firewire audio interface, so I have started playing around with all the lovely free Linux audio software. However, because of this recent revelation, I may have to start work on a GPGPU accelerated version of a synthesizer module for Haskore. But, I digress. Discuss!