[Elastic EP] Reuse CUDA graphs across reconfiguration (#54985)
This commit is contained in:
@@ -10,6 +10,7 @@ import torch.distributed as dist
|
||||
from vllm.config import ParallelConfig
|
||||
from vllm.config.compilation import CUDAGraphMode
|
||||
from vllm.distributed.parallel_state import get_dp_group
|
||||
from vllm.v1.worker.dp_utils import should_skip_dp_coordination
|
||||
from vllm.v1.worker.gpu.cudagraph_utils import (
|
||||
BatchExecutionDescriptor,
|
||||
CudaGraphManager,
|
||||
@@ -71,7 +72,10 @@ def sync_cudagraph_and_dp_padding(
|
||||
tensor[3][dp_rank] = max_query_len or -1 # (-1 means None)
|
||||
tensor[4][dp_rank] = int(allow_ubatching)
|
||||
tensor[5][dp_rank] = num_reqs
|
||||
dist.all_reduce(tensor, group=group)
|
||||
if should_skip_dp_coordination():
|
||||
tensor[:] = tensor[:, dp_rank, None].clone()
|
||||
else:
|
||||
dist.all_reduce(tensor, group=group)
|
||||
|
||||
num_tokens_across_dp = tensor[0]
|
||||
cg_mode_across_dp = tensor[1]
|
||||
|
||||
Reference in New Issue
Block a user