In this article
The 1.32 cross-stream release repair follows alias ownership; a view’s last consumer can keep the original allocation alive beyond its producer stream.
ONNX Runtime 1.32.0 release notes include premature-release planning for cross-stream aliased buffers. The linked analysis follows reuse chains back to the owning allocation. An alias can add a later consumer without creating new storage, so the lifetime of one logical tensor cannot be inferred solely from the node that originally produced it.
Views extend a storage lifetime
Reshape-style aliases can expose the same storage under another logical value. Releasing the allocation when only its direct consumers finish ignores consumers reached through that alias. The release repair concerns the owner’s full use set. A proposed test builds a reuse-and-alias chain with a consumer on another stream, then checks both output and release accounting rather than merely confirming the graph contains a view node.
A CPU allocation can cross execution streams
The PR’s regression includes host buffers and is not dependent on GPU arithmetic. Execution streams describe ordering in the runtime; they do not make every affected allocation device memory. Keep allocator identity in a reproducer, especially when comparing arena and non-arena paths. Changing allocation policy can alter reuse and hide a lifetime defect, even if the mathematical graph and tensor dimensions stay unchanged.
Stress the actual last reader
Use a delayed or independently scheduled alias consumer and make the original data distinguishable from subsequent allocations. A reference result can reveal premature reuse, while instrumentation can identify which root allocation was released. The two observations complement each other. A passing serial run is a useful control but does not establish the cross-stream ordering property, because its natural execution order may keep the old bytes intact long enough by accident.
Not every buffer becomes permanently retained
The repair preserves ordinary release rules while correcting ownership resolution. It should not be presented as disabling memory reuse or retaining every temporary for the session lifetime. This article reports the release mechanism and proposed lifetime test without new benchmark claims. Local qualification should verify timely release after all consumers complete as well as absence of early release, so correctness does not hide unnecessary retention.
Sources
Related reading
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.