Compiler Technology

Wen Heng Jack Chung, Yi Hong Lyu, I. Jui Ray Sung, Yun Wei Lee, Wen Mei W. Hwu

Research output: Chapter in Book/Report/Conference proceedingChapter


In order to help programs exploit the power of systems compatible with the HSA, compilers and runtimes of high-level programming languages or domain-specific languages should target HSA for portable code generation and runtime management. In this chapter, we use C++ AMP, a parallel programming extension to C++, to show how efficient HSAIL code can be generated from a higher-level programming model. We discuss important translation techniques, such as mapping between C++ constructs and HSA features, compilation processes for GPU and CPU codes, tiling support, memory segment annotation. In addition, we explain how to access HSA-specific features such as shared virtual memory and platform atomics from C++, and we cover how they are mapped to HSAIL. These techniques can be useful for compiler writers interested in mapping other programming models to HSA. The implementation, Kalmar, which consists of a compiler, a set of header files, and a runtime library, is publicly accessible as an open source project.

Original languageEnglish (US)
Title of host publicationHeterogeneous System Architecture
Subtitle of host publicationA New Compute Platform Infrastructure
PublisherElsevier Inc.
Number of pages33
ISBN (Print)9780128003862
StatePublished - 2016


  • C++ AMP
  • Code generation
  • Compiler
  • Kalmar
  • Parallel programming
  • Platform atomics
  • Programming model
  • Shared virtual memory

ASJC Scopus subject areas

  • General Computer Science


Dive into the research topics of 'Compiler Technology'. Together they form a unique fingerprint.

Cite this