[V1] Integrate Piecewise CUDA graphs (#10058)

Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
This commit is contained in:
Woosuk Kwon
2024-11-05 22:16:04 -08:00
committed by GitHub
parent 9d59b75593
commit 4089985552
3 changed files with 133 additions and 36 deletions
+5 -2
View File
@@ -496,8 +496,11 @@ class PiecewiseBackend:
return entry.runnable(*args)
if self.is_first_graph:
logger.info("Capturing a cudagraph for shape %s",
runtime_shape)
# Since we capture cudagraph for many different shapes and
# capturing is fast, we don't need to log it for every shape.
# We only log it in the debug mode.
logger.debug("Capturing a cudagraph for shape %s",
runtime_shape)
input_addresses = [
x.data_ptr() for x in args if isinstance(x, torch.Tensor)