In this article
Cross-thread stream reuse in 1.32 targets idle retained resources; vary caller identities independently from overlapping run count when measuring it.
ONNX Runtime 1.32.0 enables cross-thread reuse of idle device streams under specific conditions, including disabled graph capture and provider callbacks. The linked PR targets resources retained per caller thread even when runs do not overlap. A growing host thread pool can therefore expose a memory pattern that a fixed-thread concurrency benchmark misses.
Sequential callers can still leave retained resources
A resource pool keyed to thread identity can grow as new callers appear even when inference is sequential. The release changes eligible idle-stream sharing, so a proposed test creates many caller threads while keeping at most one run active. Compare retained resources with a fixed caller. This isolates the intended issue from the ordinary memory cost of genuinely overlapping work, which may legitimately require more simultaneous stream collections.
Idle reuse needs exclusive borrowing
Sharing a collection does not mean two active runs can use the same mutable stream state without coordination. The PR describes exclusively borrowed idle collections. A stress case should mix sequential reuse with deliberate overlaps and verify that outputs remain isolated. Distinct request data makes accidental cross-run state visible. A low retained-memory number alone is not a correctness result if overlapping requests reuse resources before the previous work has completed.
Capture retains a different affinity contract
The release excludes graph capture from the new cross-thread sharing policy. A captured configuration should therefore be tested as a distinct control rather than expected to show the same retention curve. Record provider callback support too. If either condition is absent, thread-affine behaviour can be intentional. Treating every unchanged memory result as a failed fix would ignore the eligibility conditions that define the optimization.
Measure retained state after work completes
Wait at the supported completion boundary before sampling retained resources, and keep pending transfers accounted for separately. This article reports the release pooling conditions and proposed caller-count experiment without a new memory benchmark. The relevant result is bounded idle retention for an eligible workload, not a promise that all per-thread or per-request allocations disappear from every provider and capture mode.
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.