Parsimony: Enabling SIMD/Vector Programming in Standard Compiler Flows

被引:1
作者
Kandiah, Vijay [1 ]
Lustig, Daniel [2 ]
Villa, Oreste [2 ]
Nellans, David [2 ]
Hardavellas, Nikos [1 ]
机构
[1] Northwestern Univ, Evanston, IL 60208 USA
[2] NVIDIA, San Jose, CA USA
来源
PROCEEDINGS OF THE 21ST ACM/IEEE INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION, CGO 2023 | 2023年
关键词
Parallel Computing; Vectorization; Code Translation; Single-instruction Multiple-data; Compiler Design;
D O I
10.1145/3579990.3580019
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Achieving peak throughput on modern CPUs requires maximizing the use of single-instruction, multiple-data (SIMD) or vector compute units. Single-program, multiple-data (SPMD) programming models are an effective way to use high-level programming languages to target these ISAs. Unfortunately, many SPMD frameworks have evolved to have either overly-restrictive language specifications or under-specified programming models, and this has slowed the widescale adoption of SPMD-style programming. This paper introduces Parsimony (PARallel SIMd), a SPMD programming approach built with semantics designed to be compatible with multiple languages and to cleanly integrate into the standard optimizing compiler toolchains for those languages. We first explain the Parsimony programming model semantics and how they enable a standalone compiler IR-to-IR pass that can perform vectorization independently of other passes, improving the language and toolchain compatibility of SPMD programming. We then demonstrate a LLVM prototype of the Parsimony approach that matches the performance of ispc, a popular but more restrictive SPMD approach, and achieves 97% of the performance of hand-written AVX-512 SIMD intrinsics on over 70 benchmarks ported from the Simd Library. We finally discuss where Parsimony has exposed parts of existing language and compiler flows where slight improvements could further enable improved SPMD program vectorization.
引用
收藏
页码:186 / 198
页数:13
相关论文
共 46 条
[1]   AUTOMATIC TRANSLATION OF FORTRAN PROGRAMS TO VECTOR FORM [J].
ALLEN, R ;
KENNEDY, K .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1987, 9 (04) :491-542
[2]  
[Anonymous], 2013, OpenMP Application Program Interface, Version 4.0
[3]  
[Anonymous], 2017, PROC 4 WORKSHOP LLVM, DOI DOI 10.1145/3148173.3148185
[4]   All You Need Is Superword-Level Parallelism: Systematic Control-Flow Vectorization with SLP [J].
Chen, Yishen ;
Mendis, Charith ;
Amarasinghe, Saman .
PROCEEDINGS OF THE 43RD ACM SIGPLAN INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '22), 2022, :301-315
[5]   VEGEN: A Vectorizer Generator for SIMD and Beyond [J].
Chen, Yishen ;
Mendis, Charith ;
Carbin, Michael ;
Amarasinghe, Saman .
ASPLOS XXVI: TWENTY-SIXTH INTERNATIONAL CONFERENCE ON ARCHITECTURAL SUPPORT FOR PROGRAMMING LANGUAGES AND OPERATING SYSTEMS, 2021, :902-914
[6]  
Coutinho B., 2011, Proceedings 2011 International Conference on Parallel Architectures and Compilation Techniques (PACT), P320, DOI 10.1109/PACT.2011.63
[7]   Z3: An efficient SMT solver [J].
de Moura, Leonardo ;
Bjorner, Nikolaj .
TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANALYSIS OF SYSTEMS, 2008, 4963 :337-340
[8]   Vectorization for SIMD Architectures with alignment constraints [J].
Eichenberger, AE ;
Wu, P ;
O'Brien, K .
ACM SIGPLAN NOTICES, 2004, 39 (06) :82-93
[9]  
Fung WWL, 2011, INT S HIGH PERF COMP, P25, DOI 10.1109/HPCA.2011.5749714
[10]  
Intel, 2022, ispc: Intel SPMD Program Compiler