Fix: stabilize depth-two chip run lifecycle - #1987
Draft
high-cloud wants to merge 1 commit into
Draft
Conversation
Keep preparation, native execution, completion, and stream retirement owned by resident workers so host scheduling gaps do not enter every decode step. - Prestart the two-frame preparation and completion pools - Reuse one native executor pool per device context - Serialize stream retirement and replenishment across pipeline slots - Buffer host timing spans per process to avoid shared stderr contention - Cover concurrent preparation, completion, shutdown, and slot reuse
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This draft preserves the complete historical runtime fix that made the DSV4 MTP-1 serving step stable in the original checkout. It is intentionally published as a behavior reference for Simpler experts, rather than presented as a conflict-free patch for current
main.The change keeps preparation, native execution, completion, and stream retirement owned by resident workers, and removes shared
stderrcontention from timing spans.Historical base and current-main status
3165cc89b6ea6b58a0bc01cbec2d5f72f2029c35origin/mainat publication time:66ba5c4a1100de402db103bd140a9cb106315eefmain.mainare expected. Please treat this draft as a migration aid and a source of lifecycle invariants, not as merge-ready code.What changed
stderr.Verification
Fresh host-side verification on the historical branch:
tests/ut/py/test_worker/test_host_worker.py: 217 passedtest_run_stream_slotsandtest_native_run_launch_signal: 2/2 passedgit diff --check: passedHistorical real-NPU acceptance, collected from the same implementation before publication:
The NPU result above is historical evidence, not a fresh run against current
main.Related work
Review request
Please help identify which lifecycle invariants still apply to current
main, and whether they should be ported through the current stream/worker abstractions as smaller changes.