Skip to content

Add CUDA VMM multimodal feature transport - #33899

Merged
hanming-lu merged 2 commits into
sgl-project:mainfrom
oulgen:cuda-vmm-mm-feature-transport
Aug 7, 2026
Merged

hanming-lu merged 2 commits into
sgl-project:mainfrom
oulgen:cuda-vmm-mm-feature-transport

Conversation

@oulgen

@oulgen oulgen commented Aug 6, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Large multimodal feature tensors can make CPU serialization and object broadcasts a bottleneck. This adds an explicit, model-gated GPU transport with bounded memory use and CPU fallback when capacity is unavailable.

Modifications

  • Add a bounded CUDA VMM pool with FABRIC handle sharing and a single-node POSIX file-descriptor fallback.
  • Pack features per request, copy them on scheduler ranks, acknowledge consumption, and recycle pool slices.
  • Integrate tokenizer/engine lifecycle handling and scheduler-side reconstruction.
  • Require explicit model opt-in, CUDA, the Python server, and PP=1. No in-tree model is enabled by this PR.

Accuracy Tests

No model forward or numerical code changes.

  • pytest -q test/registered/unit/multimodal/test_gpu_feature_transport.py: 23 passed.
  • CUDA_VISIBLE_DEVICES=0,1,2 pytest -q test/registered/unit/multimodal/test_cuda_vmm_transport.py: 14 passed.
  • Pre-commit hooks: passed.

Speed Tests and Profiling

Performance benchmark not run: no in-tree model opts into this transport.

Checklist

  • Format the code with pre-commit.
  • Add unit tests.
  • Update user-facing CLI help for the transport mode and fallback behavior.
  • Provide performance benchmark results. No in-tree model opts into this transport yet.
  • Follow the SGLang code style guidance.

Review and Merge Process

  1. Get approvals from CODEOWNERS and other reviewers.
  2. Trigger CI tests with the documented PR comments.
  3. Merge only after required approvals and green CI.

CI States

Latest PR Test (Base): ❌ Run #31146495118
Latest PR Test (Extra): ❌ Run #31146494923

@oulgen

oulgen commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

1 similar comment
@oulgen

oulgen commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@oulgen

oulgen commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

cc: @yinghai @merrymercy

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Aug 6, 2026
@hanming-lu

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

oulgen and others added 2 commits August 6, 2026 21:08
Share multimodal feature tensors through a bounded VMM pool. Use CUDA FABRIC handles when available, fall back to POSIX file descriptors on one node, and use CPU transport when the pool is full.

Co-authored-by: Yinghai Lu <yinghai@meta.com>
@oulgen
oulgen force-pushed the cuda-vmm-mm-feature-transport branch from 0be7561 to 94e6e6f Compare August 7, 2026 04:08
@oulgen

oulgen commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@hanming-lu

Copy link
Copy Markdown
Collaborator

base-c-test-4-gpu-gb300 is flaky on main, merging.

@hanming-lu
hanming-lu merged commit 7f6b4cb into sgl-project:main Aug 7, 2026
235 of 252 checks passed
saturn-acc pushed a commit to saturn-acc/sglang that referenced this pull request Aug 16, 2026
Co-authored-by: Yinghai Lu <yinghai@meta.com>
chencjcj pushed a commit to chencjcj/sglang that referenced this pull request Aug 17, 2026
Co-authored-by: Yinghai Lu <yinghai@meta.com>
(cherry picked from commit 7f6b4cb)

Conflict resolution:
- server_args.py: took upstream's mm_feature_transport declaration, which
  widens the Literal from {cpu, cuda_ipc} to include cuda_vmm and rewrites
  the help text. Strict superset of this base's version.
- tokenizer_manager.py: pure adjacency conflict. This base carries
  init_request_preprocessor/run_in_request_preprocessor from sgl-project#30771 at the
  same insertion point as upstream's new
  _validate_cuda_vmm_feature_transport_support. The two are unrelated, so
  both were kept.
Atituiset pushed a commit to Atituiset/sglang that referenced this pull request Sep 10, 2026
Co-authored-by: Yinghai Lu <yinghai@meta.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bypass-fastfail run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants