Coconut Case Study

Coconut (COde CONstructing User Tool) is an experiment in both programming language and compiler design embedded in the functional programming language Haskell. It has been used to both generate C code and scheduled assembly code for Cell/B.E. SPU libraries, achieving four-fold improvements in speed over optimized C code using intrinsic functions. It is our long-term goal to show that such high- performance software can be developed in a way which exposes user- directed optimization in an inherently safe way, which will facilitate provably correct implementations.

In this talk, I will use our experience with a complete scientific application---three-dimensional, nonuniform, iterative Magnetic Resonance image reconstruction---to discuss the challenges in developing a declarative programming language which nevertheless exposes aspects of control flow to the user to enable high levels of optimization. In particular, I will explain how we have had to modify our thinking, to present a more conventional view of the multi-loop first proposed at CASCON 2007 than the original view which was much closer to the hypergraph intermediate language used in Coconut, and how that led to modifications to our scheduling algorithm Explicitly Staged Software Pipelining.


Greg Steffan
Last modified: Wed Aug 26 18:20:42 EDT 2009