Skip to content

[Misc] Minor comment reorganization in capture_model() #21015

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions vllm/v1/worker/gpu_model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2273,12 +2273,12 @@ def capture_model(self) -> None:
start_free_gpu_memory = torch.cuda.mem_get_info()[0]

# Trigger CUDA graph capture for specific shapes.
# Capture the large shapes first so that the smaller shapes
# can reuse the memory pool allocated for the large shapes.
with graph_capture(device=self.device):
full_cg = self.full_cuda_graph
# Only rank 0 should print progress bar during capture
# Capture the large shapes first so that the smaller shapes
# can reuse the memory pool allocated for the large shapes.
compilation_cases = reversed(self.cudagraph_batch_sizes)
# Only rank 0 should print progress bar during capture
if is_global_first_rank():
compilation_cases = tqdm(
list(compilation_cases),
Expand Down