Conditionally recapture cuda graph after model weight update from disk (#12060)
This commit is contained in:
@@ -862,6 +862,7 @@ class ModelRunner:
|
||||
model_path: str,
|
||||
load_format: str,
|
||||
weight_name_filter: Optional[Callable[[str], bool]] = None,
|
||||
recapture_cuda_graph: bool = False,
|
||||
) -> tuple[bool, str]:
|
||||
"""Update engine weights in-place from the disk."""
|
||||
logger.info(
|
||||
@@ -917,6 +918,9 @@ class ModelRunner:
|
||||
self.server_args.load_format = load_format
|
||||
self.load_config = load_config
|
||||
|
||||
if recapture_cuda_graph and self.device == "cuda":
|
||||
self.init_device_graphs()
|
||||
|
||||
logger.info("Update weights end.")
|
||||
return True, "Succeeded to update model weights."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user