TY - GEN
T1 - Towards automatic HBM allocation using LLVM
T2 - 3rd Workshop on the LLVM Compiler Infrastructure in HPC, LLVM-HPC 2016
AU - Khaldi, Dounia
AU - Chapman, Barbara
N1 - Publisher Copyright:
© 2016 IEEE.
PY - 2017/2/1
Y1 - 2017/2/1
N2 - 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.
AB - 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.
KW - HBW
KW - KNL
KW - LLVM
KW - MCDRAM
KW - OpenMP
UR - https://www.scopus.com/pages/publications/85016969738
U2 - 10.1109/LLVM-HPC.2016.007
DO - 10.1109/LLVM-HPC.2016.007
M3 - Conference contribution
AN - SCOPUS:85016969738
T3 - Proceedings 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
SP - 12
EP - 20
BT - Proceedings of LLVM-HPC 2016
PB - Institute of Electrical and Electronics Engineers Inc.
Y2 - 14 November 2016
ER -