Riyadh Baghdadi, Ulysse Beaugnon, Albert Cohen, T. Grosser, Michael Kruse, Chandan Reddy, Sven Verdoolaege, A. Betts, A. Donaldson, J. Ketema, J. Absar, S. V. Haastregt, Alexey Kravets, Anton Lokhmotov, R. David, Elnar Hajiyev
{"title":"PENCIL:一种用于加速器编程的平台中立的计算中间语言","authors":"Riyadh Baghdadi, Ulysse Beaugnon, Albert Cohen, T. Grosser, Michael Kruse, Chandan Reddy, Sven Verdoolaege, A. Betts, A. Donaldson, J. Ketema, J. Absar, S. V. Haastregt, Alexey Kravets, Anton Lokhmotov, R. David, Elnar Hajiyev","doi":"10.1109/PACT.2015.17","DOIUrl":null,"url":null,"abstract":"Programming accelerators such as GPUs with low-level APIs and languages such as OpenCL and CUDA is difficult, error-prone, and not performance-portable. Automatic parallelization and domain specific languages (DSLs) have been proposed to hide complexity and regain performance portability. We present PENCIL, a rigorously-defined subset of GNU C99-enriched with additional language constructs-that enables compilers to exploit parallelism and produce highly optimized code when targeting accelerators. PENCIL aims to serve both as a portable implementation language for libraries, and as a target language for DSL compilers. We implemented a PENCIL-to-OpenCL backend using a state-of-the-art polyhedral compiler. The polyhedral compiler, extended to handle data-dependent control flow and non-affine array accesses, generates optimized OpenCL code. To demonstrate the potential and performance portability of PENCIL and the PENCIL-to-OpenCL compiler, we consider a number of image processing kernels, a set of benchmarks from the Rodinia and SHOC suites, and DSL embedding scenarios for linear algebra (BLAS) and signal processing radar applications (SpearDE), and present experimental results for four GPU platforms: AMD Radeon HD 5670 and R9 285, NVIDIA GTX 470, and ARM Mali-T604.","PeriodicalId":385398,"journal":{"name":"2015 International Conference on Parallel Architecture and Compilation (PACT)","volume":"21 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2015-10-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"100","resultStr":"{\"title\":\"PENCIL: A Platform-Neutral Compute Intermediate Language for Accelerator Programming\",\"authors\":\"Riyadh Baghdadi, Ulysse Beaugnon, Albert Cohen, T. Grosser, Michael Kruse, Chandan Reddy, Sven Verdoolaege, A. Betts, A. Donaldson, J. Ketema, J. Absar, S. V. Haastregt, Alexey Kravets, Anton Lokhmotov, R. David, Elnar Hajiyev\",\"doi\":\"10.1109/PACT.2015.17\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Programming accelerators such as GPUs with low-level APIs and languages such as OpenCL and CUDA is difficult, error-prone, and not performance-portable. Automatic parallelization and domain specific languages (DSLs) have been proposed to hide complexity and regain performance portability. We present PENCIL, a rigorously-defined subset of GNU C99-enriched with additional language constructs-that enables compilers to exploit parallelism and produce highly optimized code when targeting accelerators. PENCIL aims to serve both as a portable implementation language for libraries, and as a target language for DSL compilers. We implemented a PENCIL-to-OpenCL backend using a state-of-the-art polyhedral compiler. The polyhedral compiler, extended to handle data-dependent control flow and non-affine array accesses, generates optimized OpenCL code. To demonstrate the potential and performance portability of PENCIL and the PENCIL-to-OpenCL compiler, we consider a number of image processing kernels, a set of benchmarks from the Rodinia and SHOC suites, and DSL embedding scenarios for linear algebra (BLAS) and signal processing radar applications (SpearDE), and present experimental results for four GPU platforms: AMD Radeon HD 5670 and R9 285, NVIDIA GTX 470, and ARM Mali-T604.\",\"PeriodicalId\":385398,\"journal\":{\"name\":\"2015 International Conference on Parallel Architecture and Compilation (PACT)\",\"volume\":\"21 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2015-10-18\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"100\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2015 International Conference on Parallel Architecture and Compilation (PACT)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/PACT.2015.17\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2015 International Conference on Parallel Architecture and Compilation (PACT)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/PACT.2015.17","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 100
摘要
使用低级api和语言(如OpenCL和CUDA)对gpu等加速器进行编程是困难的,容易出错,而且不具有性能可移植性。提出了自动并行化和领域特定语言(dsl)来隐藏复杂性和恢复性能可移植性。我们介绍了PENCIL,它是GNU c99的一个严格定义的子集——丰富了额外的语言结构——它使编译器能够利用并行性,并在针对加速器时生成高度优化的代码。PENCIL的目标是作为库的可移植实现语言和DSL编译器的目标语言。我们使用最先进的多面体编译器实现了PENCIL-to-OpenCL后端。多面体编译器,扩展到处理数据相关的控制流和非仿射数组访问,生成优化的OpenCL代码。为了展示PENCIL和PENCIL- To - opencl编译器的潜力和性能可移植性,我们考虑了许多图像处理内核,一组来自Rodinia和SHOC套件的基准测试,以及线性代数(BLAS)和信号处理雷达应用(SpearDE)的DSL嵌入场景,并给出了四个GPU平台的实验结果:AMD Radeon HD 5670和R9 285, NVIDIA GTX 470和ARM Mali-T604。
PENCIL: A Platform-Neutral Compute Intermediate Language for Accelerator Programming
Programming accelerators such as GPUs with low-level APIs and languages such as OpenCL and CUDA is difficult, error-prone, and not performance-portable. Automatic parallelization and domain specific languages (DSLs) have been proposed to hide complexity and regain performance portability. We present PENCIL, a rigorously-defined subset of GNU C99-enriched with additional language constructs-that enables compilers to exploit parallelism and produce highly optimized code when targeting accelerators. PENCIL aims to serve both as a portable implementation language for libraries, and as a target language for DSL compilers. We implemented a PENCIL-to-OpenCL backend using a state-of-the-art polyhedral compiler. The polyhedral compiler, extended to handle data-dependent control flow and non-affine array accesses, generates optimized OpenCL code. To demonstrate the potential and performance portability of PENCIL and the PENCIL-to-OpenCL compiler, we consider a number of image processing kernels, a set of benchmarks from the Rodinia and SHOC suites, and DSL embedding scenarios for linear algebra (BLAS) and signal processing radar applications (SpearDE), and present experimental results for four GPU platforms: AMD Radeon HD 5670 and R9 285, NVIDIA GTX 470, and ARM Mali-T604.