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

【Hackathon 5th No.45】映射文档69-70 -part #6217

Merged
merged 25 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
74ef784
add api mapping
longranger2 Sep 30, 2023
1502c9d
Update pytorch_api_mapping_cn.md
longranger2 Sep 30, 2023
588098e
Update pytorch_api_mapping_cn.md
longranger2 Sep 30, 2023
72f868c
Update pytorch_api_mapping_cn.md
longranger2 Oct 3, 2023
3bdc8d5
Update pytorch_api_mapping_cn.md
longranger2 Oct 21, 2023
9d7d3ab
add torch.float_power.md
longranger2 Oct 21, 2023
9ffa404
Merge branch 'hackthon_45' of https://github.com/longranger2/docs int…
longranger2 Oct 21, 2023
02a18f8
add torch.cuda.seed.md and torch.cuda.seed_all.md
longranger2 Oct 21, 2023
859c253
update torch.cuda.float_power.md
longranger2 Oct 21, 2023
828fcce
Merge branch 'PaddlePaddle:develop' into hackthon_45
longranger2 Oct 25, 2023
8a5aec7
Merge branch 'develop' into hackthon_45
longranger2 Nov 9, 2023
5d5111f
fix bug
longranger2 Nov 9, 2023
a6369bb
fix bug
longranger2 Nov 13, 2023
d2f1de4
fix bug
longranger2 Nov 21, 2023
fbef3ba
Merge branch 'PaddlePaddle:develop' into hackthon_45
longranger2 Nov 22, 2023
f7ace43
fix bug
longranger2 Dec 9, 2023
0c4bd06
fix bug
longranger2 Dec 9, 2023
98f2a72
Delete docs/guides/model_convert/convert_from_pytorch/api_difference/…
longranger2 Jan 19, 2024
84b5b7a
Delete docs/guides/model_convert/convert_from_pytorch/api_difference/…
longranger2 Jan 19, 2024
641a8d1
Update pytorch_api_mapping_cn.md
longranger2 Jan 19, 2024
a1da7da
fix bug
longranger2 Jan 22, 2024
687b3ab
fix bug
longranger2 Jan 22, 2024
5c9a317
Merge branch 'PaddlePaddle:develop' into hackthon_45
longranger2 Jan 23, 2024
4532a7b
fix bug
longranger2 Jan 24, 2024
24906c4
Merge branch 'PaddlePaddle:develop' into hackthon_45
longranger2 Jan 24, 2024
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### [ 无参数 ] torch.cuda.seed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这两个错误的映射,你删掉吧


### [torch.cuda.seed](https://pytorch.org/docs/stable/generated/torch.cuda.seed.html#torch.cuda.seed)

```python
torch.cuda.seed()
```

### [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/seed_cn.html#seed)

```python
paddle.seed(1024)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

torch是返回seed,paddle是设置seed,两个API功能能对上吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhwesky2010 那我的理解,现在paddle好像没有可以返回seed的函数?

Copy link
Collaborator

@zhwesky2010 zhwesky2010 Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有直接函数,可以找找能否组合实现,可以查查 get_cuda_rng_state、get_rng_state这些,理论上是有办法获取的

```

Paddle 相比 Pytorch 参数更多

### 参数映射
| PyTorch | Paddle | 备注 |
| ------- |--------| --------------------------------------------------------- |
| - | seed | seed (int) - 要设置的的随机种子,推荐使用较大的整数 |
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### [ 无参数 ] torch.cuda.seed

### [torch.cuda.seed_all](https://pytorch.org/docs/stable/generated/torch.cuda.seed.html#torch.cuda.seed)

```python
torch.cuda.seed()
```

### [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/seed_cn.html#seed)

```python
paddle.seed(1024)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这两个API功能能对不上吧

```

Paddle 相比 Pytorch 参数更多

### 参数映射
| PyTorch | Paddle | 备注 |
| ------- |--------| --------------------------------------------------------- |
| - | seed | seed (int) - 要设置的的随机种子,推荐使用较大的整数 |
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@
| REFERENCE-MAPPING-ITEM(`torch.manual_seed`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.manual_seed.md) |
| [torch.can_cast](https://pytorch.org/docs/stable/generated/torch.can_cast.html#torch-can-cast) | 功能缺失 |


***持续更新...***

## torch.nn.XX API 映射列表
Expand Down Expand Up @@ -1389,6 +1388,10 @@
| REFERENCE-MAPPING-ITEM(`torch.cuda.ShortTensor`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.ShortTensor.md) |
| REFERENCE-MAPPING-ITEM(`torch.cuda.stream`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md) |
| REFERENCE-MAPPING-ITEM(`torch.cuda.Stream`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Stream__upper.md) |
| REFERENCE-MAPPING-ITEM(`torch.cuda.seed`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.seed.md) |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件链接还有吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有的,只是在想删除的时候,报了这个错误“There was an error committing your changes: File could not be edited”

| REFERENCE-MAPPING-ITEM(`torch.cuda.seed_all`, https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.seed_all.md) |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件链接还有吗?

| [torch.cuda.comm.scatter](https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatterw.html)| | 功能缺失 |
| [torch.cuda.comm.gather](https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html)| | 功能缺失|

***持续更新...***

Expand Down