skip to main content
research-article

Compiling a high-level language for GPUs: (via language support for architectures and compilers)

Published:11 June 2012Publication History
Skip Abstract Section

Abstract

Languages such as OpenCL and CUDA offer a standard interface for general-purpose programming of GPUs. However, with these languages, programmers must explicitly manage numerous low-level details involving communication and synchronization. This burden makes programming GPUs difficult and error-prone, rendering these powerful devices inaccessible to most programmers.

We desire a higher-level programming model that makes GPUs more accessible while also effectively exploiting their computational power. This paper presents features of Lime, a new Java-compatible language targeting heterogeneous systems, that allow an optimizing compiler to generate high quality GPU code. The key insight is that the language type system enforces isolation and immutability invariants that allow the compiler to optimize for a GPU without heroic compiler analysis.

Our compiler attains GPU speedups between 75% and 140% of the performance of native OpenCL code.

References

  1. Parboil Benchmark Suite. http://impact.crhc.illinois.edu/parboil.php, 2011.Google ScholarGoogle Scholar
  2. J. Auerbach, D. F. Bacon, P. Cheng, and R. Rabbah. Lime: a Java-compatible and synthesizable language for heterogeneous architectures. In OOPSLA, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. I. Buck, T. Foley, D. Horn, J. Sugerman, K. Fatahalian, M. Houston, and P. Hanrahan. Brook for GPUs: stream computing on graphics hardware. In SIGGRAPH, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. Cunningham, R. Bordewekar, and V. Saraswat. GPU programming in a high level language: Compiling X10 to CUDA. In X10 Worksop, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. I. Gordon, W. Thies, and S. Amarasinghe. Exploiting coarse-grained task, data, and pipeline parallelism in stream programs. In ASPLOS, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. T. D. Han and T. S. Abdelrahman. hiCUDA: High-level GPGPU programming. IEEE Trans. Parallel Distrib. Syst., 22, Jan 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. H. Hormati, M. Samadi, M. Woh, T. Mudge, and S. Mahlke. Sponge: portable stream programming on graphics engines. In ASPLOS, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. T. B. Jablin, P. Prabhu, J. A. Jablin, N. P. Johnson, S. R. Beard, and D. I. August. Automatic CPU-GPU communication management and optimization. In PLDI, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Khronos OpenCL Working Group. The OpenCL Specification.Google ScholarGoogle Scholar
  10. S. Lee, S.-J. Min, and R. Eigenmann. OpenMP to GPGPU: a compiler framework for automatic translation and optimization. In PPoPP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C.-K. Luk, S. Hong, and H. Kim. Qilin: exploiting parallelism on heterogeneous multiprocessors with adaptive mapping. In MICRO, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. W. R. Mark, R. S. Glanville, K. Akeley, and M. J. Kilgard. Cg: a system for programming graphics hardware in a C-like language. In SIGGRAPH, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. A. Mathew, P. D. Coddington, and K. A. Hawick. Analysis and development of Java Grande benchmarks. In Proceedings of the ACM 1999 conference on Java Grande, JAVA '99, pp. 72--80, New York, NY, USA, 1999. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. Newburn, B. So, Z. Liu, M. McCool, A. Ghuloum, S. Toit, Z. G. Wang, Z. H. Du, Y. Chen, G. Wu, P. Guo, Z. Liu, and D. Zhang. Intel's Array Building Blocks: A retargetable, dynamic compiler and embedded language. In CGO, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. NVIDIA Corporation. The CUDA Specification.Google ScholarGoogle Scholar
  16. A. D. Reid, K. Flautner, E. Grimley-Evans, and Y. Lin. SoC-C: efficient programming abstractions for heterogeneous multicore systems on chip. In CASES, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. Ryoo, C. I. Rodrigues, S. S. Baghsorkhi, S. S. Stone, D. B. Kirk, and W.-m. W. Hwu. Optimization principles and application performance evaluation of a multithreaded GPU using CUDA. In PPoPP, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. D. Tarditi, S. Puri, and J. Oglesby. Accelerator: using data parallelism to program GPUs for general-purpose uses. In ASPLOS, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. W. Thies, M. Karczmarek, and S. P. Amarasinghe. StreamIt: A language for streaming applications. In CC, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Udupa, R. Govindarajan, and M. J. Thazhuthaveetil. Software pipelined execution of stream programs on GPUs. In CGO, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. S.-Z. Ueng, M. Lathara, S. S. Baghsorkhi, and W.-M. W. Hwu. Languages and compilers for parallel computing. In LCPC, 2008.Google ScholarGoogle Scholar
  22. P. H. Wang, J. D. Collins, G. N. Chinya, H. Jiang, X. Tian, M. Girkar, N. Y. Yang, G.-Y. Lueh, and H. Wang. EXOCHI: architecture and programming environment for a heterogeneous multi-core multithreaded system. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Y. Yang, P. Xiang, J. Kong, and H. Zhou. A GPGPU compiler for memory optimization and parallelism management. In PLDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Compiling a high-level language for GPUs: (via language support for architectures and compilers)

    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

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 47, Issue 6
      PLDI '12
      June 2012
      534 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2345156
      Issue’s Table of Contents
      • cover image ACM Conferences
        PLDI '12: Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation
        June 2012
        572 pages
        ISBN:9781450312059
        DOI:10.1145/2254064

      Copyright © 2012 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 11 June 2012

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!