skip to main content
10.1145/2620678.2620690acmotherconferencesArticle/Chapter ViewAbstractPublication PagesiflConference Proceedingsconference-collections
research-article

Next Generation Asynchronous Adaptive Specialization for Data-Parallel Functional Array Processing in SAC: Accelerating the Availability of Specialized High Performance Code

Authors Info & Claims
Published:28 August 2013Publication History

ABSTRACT

Data-parallel processing of multi-dimensional functional/immutable arrays is characterized by a fundamental trade-off between software engineering principles on the one hand and runtime performance concerns on the other hand. Whereas the former demand code to be written in a generic style abstracting from structural properties of arrays as much as possible, the latter require an optimizing compiler to have as much information on the very same structural properties available at compile time. Asynchronous adaptive specialization of generic code to specific data to be processed at application runtime has proven to be an effective way to reconcile these contrarian demands.

In this paper we revisit asynchronous adaptive specialization in the context of the functional data-parallel array language SaC. We provide a comprehensive analysis of its strengths and weaknesses and propose improvements for its design and implementation. These improvements are primarily concerned with making specializations available to running applications as quickly as possible. We propose four complementary measures to this effect. Bulk adaptive specialization speculatively waits for future specialization requests to materialize instead of addressing each request individually. Prioritized adaptive specialization aims at selecting the most profitable specializations first. Parallel adaptive specialization reserves multiple cores for specialization and, thus, computes multiple specializations simultaneously. Last but not least, persistent adaptive specialization preserves specializations across independent program runs and even across unrelated applications.

