Changes between Version 1 and Version 2 of DataParallel/Design


Ignore:
Timestamp:
Jan 27, 2009 11:41:57 AM (5 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DataParallel/Design

    v1 v2  
     1 
    12== High-level design of nested data parallelism in GHC == 
    23 
    3 The NDP part of the compiler is made up of two components: a parallel array [wiki:DataParallel/Library library] and [wiki:DataParallel/CodeVectorisation code vectorisation], a transformation which eliminates nested parallelism. The library defines the type of parallel arrays, supporting operations and typeclasses and a loop fusion framework. Crucially, the actual representation of a parallel array is determined by the type of its elements. For instance, `[:Int:]` is just an array of unboxed `Int`s whereas `[:(a,b):]` is, essentially, a pair of arrays `([:a:],[:b:])`. [wiki:TypeFunctions Associated data types and type synonyms] allow us to implement this entirely in the library, without having to modify the compiler. In contrast to this, [wiki:DataParallel/CodeVectorisation code vectorisation] is implemented as a Core-to-Core transformation in GHC. In order to be able to deal with higher-order functions in parallel contexts, we also perform [wiki:DataParallel/ClosureConversion closure conversion]; it is not entirely clear yet whether we want to do it together with [wiki:DataParallel/CodeVectorisation code vectorisation] or have two separate passes.  
     4The NDP part of the compiler is made up of two components: a parallel array [wiki:DataParallel/Library library] and [wiki:DataParallel/CodeVectorisation code vectorisation], a transformation which eliminates nested parallelism. The library defines the type of parallel arrays, supporting operations and typeclasses and a loop fusion framework. Crucially, the actual representation of a parallel array is determined by the type of its elements. For instance, `[:Int:]` is just an array of unboxed `Int`s whereas `[:(a,b):]` is, essentially, a pair of arrays `([:a:],[:b:])`. [wiki:TypeFunctions Associated data types and type synonyms] allow us to implement this entirely in the library, without having to modify the compiler. In contrast to this, [wiki:DataParallel/CodeVectorisation code vectorisation] is implemented as a Core-to-Core transformation in GHC. In order to be able to deal with higher-order functions in parallel contexts, we also perform [wiki:DataParallel/ClosureConversion closure conversion] as part of [wiki:DataParallel/CodeVectorisation code vectorisation].  
    45 
    56This is a rough sketch of how the various components fit into the compiler pipeline: