Sparse Tensor Compiler Research and Learning Path

Over the past few months in my PhD, I’ve been exploring different aspects of compilers, especially tensor and sparse tensor compilers. I started by analyzing existing sparse tensor compilers and quickly realized something uncomfortable: there isn’t a complete solution. Most systems feel stitched together, lacking maturity and reliability. To dig deeper, I began building a fuzzer to identify bugs across these infrastructures. This is ongoing work, and I’m gradually expanding it to support more compilers and improve its robustness. While integrating MLIR’s sparse tensor dialect into the fuzzer, one thing stood out, it feels significantly more mature than other approaches, particularly in generating loop structures for sparse iteration. That said, optimization on top of these structures remains challenging. Recently, I’ve been working on a vectorization optimization tailored to MLIR’s sparse loop structures. The speedups are promising, but I’ll be honest, I don’t yet fully understand the hardware-level reasons behind them. That’s something I’m actively trying to close the gap on. In parallel, I’ve been learning polyhedral optimization (even though applying it to sparse data is not straightforward). One broader realization during this process: there’s no clear "getting-started" path in this space. I come from the YouTube era of learning programming language where learning meant: start small -> build something -> understand deeper. But in compiler research, most resources jump straight into first principles, which can make it hard to build momentum early on. To deal with this, I started organizing my notes (previously scattered across Obsidian and Notion) into structured blog posts, focused on building intuition through implementation rather than just theory. So far: - I’ve started an MLIR blog series (https://lnkd.in/eHsG-kMi) - I’m writing an ongoing series on polyhedral optimization and ISL (https://lnkd.in/ewGC2pDT) I plan to finish these series within the coming summer. Next up: a deep dive into SIMD/vectorization and why AVX-512 gather/scatter can bottleneck sparse workloads. I plan to write my entire learning path as different blog series. If you’re getting into compiler research without much prior exposure, I hope this helps you get moving faster. Honestly, I suspect more people will read these posts than my future thesis.

I can also recommend MLIR For Beginners: https://github.com/j2kun/mlir-tutorial - a series of articles on the MLIR framework by Jeremy Kun & 20-min summary talk: https://www.youtube.com/watch?v=ne5D_kqlxYg along with How Slow is MLIR (2024), https://www.youtube.com/watch?v=7qvVMUSxqz4 & Deep Dive on MLIR Internals, Operation & Attribute, towards Properties (2023), https://www.youtube.com/watch?v=7ofnlCFzlqg.

To view or add a comment, sign in

Explore content categories