Skip to content

Commit 9173248

Browse files
Alcanderianalcanerian
andauthored
[fix] reduce dp capture bs (#5634)
Co-authored-by: alcanerian <[email protected]>
1 parent 2ed96c7 commit 9173248

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/sglang/srt/model_executor/cuda_graph_runner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ def get_batch_sizes_to_capture(model_runner: ModelRunner):
134134
)
135135

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

140141
if max(capture_bs) > model_runner.req_to_token_pool.size:

0 commit comments

Comments
 (0)