Experiences Building an MLIR-based SYCL Compiler
Preprint
Abstract
Similar to other programming models, compilers for SYCL, the open programming model for heterogeneous computing based on C++, would benefit from access to higher-level intermediate representations. The loss of high-level structure and semantics caused by premature lowering to low-level intermediate representations and the inability to reason about host and device code simultaneously present major challenges for SYCL compilers. The MLIR compiler framework, through its dialect mechanism, allows to model domain-specific, high-level intermediate representations and provides the necessary facilities to address these challenges. This work therefore describes practical experience with the design and implementation of an MLIR-based SYCL compiler. By modeling key elements of the SYCL programming model in host and device code in the MLIR dialect framework, the presented approach enables the implementation of powerful device code optimizations as well as analyses across host and device code. Compared to two LLVM-based SYCL implementations, this yields speedups of up to 4.3x on a collection of SYCL benchmark applications. Finally, this work also discusses challenges encountered in the design and implementation and how these could be addressed in the future.Keywords
All Related Versions
This publication has 14 references indexed in Scilit:
- User-driven Online Kernel Fusion for SYCLACM Transactions on Architecture and Code Optimization, 2023
- Just-in-Time Compilation and Link-Time Optimization for OpenMP Target Offloading2022
- Exploring the possibility of a hipSYCL-based implementation of oneAPI2022
- SYCLops: A SYCL Specific LLVM to MLIR Converter2022
- A Comparison of SYCL, OpenCL, CUDA, and OpenMP for Massively Parallel Support Vector Machine Classification on Multi-Vendor Hardware2022
- Towards performance portability of AI models using SYCL-DNN2022
- Polygeist: Raising C to Polyhedral MLIR2021
- SYCL-Bench2020
- Exploiting Memory Access Patterns to Improve Memory Performance in Data-Parallel ArchitecturesIEEE Transactions on Parallel and Distributed Systems, 2010
- XIL and YIL1995