Skip to main navigation Skip to search Skip to main content

Towards automatic HBM allocation using LLVM: A case study with knights landing

  • Dounia Khaldi
  • , Barbara Chapman
  • Stony Brook University

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

17 Scopus citations

Abstract

In this paper, we introduce a new LLVM analysis, called Bandwidth-Critical Data Analysis (BCDA), to decide when it is beneficial to allocate data in High-Bandwidth Memory (HBM) and then transform allocation calls into specific HBM allocation calls, for increased performance in parallel systems. High-Bandwidth Memory (HBM) is a new memory technology that features stacked 3D chips on processor dies.The well-known SSA-based compilation infrastructure for sequential and parallel languages LLVM will be used to detect frequently used data and patterns of memory accesses in order to decide on which level to allocate the data: HBM or DDR. BCDA core analysis counts the number of data uses and detects irregular and simultaneous accesses, generating a priority value for every variable. Using this priority value information, LLVM will generate memkind-alloc function calls, to transform mallocs to HBM allocations if HBM is present and a sufficient size of HBM is available.As a use case for validating our approach, we show how the Conjugate Gradient (CG) benchmark from the NAS Parallel suite can be optimized for the use of MCDRAM, as the HBM on the Knights Landing Xeon Phi processors is called. We implement BCDA in the LLVM compiler and apply it on CG to detect when it is beneficial to allocate data in the HBM. Then, we allocate the data in the MCDRAM using hbwmalloc library calls. Using the priority generated by BCDA, we achieved a 2.29× performance improvement using the LLVM compiler and 2.33× using Intel's compiler compared to the DDR version of CG.

Original languageEnglish
Title of host publicationProceedings of LLVM-HPC 2016
Subtitle of host publicationThe 3rd Workshop on the LLVM Compiler Infrastructure in HPC - Held in conjunction with SC 2016: The International Conference for High Performance Computing, Networking, Storage and Analysis
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages12-20
Number of pages9
ISBN (Electronic)9781509038787
DOIs
StatePublished - Feb 1 2017
Event3rd Workshop on the LLVM Compiler Infrastructure in HPC, LLVM-HPC 2016 - Salt Lake City, United States
Duration: Nov 14 2016 → …

Publication series

NameProceedings of LLVM-HPC 2016: The 3rd Workshop on the LLVM Compiler Infrastructure in HPC - Held in conjunction with SC 2016: The International Conference for High Performance Computing, Networking, Storage and Analysis

Conference

Conference3rd Workshop on the LLVM Compiler Infrastructure in HPC, LLVM-HPC 2016
Country/TerritoryUnited States
CitySalt Lake City
Period11/14/16 → …

Keywords

  • HBW
  • KNL
  • LLVM
  • MCDRAM
  • OpenMP

Fingerprint

Dive into the research topics of 'Towards automatic HBM allocation using LLVM: A case study with knights landing'. Together they form a unique fingerprint.

Cite this