← projects

sass2mlir
Getting started
  • Overview
  • Installation
  • Quickstart
Reference
  • CLI reference
Concepts
  • Kernel fusion vs CUDA graphs
Project
  • Contributing
  • Code style
  • Changelog
  • Legal disclaimer
Examples
  • All examples
  • Capturing & lifting kernels
  • CFG, SSA & liveness
  • Register allocation
  • Writing a pass plugin
  • Kernel blacklisting
  • Recompiling FlashAttention
  • On-device: Jetson Orin
Examples

sass2mlir by example

Every page below is a complete, copy-pasteable walkthrough of one workflow, building on the quickstart and using only commands from the CLI reference.

Capturing & lifting kernels
Offline cubin harvests, the sass2mlir intercept shim for live capture, run.csv, and how undocumented instructions pass through.
CFG, SSA & liveness
Recover the control-flow graph, inspect def-use chains, per-block liveness, and warp-uniformity analysis.
Register allocation
Pinned mode as the byte-identity oracle, free recoloring to cut register pressure, and verifying the result.
Writing a pass plugin
The plugin ABI, a minimal control-code rewrite, pass.toml targeting, and the report → apply workflow.
Kernel blacklisting
Match an attack kernel's instruction signature in a shipped cubin and replace its body with an instant EXIT — the GPU antivirus pattern.
Recompiling FlashAttention
The full six-pass pipeline on the official H100 kernel: capture, configure, apply, validate in-process.
On-device: Jetson Orin
Single-architecture builds for 8 GB edge targets and patching kernels at load time with sass2mlir intercept --apply.
A note on the numbers

Benchmark figures referenced in these walkthroughs (register counts, spill counts, speedups) are the measured values from the overview page — nothing here is aspirational. Where a pass is still report-only, the example says so and shows the report.

← Legal disclaimer Capturing & lifting kernels →

2026-07-11