An adaptive compilation framework for generic data-parallel array programming

Generic array programming abstracts from structural properties of arrays, such as rank (number of axes/dimensions) and shape (number of element along each axis/dimension). This allows for abstract program specifications and, as such, is desirable from a software engineering perspective. However, generic programming in this sense does have an adverse effect on runtime performance, at least when executed naively. Static compiler analyses and transformations aim at reconciling software engineering desires for generic code with runtime performance requirements. However, they are bound to fail whenever the required information is not available until runtime. We propose a compilation framework that overcomes the inherent limitations of static analysis by incrementally adapting a running program to the structural properties of the arrays it operates on. This is achieved by partial recompilation of code at runtime, when all structural properties of arrays are known, and dynamic relinking of the running program with dynamically generated code. We sketch out the general compilation framework architecture and provide some details on implementation issues.

[1]  Clemens Grelck,et al.  Sac - From High-Level Programming with Arrays to Efficient Parallel Execution , 2003, Parallel Process. Lett..

[2]  Dietmar Kreye,et al.  A Compilation Scheme for a Hierarchy of Array Types , 2001, IFL.

[3]  S. Scholz,et al.  Towards Fully Controlled Overloading Across Module Boundaries , 2004 .

[4]  Vasanth Bala,et al.  Dynamo: a transparent dynamic optimization system , 2000, SIGP.

[5]  Clemens Grelck,et al.  SAC—A Functional Array Language for Efficient Multi-threaded Execution , 2006, International Journal of Parallel Programming.

[6]  Clemens Grelck,et al.  Shared memory multiprocessor support for functional array processing in SAC , 2005, J. Funct. Program..

[7]  Julia L. Lawall,et al.  Automatic, template-based run-time specialization: implementation and experimental study , 1998, Proceedings of the 1998 International Conference on Computer Languages (Cat. No.98CB36225).

[8]  Wei-Chung Hsu,et al.  Design and Implementation of a Lightweight Dynamic Optimization System , 2004, J. Instr. Level Parallelism.

[9]  Peter Lee,et al.  Dynamic specialization in the Fabius system , 1998, CSUR.

[10]  Charles Consel,et al.  A general approach for run-time specialization and its application to C , 1996, POPL '96.

[11]  Markus Mock,et al.  A retrospective on: "an evaluation of staged run-time optimizations in DyC" , 2004, SIGP.

[12]  Derek Bruening,et al.  An infrastructure for adaptive dynamic optimization , 2003, International Symposium on Code Generation and Optimization, 2003. CGO 2003..

[13]  Clemens Grelck,et al.  Merging Compositions of Array Skeletons in SAC , 2005, PARCO.

[14]  Alexander V. Shafarenko,et al.  Asynchronous Stream Processing with S-Net , 2010, International Journal of Parallel Programming.