delete parallel_state.py (#3250)

This commit is contained in:
Yuanle Liu
2025-08-08 11:03:29 +08:00
committed by GitHub
parent fbdd6b0663
commit fac2f64837
3 changed files with 7 additions and 37 deletions

View File

@@ -68,7 +68,11 @@ class GpuWorker(WorkerBase):
gc.collect()
paddle.device.cuda.empty_cache()
if self.parallel_config.enable_custom_all_reduce:
if (
self.parallel_config.enable_custom_all_reduce
and self.parallel_config.tensor_parallel_size > 1
and paddle.is_compiled_with_cuda()
):
from fastdeploy.distributed.communication import use_custom_allreduce
use_custom_allreduce()