VizMLIR turns two MLIR snapshots into a graph and a focused structural diff. Everything runs in your browser; your IR stays local.
Capture every pass boundary from mlir-opt and open the
log with Open…, or paste it into
Current:
mlir-opt input.mlir -pass-pipeline='…' -mlir-print-ir-after-all
-mlir-print-ir-module-scope -mlir-disable-threading 2>
trace.txt
Pick a pass from the timeline at the top (or press
[ / ]) to compare its IR with the IR it
received. Passes that failed are marked with ✗, and compiler errors,
warnings, notes, and remarks printed around a dump appear over the
graph. Without -mlir-print-ir-module-scope, nested
passes print only the function they ran on; VizMLIR rebuilds module
baselines from those dumps.
Add -mlir-timing to see how long each pass took: the
timeline shows each pass's wall time and IR size, and
p opens the full report. mlir-opt does not measure memory
per pass, so for peak memory run it under
/usr/bin/time -l (macOS) or
/usr/bin/time -v (Linux) and keep that output in the
log.
This example creates a tensor, fills it, and multiplies it. The graph turns each operation into a node and draws edges for SSA data flow.
linalg.fill and compare.
trace.txt, re-run
mlir-opt in your terminal, and VizMLIR updates on the
same pass.
.json files. Nothing is uploaded.
Follow the arrows from values being produced to operations that consume them. Click a node to see its label and parent. The pass diff on the right highlights what was added, removed, or changed between the two snapshots.
The parser currently focuses on the MLIR constructs supported by the bundled WebAssembly engine. If a snippet does not render as expected, please include it when opening an issue.