cs.PLMar 6, 2026

PolyBlocks: A Compiler Infrastructure for AI Chips and Programming Frameworks

Authors: Uday Bondhugula, Akshay Baviskar, Navdeep Katel, Vimal Patel, Anoop JS, Arnab Dutta

Organizations: Polymage Labs and Indian Institute of Science, Bengaluru, Karnataka, India · Polymage Labs, Bengaluru, India

Abstract

We present the design and implementation of PolyBlocks, a modular and reusable MLIR-based compiler infrastructure for AI programming frameworks and AI chips. PolyBlocks is based on pass pipelines that compose transformations on loop nests and SSA, primarily relying on lightweight affine access analysis; the transformations are stitched together in specialized ways to realize high-performance code automatically by the use of analytical cost models and heuristics. The optimizations in these passes include multi-level tiling, fusion, on-chip scratchpad usage, mapping matmuls and convolutions to matrix units, fusing the attention layer, and several other transformations for parallelism and locality. They have been developed in a way that makes it easy to build PolyBlocks-based compilers to target new chips, reusing much of the infrastructure. PolyBlocks' design and architecture enable fully automatic code generation from high-level frameworks to low-level target-specific intrinsics. Experimental results from evaluating PolyBlocks-powered just-in-time compilation for PyTorch and JAX targeting NVIDIA GPUs show that it is able to match or outperform Torch Inductor and XLA in several cases, although the latter rely on a combination of vendor libraries and code generation. For individual operators like matmuls and convolutions, PolyBlocks-generated code is competitive with the best vendor-tuned libraries or hand-written kernels.

Figures & tables

Appendix figures & tables5 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Hexagon-MLIR: An AI Compilation Stack For Qualcomm's Neural Processing Units (NPUs)

    Feb 23, 2026Mohammed Javed Absar, Muthu Baskaran, Abhikrant Sharma +22AI Accelerator Inference

  2. AI as a Compiler: Compiling Triton kernels without the Triton compiler

    Sep 29, 2026François Costa, Charly Castes, Thomas Bourgeat +1GPU Kernel OptimizationLarge Language Model-Guided Optimization