Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Comm】switch c_allreduce_sum to all_reduce #68923

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions python/paddle/distributed/fleet/layers/mpu/mp_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from typing import TYPE_CHECKING, Literal

import paddle
import paddle.distributed as dist
from paddle import _C_ops, _legacy_C_ops
from paddle.autograd import PyLayer
from paddle.base.data_feeder import check_dtype, check_variable_and_dtype
Expand Down Expand Up @@ -266,10 +267,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,
'reduce_type',
dist.ReduceOp.SUM,
'ring_id',
group.id,
)
Expand Down