Host-owned cache of prepared GPU-audio providers that survive a node's release, so the next prepare() of a node with the same program skips device, pipeline and resident-weight creation.
More...
Host-owned cache of prepared GPU-audio providers that survive a node's release, so the next prepare() of a node with the same program skips device, pipeline and resident-weight creation.
A node opts in through its config (for example GpuWaveNetRealtimeNode::Config::provider_pool). On release the node drains its provider and, when the provider can resume, returns it here instead of destroying it; a later prepare() with the same program key (model shape and weights, block size, slots and completion policy) borrows it back. A borrowed provider's causal history is stale, so the node re-fills it before delivering. Entries older than keep_warm_ns are destroyed by evict_expired(), which the host calls from a timer or any non-realtime thread. The audio callback never touches the pool.
Only a provider that drained cleanly, can resume, and has not lost its device is kept; anything else is released instead. A provider is lent only to a request for the same program on the same provider kind and revision. At capacity the least recently returned provider is evicted.
Thread safety: every member is safe from any host thread, and the transport's non-realtime worker takes the same mutex when an automatic re-acquire borrows a provider. The pool must outlive every node configured with it.