IR¶
PyPTO's intermediate representation — the contract every other layer depends on.
The IR definition is the source of truth for the whole compiler: passes are replaceable, IR node definitions are not. Read Overview first, then the page covering what you are changing.
| Page | What it covers |
|---|---|
| Overview | The compilation pipeline from Python DSL to generated kernels, and where the IR sits in it |
| Node Hierarchy | Complete reference of every IR node type, organized by category |
| Types and Examples | The type system with practical usage examples |
| Structural Comparison | Comparing IR nodes by structure rather than pointer identity |
| Serialization | MessagePack-based .pto serialization |
| Operator System | Type-safe operator definitions with automatic type deduction |
| IR Builder | Constructing IR incrementally — context managers in Python, Begin/End in C++ |
| IR Parser | Converting Python DSL to IR via @pl.function / @pl.program, and the SSA properties it enforces |
See Also¶
- Passes — the transformations that run over this IR.
- Python IR Syntax Specification — the surface syntax the parser accepts.
- IR Verifier — the property verifiers that check IR legality between passes.