Skip to content

Back-propagate whether IPipelineInput<T> will accept incoming value#59

Merged
ruccho merged 1 commit intomainfrom
feature/skip_unnecessary_allocations
Oct 20, 2025
Merged

Back-propagate whether IPipelineInput<T> will accept incoming value#59
ruccho merged 1 commit intomainfrom
feature/skip_unnecessary_allocations

Conversation

@ruccho
Copy link
Collaborator

@ruccho ruccho commented Oct 20, 2025

  • Currently AsyncGPUReadback will run and rent temporary buffer from ArrayPool<byte> even if the input queue is full. In this case, AsyncGPUReadback is awaited and the buffer will be returned immediately after the readback completes, but this may increase peak of memory usage.
  • This PR changes IPipelineInput<T> to back-propagate whether it will accept incoming value at that time to prior pipeline elements, enabling AsyncGPUReadback to avoid allocate buffers if unnecessary.

@ruccho ruccho requested a review from hkmt-mmy October 20, 2025 05:44
@ruccho ruccho merged commit b2f7ae4 into main Oct 20, 2025
@ruccho ruccho deleted the feature/skip_unnecessary_allocations branch October 20, 2025 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants