Adapting SYCL’s SIMT Programming Paradigm for Accelerators via Program Reconstruction
Jiashu Wang, Xun Deng, Kai-Ting Amy Wang, ZiChun Ye · 2021
We present an IR-to-IR Converter that is capable of converting from LLVM IR to Halide IR and MLIR’s Affine Dialect to support generation of high performance SYCL kernel code [10] targeting accelerators with explicit memory hierarchy design. The converter performs program reconstruction to raise abstraction of the IR. Once the IR is raised to the level of Halide IR, AKG [2] can be leveraged to generate performant DaVinci code [2]. Alternatively, when the IR is raised to MLIR’s Affine Dialect, existing MLIR Affine passes with minor modifications can be readily used. Subsequently, the IR is lowered back to LLVM IR through progressive lowering. LLVM’s LLC is used to create the final binary for both cases. We extend upon SYCL’s buffer, accessor and parallel_for abstractions to facilitate the IR raising process.