References

  1. M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney. Adaptive optimization in the Jalapeño JVM. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'00), Minneapolis, USA. ACM, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney. A survey of adaptive optimization in virtual machines. Proceedings of the IEEE, 93(2), 2005.Google ScholarGoogle ScholarCross RefCross Ref
  3. J. Aycock. A brief history of just-in-time. ACM Computing Surveys, 35(2):97--113, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. R. Bernecky, S. Herhut, and S.-B. Scholz. Symbiotic Expressions. In M. T. Morazan and S.-B. Scholz, editors, Implementation and Application of Functional Languages, 21st International Symposium, IFL 2009, South Orange, NJ, USA, number 6041 in Lecture Notes in Computer Science, pages 107--126. Springer, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Diogo and C. Grelck. Towards heterogeneous computing without heterogeneous programming. In K. Hammond and H. Loidl, editors, Trends in Functional Programming, 13th Symposium, TFP 2012, St.Andrews, UK, volume 7829 of Lecture Notes in Computer Science, pages 279--294. Springer, 2013.Google ScholarGoogle Scholar
  6. A. Falkoff and K. Iverson. The Design of APL. IBM Journal of Research and Development, 17(4):324--334, 1973. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. C. Grelck. Implicit Shared Memory Multiprocessor Support for the Functional Programming Language SAC --- Single Assignment C. PhD thesis, Institute of Computer Science and Applied Mathematics, University of Kiel, Germany, 2001. Logos Verlag, Berlin, 2001.Google ScholarGoogle Scholar
  8. C. Grelck. Shared memory multiprocessor support for functional array processing in SAC. Journal of Functional Programming, 15(3):353--401, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. Grelck. Single Assignment C (SAC): high productivity meets high performance. In V. Zsók, Z. Horváth, and R. Plasmeijer, editors, 4th Central European Functional Programming Summer School (CEFP'11), Budapest, Hungary, volume 7241 of Lecture Notes in Computer Science, pages 207--278. Springer, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. Grelck and S.-B. Scholz. Classes and Objects as Basis for I/O in SAC. In T. Johnsson, editor, 7th International Workshop on Implementation of Functional Languages (IFL'95), Båstad, Sweden, pages 30--44. Chalmers University of Technology, Gothenburg, Sweden, 1995.Google ScholarGoogle Scholar
  11. C. Grelck and S.-B. Scholz. Axis Control in SAC. In R. Peña and T. Arts, editors, Implementation of Functional Languages, 14th International Workshop (IFL'02), Madrid, Spain, Revised Selected Papers, volume 2670 of Lecture Notes in Computer Science, pages 182--198. Springer, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. C. Grelck and S.-B. Scholz. SAC --- From High-level Programming with Arrays to Efficient Parallel Execution. Parallel Processing Letters, 13(3):401--412, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  13. C. Grelck and S.-B. Scholz. SAC: A functional array language for efficient multithreaded execution. International Journal of Parallel Programming, 34(4):383--427, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. Grelck and S.-B. Scholz. Merging compositions of array skeletons in SAC. Journal of Parallel Computing, 32(7+8):507--522, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. C. Grelck and S.-B. Scholz. SAC: Off-the-Shelf Support for Data-Parallelism on Multicores. In N. Glew and G. Blelloch, editors, 2nd Workshop on Declarative Aspects of Multicore Programming (DAMP'07), Nice, France, pages 25--33. ACM Press, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C. Grelck, T. van Deurzen, S. Herhut, and S.-B. Scholz. An Adaptive Compilation Framework for Generic Data-Parallel Array Programming. In 15th Workshop on Compilers for Parallel Computing (CPC'10). Vienna University of Technology, Vienna, Austria, 2010.Google ScholarGoogle Scholar
  17. C. Grelck, T. van Deurzen, S. Herhut, and S.-B. Scholz. Asynchronous Adaptive Optimisation for Generic Data-Parallel Array Programming. Concurrency and Computation: Practice and Experience, 24(5):499--516, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. Guo, J. Thiyagalingam, and S.-B. Scholz. Breaking the gpu programming barrier with the auto-parallelising SAC compiler. In 6th Workshop on Declarative Aspects of Multicore Programming (DAMP'11), Austin, USA, pages 15--24. ACM Press, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. G. Hansen. Adaptive Systems for the Dynamic Run-Time Optimization of Programs. PhD thesis, Carnegie-Mellon University, Pittsburgh, USA, 1974. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. International Standards Organization. Programming Language APL, Extended. ISO N93.03, ISO, 1993.Google ScholarGoogle Scholar
  21. K. Iverson. Programming in J. Iverson Software Inc., Toronto, Canada, 1991.Google ScholarGoogle Scholar
  22. M. Jenkins. Q'Nial: A Portable Interpreter for the Nested Interactive Array Language Nial. Software Practice and Experience, 19(2):111--126, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Jenkins and J. Glasgow. A Logical Basis for Nested Array Data Structures. Computer Languages Journal, 14(1):35--51, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. J. Kim, W.-C. Hsu, and P.-C. Yew. Cobra: An adaptive runtime binary optimization framework for multithreaded applications. In International Conference on Parallel Processing (ICPP 2007), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. D. Kreye. A Compilation Scheme for a Hierarchy of Array Types. In T. Arts and M. Mohnen, editors, Implementation of Functional Languages, 13th International Workshop (IFL'01), Stockholm, Sweden, Selected Papers, volume 2312 of Lecture Notes in Computer Science, pages 18--35. Springer, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. J. Lu, H. Chen, R. Fu, W.-C. Hsu, B. Othmer, P.-C. Yew, and D.-Y. Chen. The performance of runtime data cache prefetching in a dynamic optimization system. In 36th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO-36), San Diego, USA. IEEE, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. S.-B. Scholz. With-loop-folding in SAC --- Condensing Consecutive Array Operations. In C. Clack, T. Davie, and K. Hammond, editors, Implementation of Functional Languages, 9th International Workshop (IFL'97), St. Andrews, UK, Selected Papers, volume 1467 of Lecture Notes in Computer Science, pages 72--92. Springer, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. K. Streit, C. Hammacher, A. Zeller, and S. Hack. Sambamba: A run-time system for online adaptive parallelization. In M. O'Boyle, editor, 21st International Conference on Compiler Construction (CC'12), Tallinn, Estonia, volume 7210 of Lecture Notes in Computer Science, pages 240--243. Springer, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. M. Voss and R. Eigenmann. A framework for remote dynamic program optimization. In ACM SIGPLAN Workshop on Dynamic and Adaptive Compilation and Optimization (DYNAMO'00), Boston, USA, pages 32--40. ACM, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. M. Voss and R. Eigenmann. High-level adaptive program optimization with ADAPT. In ACM Symposium on Principles and Practice of Parallel Programming (PPoPP'01), Snowbird, USA, pages 93--102. ACM, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. A. Šinkarovs, S. Scholz, R. Bernecky, R. Douma, and C. Grelck. SAC/C formulations of the all-pairs N-body problem and their performance on SMPs and GPGPUs. Concurrency and Computation: Practice and Experience, 26(4):952--971, 2014. DOI: 10.1002/cpe.3078. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Next Generation Asynchronous Adaptive Specialization for Data-Parallel Functional Array Processing in SAC: Accelerating the Availability of Specialized High Performance Code

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Other conferences
              IFL '13: Proceedings of the 25th symposium on Implementation and Application of Functional Languages
              August 2013
              146 pages
              ISBN:9781450329880
              DOI:10.1145/2620678

              Copyright © 2013 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 28 August 2013

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article
              • Research
              • Refereed limited

              Acceptance Rates

              Overall Acceptance Rate19of36submissions,53%

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader