forked from PaddlePaddle/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
【Hackathon 5th No.46】API转换 84-102 (PaddlePaddle#6281)
* Add api_difference docs * Fix * Fix * Fix * Fix
- Loading branch information
Showing
8 changed files
with
87 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...ert/convert_from_pytorch/api_difference/distributed/torch.distributed.gather.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## [参数不一致]torch.distributed.gather | ||
|
||
### [torch.distributed.gather](https://pytorch.org/docs/stable/distributed.html#torch.distributed.gather) | ||
|
||
```python | ||
torch.distributed.gather(tensor, gather_list=None, dst=0, group=None, async_op=False) | ||
``` | ||
|
||
### [paddle.distributed.gather](https://github.com/PaddlePaddle/Paddle/blob/c8ccc9b154632ef41ade1b8e97b87d54fde7e8f8/python/paddle/distributed/communication/gather.py#L20C71-L20C71) | ||
|
||
```python | ||
paddle.distributed.gather(tensor, gather_list=None, dst=0, group=None, sync_op=True) | ||
``` | ||
|
||
其中 PyTorch 和 Paddle 功能一致,参数用法不一致,具体如下: | ||
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
| ----------- | ------------ | --------------------------------------------------------------- | | ||
| tensor | tensor | 操作的输入 Tensor。 | | ||
| gather_list | gather_list | 操作的输出 Tensor 列表。 | | ||
| dst | dst | 表示目标进程的 rank。 | | ||
| group | group | 工作的进程组编号。 | | ||
| async_op | sync_op | torch 为是否异步操作,Paddle 为是否同步操作,转写方式取反即可。 | |
21 changes: 21 additions & 0 deletions
21
...onvert_from_pytorch/api_difference/distributed/torch.distributed.get_backend.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
## [参数完全一致]torch.distributed.get_backend | ||
|
||
### [torch.distributed.get_backend](https://pytorch.org/docs/stable/distributed.html#torch.distributed.get_backend) | ||
|
||
```python | ||
torch.distributed.get_backend(group=None) | ||
``` | ||
|
||
### [paddle.distributed.get_backend](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/get_backend_cn.html#get-backend) | ||
|
||
```python | ||
paddle.distributed.get_backend(group=None) | ||
``` | ||
|
||
其中功能一致, 参数完全一致,具体如下: | ||
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------- | ------------ | ---- | | ||
| group | group | 指定的通信组。 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters