Translating OpenACC to LLVM IR with SPIR kernels

Autor: Hao-Wei Peng, Jean Jyh-Jiun Shann
Rok vydání: 2016
Předmět:
Zdroj: ICIS
DOI: 10.1109/icis.2016.7550823
Popis: In general, highly parallelized programs executed on heterogeneous multiprocessor platforms may get better performance than homogeneous ones. OpenCL is one of the standards for parallel programming of heterogeneous multiprocessor platforms and SPIR (Standard Portable Intermediate Representation) is a portable binary format for representing OpenCL kernel code. However, the programming of these programs is usually complex and error-prone for most programmers. Therefore, some standards have been proposed to simplify the programming on heterogeneous multiprocessor platforms, for example, OpenACC (a directive-based parallel programming model). In this paper, we implement our framework on Clang, the C front-end of LLVM, to automatically translate OpenACC to LLVM IR with SPIR kernels. After that, it is optional to optimize the IR code by LLVM optimizer and execute the host LLVM IR by LLVM JIT-compiler. According to the experiment results, our translated programs have significant performance enhancement for some programs while comparing with their corresponding sequential version of programs and have comparable performance while comparing with their manual OpenCL version. Therefore, our design may reduce the difficulty of writing the programs in heterogeneous multiprocessor platform and the translated OpenCL programs are portable and have good performance as that of the manual OpenCL programs written by experienced programmers.
Databáze: OpenAIRE