Search arXiv⌕ Search

arXiv subjects

Julian Oppermann

Publications and source records attributed to Julian Oppermann.

2 recordsLinked to original sources

Bridging Tiled Domain-Specific Languages to CPU Matrix Accelerator via MLIR Nano-Kernels

Tiled programming domain-specific languages (DSLs) such as Triton have become a common standard for expressing high-performance GPU kernels, enabling developers to encode architectural and algorithmic knowledge directly into the program structure to achieve peak throughput. In contrast, CPU execution of PyTorch graphs typically depends on library function pattern matching with opaque fusion behavior and unpredictable performance characteristics. In this work, we demonstrate that the tiling expertise captured at the DSL level can be retargeted to CPU by lowering to upstream MLIR vector-level dialects, then leveraging existing linear algebra vectorization passes in MLIR to produce efficient CPU code. Our key contribution is a common MLIR framework in which Triton, cuTile and Helion kernels, together with a PyTorch-to-Linalg compiler (Lighthouse), converge on a shared register-tiled nano-kernel form, preserving tile-level intent while enabling MLIR's x86 vectorization passes to generate AMX instruction sequences. On 24 KernelBench Level 2 kernels, the DSL paths reach geometric-mean speedups of up to 1.57x over PyTorch Eager and 1.54x over PyTorch Inductor on an AMX-enabled Intel Xeon, while the Lighthouse path, which starts from un-tiled PyTorch operations, stays below Eager (0.56x). However, Helion and Lighthouse share the same lowering from the register tiling stage down, and yet differ by 2.8x. The gap likely lies in the stages Helion avoids: pure Torch-MLIR ingress, memory tiling, and buffer management.

cs.PL↗

Experiences Building an MLIR-based SYCL Compiler

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.

cs.PL↗