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

Conversation

longranger2
Copy link
Contributor

@longranger2 longranger2 commented Sep 30, 2023

69 torch.cuda.comm.scatter,功能缺失,标注到 pytorch_api_mapping_cn.md 文件中。
70 torch.cuda.comm.gather,功能缺失,标注到 pytorch_api_mapping_cn.md 文件中。

@paddle-bot
Copy link

paddle-bot bot commented Sep 30, 2023

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6217.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

@longranger2 longranger2 changed the title 【Hackathon 5th No.45】映射文档62、65-67、69-70 【Hackathon 5th No.45】映射文档62、65-67、69-70、83 Oct 3, 2023
@luotao1 luotao1 added the PaddlePaddle Hackathon 飞桨黑客松活动issue与PR label Oct 9, 2023
@zhwesky2010
Copy link
Collaborator

torch.cuda.StreamContext 这个是不是和 docs/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md 功能是一致的?

Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

如果将某个API判定为功能缺失,还需要仔细校对下,这次发布任务的一个目的是 能否找到替代方案

@@ -366,6 +366,7 @@
| 328 | [torch.get_default_dtype](https://pytorch.org/docs/stable/generated/torch.get_default_dtype.html#torch-get-default-dtype) |[paddle.get_default_dtype](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/get_default_dtype_cn.html#get-default-dtype)| 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.get_default_dtype.md)|
| 329 | [torch.is_grad_enabled](https://pytorch.org/docs/stable/generated/torch.is_grad_enabled.html?highlight=torch+is_grad_enabled#torch.is_grad_enabled) |[paddle.is_grad_enabled](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/is_grad_enabled_cn.html#is-grad-enabled)|无参数, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.is_grad_enabled.md)|
| 330 | [torch.manual_seed](https://pytorch.org/docs/stable/generated/torch.manual_seed.html#torch-manual-seed) |[paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/seed_cn.html)| 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.manual_seed.md)|
| 331 | [torch.float_power](https://pytorch.org/docs/1.13/generated/torch.float_power.html?highlight=float_power#torch.float_power)| | 功能缺失 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个通过cast和pow来组合实现,不是功能缺失

@@ -1073,6 +1074,10 @@
| 38 |[torch.cuda.ShortTensor](https://pytorch.org/docs/stable/tensors.html)|[paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor)| 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.ShortTensor.md)|
| 39 |[torch.cuda.stream](https://pytorch.org/docs/stable/generated/torch.cuda.stream.html)|[paddle.device.cuda.stream_guard](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/stream_guard_cn.html)|参数完全一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md)|
| 40 |[torch.cuda.Stream](https://pytorch.org/docs/stable/generated/torch.cuda.Stream.html#torch.cuda.Stream)|[paddle.device.cuda.Stream](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/Stream_cn.html)|参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Stream__upper.md)|
| 42 | [torch.cuda.seed](https://pytorch.org/docs/stable/generated/torch.cuda.seed.html)| | 功能缺失 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个为何缺失,没有能替代的吗

@@ -1073,6 +1074,10 @@
| 38 |[torch.cuda.ShortTensor](https://pytorch.org/docs/stable/tensors.html)|[paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor)| 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.ShortTensor.md)|
| 39 |[torch.cuda.stream](https://pytorch.org/docs/stable/generated/torch.cuda.stream.html)|[paddle.device.cuda.stream_guard](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/stream_guard_cn.html)|参数完全一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md)|
| 40 |[torch.cuda.Stream](https://pytorch.org/docs/stable/generated/torch.cuda.Stream.html#torch.cuda.Stream)|[paddle.device.cuda.Stream](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/Stream_cn.html)|参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.Stream__upper.md)|
| 42 | [torch.cuda.seed](https://pytorch.org/docs/stable/generated/torch.cuda.seed.html)| | 功能缺失 |
| 43 | [torch.cuda.seed_all](https://pytorch.org/docs/stable/generated/torch.cuda.seed_all.html)| | 功能缺失 |
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个为何缺失,没有能替代的吗

@longranger2
Copy link
Contributor Author

longranger2 commented Oct 21, 2023

torch.cuda.StreamContext 这个是不是和 docs/docs/guides/model_convert/convert_from_pytorch/api_difference/cuda/torch.cuda.stream.md 功能是一致的?

@zhwesky2010 看了下,发现是的,之前pytorch_api_mapping_cn.md里写的是功能缺失,需要更新下吗?

image image

@longranger2
Copy link
Contributor Author

@zhwesky2010 辛苦review下~

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

```python
paddle.seed()
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.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/seed_cn.html#seed)

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

Choose a reason for hiding this comment

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

这些签名不对

@@ -366,6 +366,7 @@
| 328 | [torch.get_default_dtype](https://pytorch.org/docs/stable/generated/torch.get_default_dtype.html#torch-get-default-dtype) |[paddle.get_default_dtype](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/get_default_dtype_cn.html#get-default-dtype)| 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.get_default_dtype.md)|
| 329 | [torch.is_grad_enabled](https://pytorch.org/docs/stable/generated/torch.is_grad_enabled.html?highlight=torch+is_grad_enabled#torch.is_grad_enabled) |[paddle.is_grad_enabled](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/is_grad_enabled_cn.html#is-grad-enabled)|无参数, [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.is_grad_enabled.md)|
| 330 | [torch.manual_seed](https://pytorch.org/docs/stable/generated/torch.manual_seed.html#torch-manual-seed) |[paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/seed_cn.html)| 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.manual_seed.md)|
| 331 | [torch.float_power](https://pytorch.org/docs/stable/generated/torch.float_power.html#torch-float-power)| | 组合替代实现 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.copysign.md)|
Copy link
Collaborator

Choose a reason for hiding this comment

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

你这个路径对吗

@longranger2
Copy link
Contributor Author

seed和seed_all找到了能对应的API吗

暂时还没

@luotao1
Copy link
Collaborator

luotao1 commented Jan 15, 2024

@longranger2 这个PR现在是什么进展呢

@longranger2
Copy link
Contributor Author

@longranger2 这个PR现在是什么进展呢

@luotao1 这个PR主要是torch.cuda.seed和torch.cuda.seed_all还没有搞定,其他都可以的了

@zhwesky2010
Copy link
Collaborator

zhwesky2010 commented Jan 16, 2024

@longranger2 没有的你先看下转换工具PaConvert https://github.com/PaddlePaddle/PaConvert ,看是否能转可以参考的,实在无法实现的就改成功能缺失吧

@@ -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.

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

@@ -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”

@@ -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) |
| 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.

这个文件链接还有吗?

@longranger2
Copy link
Contributor Author

done

@longranger2 longranger2 changed the title 【Hackathon 5th No.45】映射文档62、65-67、69-70、83 -part 【Hackathon 5th No.45】映射文档62、65、69-70、83 -part Jan 20, 2024
@longranger2 longranger2 changed the title 【Hackathon 5th No.45】映射文档62、65、69-70、83 -part 【Hackathon 5th No.45】映射文档62、65、69-70、82-83 -part Jan 20, 2024
@longranger2 longranger2 changed the title 【Hackathon 5th No.45】映射文档62、65、69-70、82-83 -part 【Hackathon 5th No.45】映射文档69-70 -part Jan 21, 2024
Copy link
Collaborator

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

image 有没有格式问题?

@longranger2
Copy link
Contributor Author

image 有没有格式问题?

很奇怪,试了很多也是这个错误,本地运行过没啥问题
image

@luotao1
Copy link
Collaborator

luotao1 commented Jan 22, 2024

要不要merge下develop再本地验证,已经很久没更新到最新了吧

@longranger2
Copy link
Contributor Author

貌似还是不行耶,有点奇怪,格式都跟其他对齐的

要不要merge下develop再本地验证,已经很久没更新到最新了吧

@luotao1
Copy link
Collaborator

luotao1 commented Jan 24, 2024

@longranger2 ,找 @RedContritio 师傅帮忙看看怎么改

@@ -1096,6 +1095,8 @@
| 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) |
| [torch.cuda.comm.scatter](https://pytorch.org/docs/stable/generated/torch.cuda.comm.scatterw.html) | 功能缺失 |
Copy link
Collaborator

@ooooo-create ooooo-create Jan 24, 2024

Choose a reason for hiding this comment

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

link #6256
参照

| NOT-IMPLEMENTED-ITEM(`torch.cuda.memory_usage`, https://pytorch.org/docs/stable/generated/torch.cuda.memory_usage.html#torch.cuda.memory_usage) |
| NOT-IMPLEMENTED-ITEM(`torch.cuda.mem_get_info`, https://pytorch.org/docs/stable/generated/torch.cuda.mem_get_info.html#torch.cuda.mem_get_info) |
进行修改,使用 NOT-IMPLEMENTED-ITEM(xxx,xxx)的形式,看原来的链接发现链接中使用锚点的形式比较好
例如 https://pytorch.org/docs/stable/generated/torch.cuda.comm.gather.html#torch.cuda.comm.gather

@longranger2
Copy link
Contributor Author

done

@RedContritio
Copy link
Contributor

done

Docs-New 挂了,rerun 一下看看

@longranger2
Copy link
Contributor Author

done

Docs-New 挂了,rerun 一下看看

没有权限rerun

@luotao1 luotao1 merged commit 8311e9a into PaddlePaddle:develop Jan 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor PaddlePaddle Hackathon 飞桨黑客松活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants