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

映射文档 No.50, 80 #5933

Merged
merged 3 commits into from
Jul 4, 2023
Merged

映射文档 No.50, 80 #5933

merged 3 commits into from
Jul 4, 2023

Conversation

co63oc
Copy link
Contributor

@co63oc co63oc commented Jun 13, 2023

#5691

映射文档 No.50, 80

部分API未添加为已有文档

@paddle-bot
Copy link

paddle-bot bot commented Jun 13, 2023

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

@luotao1 luotao1 self-assigned this Jun 26, 2023
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
没有文档链接就先别写就行

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.

看起来torch的get_rng_state_all/set_rng_state_all对应我们的get_rng_state/set_rng_state。

而get_rng_state/set_rng_state其实是没有对应的,或者至少也是组合才能实现。如果要写get_rng_state/set_rng_state这两个,建议也要强调下torch是针对单个generator处理,我们是处理全部的generator

@co63oc
Copy link
Contributor Author

co63oc commented Jun 29, 2023

看起来torch的get_rng_state_all/set_rng_state_all对应我们的get_rng_state/set_rng_state。

而get_rng_state/set_rng_state其实是没有对应的,或者至少也是组合才能实现。如果要写get_rng_state/set_rng_state这两个,建议也要强调下torch是针对单个generator处理,我们是处理全部的generator

那是不是映射为

torch paddle
torch.cuda.get_rng_state paddle.get_rng_state 指定设备或当前设备
torch.cuda.get_rng_state_all paddle.get_cuda_rng_state 所有设备
torch.cuda.set_rng_state paddle.set_rng_state 指定设备或当前设备
torch.cuda.set_rng_state_all paddle.set_cuda_rng_state 所有设备

https://shimo.im/sheets/RKAWVnVNopC1NKk8/1ihYi 映射不同
图片

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.

LGTM

@zhwesky2010 zhwesky2010 merged commit 9818a5b into PaddlePaddle:develop Jul 4, 2023
@co63oc co63oc deleted the doc0613 branch July 25, 2023 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants