Repository navigation
Conversation
… its first read Prefetch-staged MRoPE positions were read before any wait, and the event was lost when the first chunk had no multimodal rows. Signed-off-by: Lori Ren <lorir@nvidia.com>
… item selection EAGER binds a waiting request's items from position zero; a prefix reused afterwards left them holding the output budget of its first chunk. Signed-off-by: Lori Ren <lorir@nvidia.com>
Also documents the prefetch stream rule and when item references are released. Signed-off-by: Lori Ren <lorir@nvidia.com>
…coder caching Inline caching keys every item in the common item record, so mixed-modality requests are cached per item. Signed-off-by: Lori Ren <lorir@nvidia.com>
… of test order Each test runs its path once before the timed pass, and skips instead of failing when the race was not set up. Signed-off-by: Lori Ren <lorir@nvidia.com>
…y chunk selects Releasing per chunk left an earlier chunk unable to use the space a later request's skipped item still held in that pass. Signed-off-by: Lori Ren <lorir@nvidia.com>
…aration Also limits the developer guide's release rule to context-chunk selection, and annotates a test. Signed-off-by: Lori Ren <lorir@nvidia.com>
This branch has not been deployed
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.
@coderabbitai summary
Description
An audit of who creates, reads and releases multimodal items (request params, encoder-cache entries, encoder and chunk views, prefetch outputs and events) on the inline, item-scheduled and side-stream prefetch paths. Two gaps were confirmed by tests that fail on main and are fixed here; the other transitions already hold and are now pinned by tests.
record_streamon the request's CUDA tensors so that post-prefill cleanup cannot hand their storage back to the side stream while forward-stream reads are still queued.The PR also drops the stale note that inline encoder caching supports only single-modality requests (the two serve schema snapshots are regenerated for it), and documents the prefetch stream rule and the reference-release points in the multimodal developer guide.
Found and left unchanged:
MAX_UTILIZATION, a recompute pause releases multimodal inputs the replay needs. V1 is deprecated, and [#17882][fix] Preserve multimodal data for MAX_UTILIZATION pause replay #18113 addresses it.Test Coverage
tests/unittest/_torch/pyexecutor/engine/runners/decoder/test_inputs.py: prefetch-staged MRoPE positions and embeddings are read after the prefetch event, and staged storage outlives the request while it is still read. These fail without theinputs.pychange.tests/unittest/_torch/pyexecutor/test_multimodal_scheduler.py: an EAGER item behind a reused prefix does not block the first chunk (fails without thescheduler.pychange); termination between chunks releases each remaining reference once.tests/unittest/_torch/multimodal/test_mm_encoder_cross_iter_prefetch.pyandtests/unittest/_torch/pyexecutor/test_recompute_pause.py: cancel after prefetch, and a V2 recompute pause keeping multimodal inputs.The MMMU runs were done on H100 before the branch was rebased onto current main. The unit tests were rerun after the rebase, against binaries built before it. The serve schema snapshots have not been regenerated since the rebase.
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.