Skip to main content

Expression and Loop Libraries for High-Performance Code Synthesis

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4382))

Abstract

To simultaneously provide rapid application development and high performance, developers of scientific and multimedia applications often mix languages, using scripting languages to glue together high-performance components written in compiled languages. While this can be a useful development strategy, it distances application developers from the optimization process while adding complexity to the development tool chain. Recently, we introduced the Synthetic Programming Environment (SPE) for Python, a library for generating and executing machine instructions at run-time. The SPE is an effective platform for optimizing serial and parallel applications without relying on intermediate languages. In this paper, we use the SPE to develop two code generation libraries, one for scalar and vector (SIMD) expression evaluation and another for parallel and high-performance loop generation. Using these libraries, we implement two high performance kernels and demonstrate how to achieve high levels of performance by providing the appropriate abstractions to users. Our results show that scripting languages can be used to generate high-performance code and suggest that providing optimizations as user-level libraries is an effective strategy for managing the complexity of high-performance applications.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Beckmann, O., et al.: Runtime code generation in C++ as a foundation for domain-specific optimisation. In: Lengauer, C., et al. (eds.) Domain-Specific Program Generation. LNCS, vol. 3016, Springer, Heidelberg (2004)

    Google Scholar 

  2. Buck, I., et al.: Brook for GPUs: stream computing on graphics hardware. ACM Trans. Graph. 23(3), 777–786 (2004), doi:10.1145/1015706.1015800

    Article  Google Scholar 

  3. Chandra, R., et al.: Parallel programming in OpenMP. Morgan Kaufmann Publishers Inc., San Francisco (2001)

    Google Scholar 

  4. High Performance Fortran Forum. High performance fortran language specification. version 2.0. Technical report, Rice University (1992)

    Google Scholar 

  5. Gamma, E., et al.: Design Patterns: Elements of Reusable Object-Oriented Software, chapter 4-5, pp. 207–219, 243–257. Addison Wesley Longman, Inc. (1995)

    Google Scholar 

  6. Grant, B., et al.: DyC: an expressive annotation-directed dynamic compiler for C. Theoretical Computer Science 248(1–2), 147–199 (2000)

    Article  MATH  Google Scholar 

  7. Jones, E.: Weave User’s Guide. Enthought (Accessed May 2006)

    Google Scholar 

  8. McCool, M.D., Qin, Z., Popa, T.S.: Shader metaprogramming. In: SIGGRAPH/Eurographics Graphics Hardware Workshop, September, pp. 57–68 (2002)

    Google Scholar 

  9. Mueller, C., Lumsdaine, A.: Runtime synthesis of high-performance code from scripting languages. In: Dynamic Language Symposium (DLS2006), Portland, Orgeon, October (2006)

    Google Scholar 

  10. Grant Olson. PyASM User’s Guide V.0.2 (Accessed May 2006)

    Google Scholar 

  11. Poletto, M., et al.: ‘C and tcc: A language and compiler for dynamic code generation. ACM Trans. on Programming Languages and Systems 21(2), 324–369 (1999)

    Article  Google Scholar 

  12. Quinlan, D.: ROSE: Compiler support for object-oriented frameworks. Parallel Processing Letters 10(2-3), 215–226 (2000)

    Article  Google Scholar 

  13. Rigo, A.: The Ultimate Psyco Guide, 1.5.1 edn. (February 2005)

    Google Scholar 

  14. Veldhuizen, T.L.: Expression templates (Reprinted in C++ Gems, ed. Lippman, S.). C++ Report 7(5), 26–31 (1995)

    Google Scholar 

  15. Yee, K.-P., van Rossum, G.: Pep 234: Iterators. Technical report, Python Software Foundation (2001)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

George Almási Călin Caşcaval Peng Wu

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer Berlin Heidelberg

About this paper

Cite this paper

Mueller, C., Lumsdaine, A. (2007). Expression and Loop Libraries for High-Performance Code Synthesis. In: Almási, G., Caşcaval, C., Wu, P. (eds) Languages and Compilers for Parallel Computing. LCPC 2006. Lecture Notes in Computer Science, vol 4382. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-72521-3_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-72521-3_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-72520-6

  • Online ISBN: 978-3-540-72521-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics