From b9c7cc4c09102816bc50002499229ac74ffc14f4 Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Thu, 26 Jun 2025 10:02:11 -0400 Subject: [PATCH] =?UTF-8?q?Revert=20"[Bugfix]=20default=20set=20cuda=5Fgra?= =?UTF-8?q?ph=5Fsizes=20to=20max=5Fnum=5Fseqs=20for=20v1=20engine=20(?= =?UTF-8?q?=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9f0608fc166ba0173dac4a470753464b969c7043. --- vllm/config.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/vllm/config.py b/vllm/config.py index e90ad5e9c8b6..96ea47a0dce3 100644 --- a/vllm/config.py +++ b/vllm/config.py @@ -2042,12 +2042,11 @@ class SchedulerConfig: NOTE: This will be replaced by speculative config in the future; it is present to enable correctness tests until then.""" - cuda_graph_sizes: list[int] = field(default_factory=list) - """Cuda graph capture sizes - 1. if none provided, then default set to [max_num_seqs] - 2. if one value is provided, then the capture list would follow the + cuda_graph_sizes: list[int] = field(default_factory=lambda: [512]) + """Cuda graph capture sizes, default is 512. + 1. if one value is provided, then the capture list would follow the pattern: [1, 2, 4] + [i for i in range(8, cuda_graph_sizes + 1, 8)] - 3. more than one value (e.g. 1 2 128) is provided, then the capture list + 2. more than one value (e.g. 1 2 128) is provided, then the capture list will follow the provided list.""" delay_factor: float = 0.0 @@ -2212,10 +2211,6 @@ def __post_init__(self) -> None: self.max_num_partial_prefills, self.max_long_partial_prefills, self.long_prefill_token_threshold) - # If cuda_graph_sizes is not specified, default set to [max_num_seqs]. - if not self.cuda_graph_sizes: - self.cuda_graph_sizes = [self.max_num_seqs] - @model_validator(mode='after') def _verify_args(self) -> Self: if (self.max_num_batched_tokens < self.max_model_len