Skip to content

Commit 21e3943

Browse files
authored
[XPU] fix xpu to set cudagraph batch sizes (vllm-project#23044)
Signed-off-by: calvin chen <[email protected]>
1 parent 6d243ef commit 21e3943

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

vllm/v1/worker/gpu_model_runner.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,10 @@ def __init__(
232232
# The convention is different.
233233
# self.cudagraph_batch_sizes sorts in ascending order.
234234
# The batch sizes in the config are in descending order.
235-
self.cudagraph_batch_sizes = list(
236-
reversed(self.compilation_config.cudagraph_capture_sizes))
235+
if self.compilation_config.cudagraph_capture_sizes and \
236+
self.compilation_config.cudagraph_mode != CUDAGraphMode.NONE:
237+
self.cudagraph_batch_sizes = list(
238+
reversed(self.compilation_config.cudagraph_capture_sizes))
237239

238240
# Cache the device properties.
239241
self._init_device_properties()

0 commit comments

Comments
 (0)