From 9191b02eda0e8a1117f092e75f514d608d540f99 Mon Sep 17 00:00:00 2001 From: weireweire Date: Wed, 1 Apr 2026 06:20:56 +0800 Subject: [PATCH] Fix cuda graph max bs capture upper bound (#21005) --- python/sglang/srt/server_args.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/sglang/srt/server_args.py b/python/sglang/srt/server_args.py index 3d185689d..ce4cc7df4 100644 --- a/python/sglang/srt/server_args.py +++ b/python/sglang/srt/server_args.py @@ -1352,6 +1352,9 @@ class ServerArgs: capture_bs = [bs for bs in capture_bs if bs <= self.cuda_graph_max_bs] + if self.cuda_graph_max_bs not in capture_bs: + capture_bs.append(self.cuda_graph_max_bs) + return capture_bs def _generate_cpu_graph_batch_sizes(self):