Expand description
Memory planning and buffer allocation pass.
Analyzes tensor lifetimes within IR functions and assigns buffer offsets using a greedy allocator. When lifetimes do not overlap, the allocator reuses buffer regions, reducing peak memory usage.
Structs§
- Buffer
Allocation - A buffer allocation for a single tensor.
- Live
Interval - The liveness interval (first-use to last-use) of a tensor.
- Memory
Plan - The result of memory planning: buffer assignments and peak usage.
- Memory
Planning - Memory planning analysis pass.
- Tensor
Id - A unique identifier for a tensor in the memory plan.
Functions§
- plan_
memory - Analyze an IR module and produce a memory plan.