From 2df97ab0aa606fa5bbc0374cd2177fc3a0b8c485 Mon Sep 17 00:00:00 2001 From: co63oc Date: Wed, 25 Dec 2024 12:23:58 +0800 Subject: [PATCH] [fluid_ops] Modify legacy_C_ops.c_allreduce_sum (#70435) --- python/paddle/distributed/fleet/layers/mpu/mp_ops.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/python/paddle/distributed/fleet/layers/mpu/mp_ops.py b/python/paddle/distributed/fleet/layers/mpu/mp_ops.py index 3be67bf1edbc47..c31acf6d7945b1 100644 --- a/python/paddle/distributed/fleet/layers/mpu/mp_ops.py +++ b/python/paddle/distributed/fleet/layers/mpu/mp_ops.py @@ -255,12 +255,10 @@ def forward( group.process_group.all_reduce_on_calc_stream(tensor, op_type) return tensor else: - return _legacy_C_ops.c_allreduce_sum_( + return _C_ops.all_reduce_( tensor, - 'use_calc_stream', - use_calc_stream, - 'ring_id', group.id, + paddle.distributed.ReduceOp.SUM, ) @staticmethod