mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-04 16:22:57 +08:00
[feature]2.2 custom_allreduce support cudagraph recapture (#4307)
* custom_allreduce support cudagraph recapture * delete code * add shut_down/restart default group
This commit is contained in:
@@ -23,7 +23,10 @@ import paddle.nn.layer
|
||||
from paddle.device.cuda import graphs
|
||||
|
||||
from fastdeploy.config import FDConfig
|
||||
from fastdeploy.distributed.communication import capture_custom_allreduce
|
||||
from fastdeploy.distributed.communication import (
|
||||
capture_custom_allreduce,
|
||||
custom_ar_clear_ipc_handles,
|
||||
)
|
||||
from fastdeploy.utils import get_logger
|
||||
|
||||
logger = get_logger("cudagrpah_piecewise_backend", "cudagraph_piecewise_backend.log")
|
||||
@@ -208,6 +211,7 @@ class CudaGraphPiecewiseBackend:
|
||||
def clear_graph(self):
|
||||
""" """
|
||||
# Clear graphs
|
||||
custom_ar_clear_ipc_handles()
|
||||
for id, entry in self.concrete_size_entries.items():
|
||||
if entry.cuda_graph:
|
||||
del entry.cuda_graph
|
||||
|
Reference in New Issue
Block a user