Skip to content

[fix] reduce dp capture bs #5634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion python/sglang/srt/model_executor/cuda_graph_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ def get_batch_sizes_to_capture(model_runner: ModelRunner):
)

gpu_mem = get_device_memory_capacity()
if gpu_mem is not None and gpu_mem > 81920:
# Batch size of each rank will not become so large when DP is on
if gpu_mem is not None and gpu_mem > 81920 and server_args.dp_size == 1:
capture_bs += list(range(160, 257, 8))

if max(capture_bs) > model_runner.req_to_token_pool.size:
Expand Down
Loading