Two for the price of one: a model for parallel and incremental computation

Parallel or incremental versions of an algorithm can significantly outperform their counterparts, but are often difficult to develop. Programming models that provide appropriate abstractions to decompose data and tasks can simplify parallelization. We show in this work that the same abstractions can enable both parallel and incremental execution. We present a novel algorithm for parallel self-adjusting computation. This algorithm extends a deterministic parallel programming model (concurrent revisions) with support for recording and repeating computations. On record, we construct a dynamic dependence graph of the parallel computation. On repeat, we reexecute only parts whose dependencies have changed. We implement and evaluate our idea by studying five example programs, including a realistic multi-pass CSS layout algorithm. We describe programming techniques that proved particularly useful to improve the performance of self-adjustment in practice. Our final results show significant speedups on all examples (up to 37x on an 8-core machine). These speedups are well beyond what can be achieved by parallelization alone, while requiring a comparable effort by the programmer.

[1]  Pramod Bhatotia,et al.  Large-scale Incremental Data Processing with Change Propagation , 2011, HotCloud.

[2]  Jeffrey Overbey,et al.  A type and effect system for deterministic parallel Java , 2009, OOPSLA 2009.

[3]  Stephen N. Freund,et al.  FastTrack: efficient and precise dynamic race detection , 2009, PLDI '09.

[4]  Thomas W. Reps,et al.  A categorized bibliography on incremental computation , 1993, POPL '93.

[5]  Sebastian Burckhardt,et al.  Semantics of Concurrent Revisions , 2011, ESOP.

[6]  Roger Hoover Incremental Graph Evaluation , 1987 .

[7]  Matteo Frigo,et al.  Reducers and other Cilk++ hyperobjects , 2009, SPAA '09.

[8]  Guy E. Blelloch,et al.  Traceable data types for self-adjusting computation , 2010, PLDI '10.

[9]  Gonzalo Navarro,et al.  A guided tour to approximate string matching , 2001, CSUR.

[10]  Raman Srinivas Sundaresh Incremental computation via partial evaluation , 1992 .

[11]  Guy E. Blelloch,et al.  An experimental analysis of self-adjusting computation , 2009 .

[12]  Sebastian Burckhardt,et al.  Concurrent programming with revisions and isolation types , 2010, OOPSLA.

[13]  Emery D. Berger,et al.  Grace: safe multithreaded programming for C/C++ , 2009, OOPSLA 2009.

[14]  Pramod Bhatotia,et al.  Incoop: MapReduce for incremental computations , 2011, SoCC.

[15]  Marek Olszewski,et al.  Kendo: efficient deterministic multithreading in software , 2009, ASPLOS.

[16]  Umut A. Acar,et al.  Parallelism in dynamic well-spaced point sets , 2011, SPAA '11.

[17]  Maurice Herlihy,et al.  Coarse-grained transactions , 2010, POPL '10.

[18]  Allan Heydon,et al.  Caching function calls using precise dependencies , 2000, PLDI '00.

[19]  Philip J. Guo,et al.  Towards Practical Incremental Recomputation for Scientists: An Implementation for the Python Language , 2010, TaPP.

[20]  Guy E. Blelloch,et al.  A Library for Self-Adjusting Computation , 2006, Electron. Notes Theor. Comput. Sci..

[21]  Dan Grossman,et al.  CoreDet: a compiler and runtime system for deterministic multithreaded execution , 2010, ASPLOS XV.

[22]  Umut A. Acar,et al.  Fast Parallel and Adaptive Updates for Dual-Decomposition Solvers , 2011, AAAI.

[23]  Tim Teitelbaum,et al.  Incremental reduction in the lambda calculus , 1990, LISP and Functional Programming.

[24]  William Pugh,et al.  Incremental computation via function caching , 1989, POPL '89.

[25]  Keshav Pingali,et al.  Optimistic parallelism requires abstractions , 2009, CACM.

[26]  Guy E. Blelloch,et al.  Selective memoization , 2003, POPL '03.

[27]  Magnus Carlsson Monads for incremental computing , 2002, ICFP '02.

[28]  Umut A. Acar,et al.  A proposal for parallel self-adjusting computation , 2007, DAMP '07.

[29]  Analysis and caching of dependencies , 1996, ICFP '96.

[30]  R. Hoover Incremental graph evaluation (attribute grammar) , 1987 .

[31]  Alan Edelman,et al.  PetaBricks: a language and compiler for algorithmic choice , 2009, PLDI '09.

[32]  Umut A. Acar Self-adjusting computation: (an overview) , 2009, PEPM '09.

[33]  Thomas W. Reps,et al.  Incremental evaluation for attribute grammars with application to syntax-directed editors , 1981, POPL '81.

[34]  Brandon Lucia,et al.  DMP: deterministic shared memory multiprocessing , 2009, IEEE Micro.

[35]  Yanhong A. Liu,et al.  Static caching for incremental computation , 1998, TOPL.