[MRV1] Scope breakable cudagraphs to the piecewise path only (#56312)
Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
co-authored by
Andreas Karatzas
parent
dffb863c97
commit
cc5dd0a857
@@ -5461,13 +5461,22 @@ class GPUModelRunner(
|
||||
and cudagraph_mode != CUDAGraphMode.NONE
|
||||
and not self.parallel_config.use_ubatching
|
||||
):
|
||||
self.model = BreakableCUDAGraphWrapper(self.model, self.vllm_config)
|
||||
# Scoped to PIECEWISE dispatch; FULL cudagraphs (below) are
|
||||
# unaffected. PIECEWISE dispatch can also arise after wrapping
|
||||
# (drafters under a FULL target mode, or a later FULL ->
|
||||
# FULL_AND_PIECEWISE upgrade in _check_and_update_cudagraph_mode).
|
||||
self.model = BreakableCUDAGraphWrapper(
|
||||
self.model, self.vllm_config, runtime_mode=CUDAGraphMode.PIECEWISE
|
||||
)
|
||||
drafter = getattr(self, "drafter", None)
|
||||
if drafter is not None and hasattr(drafter, "model"):
|
||||
drafter.model = BreakableCUDAGraphWrapper(
|
||||
drafter.model, self.vllm_config
|
||||
drafter.model,
|
||||
self.vllm_config,
|
||||
runtime_mode=CUDAGraphMode.PIECEWISE,
|
||||
)
|
||||
elif (
|
||||
|
||||
if (
|
||||
cudagraph_mode.has_full_cudagraphs()
|
||||
and not self.parallel_config.use_ubatching
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user