[https://nvbugs/6335137][fix] Fix VSWA/Hybrid model crash with MAX_UTILIZATION#15441
[https://nvbugs/6335137][fix] Fix VSWA/Hybrid model crash with MAX_UTILIZATION#15441VALLIS-NERIA wants to merge 1 commit into
Conversation
…ILIZATION Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
📝 WalkthroughWalkthroughIn ChangesConditional prefill block population in MaxUtilizationScheduler
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cpp/tensorrt_llm/batch_manager/capacityScheduler.cpp (1)
388-392: 💤 Low valueConsider adding an inline comment explaining the crash prevention.
While the variable name
skippingIsRelevantis self-documenting and line 377 provides context, an inline comment here would help future maintainers understand that this guard prevents a crash (not just an optimization). The underlying issue is thatanalyzePrefixReuse(called withinprefillWithChunkedContextsAlreadyExecutingat lines 55 and 64) asserts on variable-window managers.Example comment
+ // Don't populate block sets when variable-window is active — analyzePrefixReuse would assert. + // See line 294 for similar guard in the prefix-reuse summary computation path. if (skippingIsRelevant) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cpp/tensorrt_llm/batch_manager/capacityScheduler.cpp` around lines 388 - 392, Add an inline comment above or within the if (skippingIsRelevant) block at the prefillWithChunkedContextsAlreadyExecuting call to explain that this guard prevents a crash rather than just being an optimization. The comment should clarify that this check is necessary because prefillWithChunkedContextsAlreadyExecuting calls analyzePrefixReuse internally, which asserts on variable-window managers, so calling it when skippingIsRelevant is false would cause a crash.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@cpp/tensorrt_llm/batch_manager/capacityScheduler.cpp`:
- Around line 388-392: Add an inline comment above or within the if
(skippingIsRelevant) block at the prefillWithChunkedContextsAlreadyExecuting
call to explain that this guard prevents a crash rather than just being an
optimization. The comment should clarify that this check is necessary because
prefillWithChunkedContextsAlreadyExecuting calls analyzePrefixReuse internally,
which asserts on variable-window managers, so calling it when skippingIsRelevant
is false would cause a crash.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 14f2fcf5-1cd2-4c80-b2a6-70ef4185c1a8
📒 Files selected for processing (1)
cpp/tensorrt_llm/batch_manager/capacityScheduler.cpp
|
/bot run |
|
PR_Github #54788 [ run ] triggered by Bot. Commit: |
|
PR_Github #54788 [ run ] completed with state
|
Signed-off-by: Xiwen Yu 13230610+VALLIS-NERIA@users.noreply.github.com
Summary by CodeRabbit
Description
Test Coverage
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.