Repository navigation
[Bugfix][Diffusion] Release async outputs abandoned by consumer streams #6580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rahul-steiger-nv
wants to merge
14
commits into
vllm-project:main
Choose a base branch
from
rahul-steiger-nv:mp-async-leak
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7982b5c
initial commit
17480a9
removed unnecesary getattr
7e31ad5
fix review comments about edge cases
8a6395a
fixed pre-commits tests
deddb97
fix headers to usptream
9b3fcea
even more header issues
318707d
Fix async output cancellation cleanup and admission tests
0213b69
Fix diffusion execution timing after async output materialization
f05aa48
key unclaimed sets per stream
rahul-steiger-nv 7c566fb
added live stream check
rahul-steiger-nv f53946f
admit requests eagerly, and return generator with contextlib.asclosing
rahul-steiger-nv df84ac6
separate stage durations and output_ready_wait_time_ms
rahul-steiger-nv 2d0f44b
Fix async output delivery during diffusion shutdown
rahul-steiger-nv 496d546
test cleanup
rahul-steiger-nv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] test_step_streaming_excludes_output_wait_from_execution_time patches get_output…
Evidence and suggested fix
test_step_streaming_excludes_output_wait_from_execution_time patches get_output_stream and yields a DiffusionOutput already populated with output_ready_wait_time (tests/diffusion/test_diffusion_engine.py:880,895), so it only proves step_streaming subtraction. Production writes the field in get_output_stream after wait_output_ready (vllm_omni/diffusion/diffusion_engine.py:1177). The only real-stream check is test_async_output_is_claimed_after_materialization's
>= 0.0(tests/diffusion/test_diffusion_engine_cleanup.py:336), which also holds for the dataclass default 0.0 (vllm_omni/diffusion/data.py:1816). Deleting the assignment would not fail tests, and diffusion_engine_exec_time_ms would include the wait. Drive a non-zero wait through real get_output_stream (completed executor future + patched perf_counter) and assert output.output_ready_wait_time / output_ready_wait_time_ms and diffusion_engine_exec_time_ms.Evidence: Trigger: the new timing test never exercises the production writer. tests/diffusion/test_diffusion_engine.py:880
output = DiffusionOutput(stage_durations={"denoise": 10.0}, output_ready_wait_time=output_wait)and :895get_output_stream=output_stream,inject the field and mock the stream. Production assignment is vllm_omni/diffusion/diffusion_engine.py:1177output.output_ready_wait_time = time.perf_counter() - output_ready_wait_start_time. Unmet requirement: tests/diffusion/test_diffusion_engine_cleanup.py:336assert materialized_output.output_ready_wait_time >= 0.0still passes if that assignment is deleted, because vllm_omni/diffusion/data.py:1816output_ready_wait_time: float = 0.0is the default — then step_streamingexec_total_time = time.perf_counter() - exec_start_time - output_ready_wait_timewould count materialization wait inside diffusion_engine_exec_time_ms with no test failure.