Application of the Polytope Model to Functional Programs
We propose an approach to the static parallelization of functional programs. In past work, implicit parallelism in functional programs has mostly been dynamic, i.e., implemented by parallel graph reduction. In a special application domain, scientific computing, a static parallelization method has been successful, which is based on a mathematical execution model, the polytope model. Since scientific computations are usually phrased imperatively, the study of the polytope model has focused on imperative programs. We show that the polytope model also applies to functional programs.
We describe the prerequisites for adapting the polytope model to Haskell, a non-strict functional language. Automatically generated parallel code in a subset of Haskell consists of instructions for an abstract parallel machine (APM). In future work, APM code can be translated further to native code for a parallel machine.
We demonstrate a parallelization in the polytope model on a functional program for LU decomposition.
KeywordsLoop Nest Functional Program Source Program Functional Language Index Space
Unable to display preview. Download preview PDF.
- 1.G. E. Blelloch, S. Chatterjee, J. C. Hardwick, J. Sipelstein, and M. Zagha. Implementation of a portable nested data-parallel language. In Principles and Practices of Parallel Programming, pages 102–111, 1993.Google Scholar
- 2.A. P. W. Böhm, R. R. Oldehoeft, D. C. Cann, and J. T. Feo. SISAL Reference Manual, Language Version 2.0. Colorado State University-Lawrence Livermore National Laboratory, 1992.Google Scholar
- 3.M. C. Chen. Placement and interconnection of systolic processing elements: A new LU-decomposition algorithm. In Proc. IEEE Int. Conf. on Computer Design (ICCD’86), pages 275–281. IEEE Press, 1986.Google Scholar
- 4.M. C. Chen, Y. Choo, and J. Li. Crystal: Theory and pragmatics of generating efficient parallel code. In B. K. Szymanski, editor, Parallel Functional Languages and Compilers, Frontier Series, chapter 7. ACM Press, 1991.Google Scholar
- 7.N. Ellmenreich, M. Griebl, and C. Lengauer. Applicability of the polytope model to functional programs. In H. Kuchen, editor, Proc. 7th Int. Workshop on Functional and Logic Programming. Institut für Wirtschaftsinformatik, Westf. Wilhelms-Universität Münster, Apr. 1998.Google Scholar
- 10.P. Feautrier. Automatic parallelization in the polytope model. InG.-R. Perrin and A.. Darte, editors, The Data Parallel Programming Model, LNCS 1132, pages 79–103. Springer-Verlag, 1996.Google Scholar
- 11.C. F. Gerald. Applied Numerical Analysis. Addison-Wesley, 2nd edition, 1978.Google Scholar
- 13.M. Griebl, C. Lengauer, and S. Wetzel. Code generation in the polytope model. In Proc. Int. Conf. on Parallel Architectures and Compilation Techniques (PACT’98), pages 106–111. IEEE Computer Society Press, 1998.Google Scholar
- 16.F. Irigoin and R. Triolet. Supernode partitioning. In Proceedings of the Fifteenth Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pages 319–329. ACM, 1988.Google Scholar
- 18.C. Lengauer. Loop parallelization in the polytope model. In E. Best, editor, CONCUR’93, Lecture Notes in Computer Science 715, pages 398–416. Springer-Verlag, 1993.Google Scholar
- 19.H.-W. Loidl and P. W. Trinder. Engineering large parallel functional programs. In C. Clack, K. Hammond, and T. Davie, editors, Implementation of Functional Languages (IFL 97), LNCS 1467. Springer-Verlag, September1997.Google Scholar
- 20.R. S. Nikhil. Id (Version 90.1) Reference Manual. CSG-Memo-284-2, MIT, Computation Structures Group, 1991.Google Scholar
- 21.R. S. Nikhil, Arvind, J. Hicks, S. Aditya, L. Augustsson, J.-W. Maessen, and Y. Zhou. pH Language Reference Manual, Version 1.0. CSG-Memo-369, Computation Structures Group, MIT, 1995.Google Scholar
- 23.S. Peyton-Jones and J. Hughes editors. Haskell 98, A Non-Strict, Purely Functional Language, February 1999. http://www.haskell.org/onlinereport.
- 24.R. Plasmeijer and M. v. Eekelen. Functional Programming and Parallel Graph Rewriting. International Computer Science Series. Addison-Wesley, 1993.Google Scholar
- 25.P. Quinton, S. Rajopadhye, and D. Wilde. Derivation of data parallel code from a functional program. In Proc. 9th Int. Parallel Processing Symposium (IPPS’95), pages 766–772. IEEE Computer Society Press, Apr. 1995.Google Scholar
- 26.D. K. Wilde. From alpha to Imperative Code: A Transformational Compiler for an Array Based Functional Language. PhD thesis, Department of Computer Science,Oregon State University, July 1995.Google Scholar