Fix TurboMind vision workspace overflows - #4924
Open
irexyc wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses TurboMind vision-model workspace overruns by proactively planning symmetric-buffer usage and introducing chunking logic when inputs exceed the language model’s shared symmetric buffer capacity.
Changes:
- QwenViT: pre-compute hidden/merger workspace requirements vs.
symm_buf, enforce early failure for non-NCCL communicators when capacity is insufficient, and selectively fall back to regular device buffers where allowed. - InternViT: compute per-tile workspace requirements and split oversized batches into tile-based micro-batches, writing each chunk directly into the final
image_embedstensor.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/turbomind/models/qwenvit/qwenvit.cc | Adds symmetric-buffer workspace planning and communicator-specific fallback/early-fail behavior. |
| src/turbomind/models/internvit/internvit.cc | Adds tile micro-batching to keep InternViT intermediate workspaces within symmetric-buffer limits. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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 PR prevents InternViT and QwenViT from exceeding the language model's shared symmetric buffer.
Changes
InternViT
QwenViT
The QwenViT change covers Qwen2-VL, Qwen2.5-VL, and Qwen3.5/3.6/3.8 VLMs.