未验证 提交 82f1e1b7 编写于 作者: R Roc 提交者: GitHub

fix send for old dygraph mode by passing use_calc_stream to the send op (#47110) (#47201)

上级 d42a1dc3
...@@ -199,7 +199,8 @@ def send_partial(tensor, ...@@ -199,7 +199,8 @@ def send_partial(tensor,
dst_rank = _hcg._get_p2p_next_rank( dst_rank = _hcg._get_p2p_next_rank(
) if dst == 1 else _hcg._get_p2p_prev_rank() ) if dst == 1 else _hcg._get_p2p_prev_rank()
if _in_legacy_dygraph(): if _in_legacy_dygraph():
send_op = paddle.distributed.send send_op = lambda x, dst, group: \
paddle.distributed.send(x, dst, group, use_calc_stream)
elif in_dygraph_mode(): elif in_dygraph_mode():
send_op = paddle.distributed.isend send_op = paddle.distributed.isend
return send_op(tensor.detach(), dst=dst_rank, group=group) return send_op(tensor.detach(), dst=dst_rank, group=group)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册