diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/distributed/torch.distributed.all_gather.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/distributed/torch.distributed.all_gather.md index a351af40494..1d996856a17 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/distributed/torch.distributed.all_gather.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/distributed/torch.distributed.all_gather.md @@ -1,4 +1,4 @@ -## [torch 参数更多]torch.distributed.all_gather +## [参数不一致]torch.distributed.all_gather ### [torch.distributed.all_gather](https://pytorch.org/docs/stable/distributed.html#torch.distributed.all_gather) @@ -9,16 +9,16 @@ torch.distributed.all_gather(tensor_list, tensor, group=None, async_op=False) ### [paddle.distributed.all_gather](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/all_gather_cn.html) ```python -paddle.distributed.all_gather(tensor_list, tensor, group=0) +paddle.distributed.all_gather(tensor_list, tensor, group=None, sync_op=True) ``` -Pytorch 相比 Paddle 支持更多其他参数,具体如下: +其中 PyTorch 和 Paddle 功能一致,参数用法不一致,具体如下: ### 参数映射 -| PyTorch | PaddlePaddle | 备注 | -| ----------- | ------------ | --------------------------------------------- | -| tensor_list | tensor_list | 操作的输出 Tensor 列表。 | -| tensor | tensor | 操作的输入 Tensor。 | -| group | group | 工作的进程组编号。 | -| async_op | - | 是否异步操作,Paddle 无此参数,暂无转写方式。 | +| PyTorch | PaddlePaddle | 备注 | +| ----------- | ------------ | --------------------------------------------------------------- | +| tensor_list | tensor_list | 操作的输出 Tensor 列表。 | +| tensor | tensor | 操作的输入 Tensor。 | +| group | group | 工作的进程组编号。 | +| async_op | sync_op | torch 为是否异步操作,Paddle 为是否同步操作,转写方式取反即可。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/distributed/torch.distributed.all_reduce.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/distributed/torch.distributed.all_reduce.md index 5d73c6de5af..254719c11bf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/distributed/torch.distributed.all_reduce.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/distributed/torch.distributed.all_reduce.md @@ -1,4 +1,4 @@ -## [torch 参数更多]torch.distributed.all_reduce +## [参数不一致]torch.distributed.all_reduce ### [torch.distributed.all_reduce](https://pytorch.org/docs/stable/distributed.html#torch.distributed.all_reduce) @@ -9,16 +9,16 @@ torch.distributed.all_reduce(tensor, op=