PyStream

Graphics processing units (GPUs) have tremendous computing power, but are hard to program. Most GPU programming languages are extremely low level; no one has run a general-purpose high-level language on a GPU. PyStream shows how to run Python shaders on a GPU for real-time rendering. Shaders written in Python run 30,000 - 300,000 times faster than on a CPU, partly because GPUs are designed to run shaders and partly because of the design of PyStream, a Python compiler for the GPU. PyStream advances the state-of-the-art in pointer analysis for Python, eliminates abstraction overhead for Python, maps a language with references onto an architecture that does not support references, and uses a single code base to program both the CPU and GPU. PyStream points the way for running high-level languages on specialized architectures.

The bottom line is that high-level languages do not need to be slow. Counterintuitively, high-level languages have the potential be faster than low-level languages in many situations. High-level languages can offer an aggressive compiler more latitude in optimizing a program because fewer low-level details are explicitly specified.

More information can be found in my dissertation, the source code and my blog.

Ċ
Nick Bray,
Apr 5, 2011, 9:57 PM
Comments