the.ai

Compilers / Systems

verified

Memory Planning

Intermediate tensors have lifetimes, and two that never coexist can share the same memory. Planning that reuse is what lets a model with far more intermediate values than memory run at all, and it is decided at compile time from the graph rather than by an allocator at runtime.

Viz primitive · budget-splitreused-buffers = 6

reused-buffers holds 50% of the budget; rest holds the remaining 50%.

Buffers shared between tensors with disjoint lifetimes against buffers allocated outright, in buffers. Drag the reuse up to watch peak memory fall — the floor is the largest set that is live at once, and no planner beats it.

6

Reviewed by opendroid · 2026-08-18