Executing Parallel Programs on Multi-core GPUs and CPUs with Accelerator V2
Accelerator V2, currently a preview build, is a .NET managed library easing the task of writing data-parallel programs executed on multi-core CPUs and GPUs.
A Microsoft Research project, Accelerator was started back in 2006 as a managed library, the first version being available in 2007. Initially it was written in C# and targeted at GPUs. In the meantime, it was re-written in C++ wrapped in a managed API to be easily accessed from any .NET language.
Accelerator V2 offers API for executing parallel instructions on multi-core GPUs and also multi-core processors. Also, a Field-programmable Gate Array (FPGA) target is currently under development.
Satnam Singh, Senior MS Researcher, has published an F# program demoing Accelerator executing code on a 8-core 64-bit Windows 7 machine in addition to a low-end graphics card. Singh shows how to create a two dimensional convolver in F# and how “this convolver is expressed using Accelerator from F#.” A convolution is
a function which maps a tuple of sequences into a sequence of tuple.
Singh also explains how his piece of code runs in order to execute a convolution. He ends his demonstration with some some remarks how Accelerator helps:
The Accelerator system encourages you to express data-parallel algorithms in terms of whole array operations which leads to efficient implementations for various back ends (“targets”). For example, the discipline of using only whole array operations allows me to make efficient address generator circuits for an experimental FPGA target that I am working on.
Accelerator is quite well suited for writing stencil-style data parallel programs. The expression orientated nature of Accelerator computations make them a nice fit for a functional language like F#. In effect the Accelerator system manifests itself as a domain specific language in F#, C# and C++ (as well as other .NET languages).
Accelerator V2 needs DirectX 11 to run.
Caitie McCaffrey Apr 24, 2015