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. 126/128 #192

Merged
merged 4 commits into from
Jul 26, 2023
Merged

转换规则 No. 126/128 #192

merged 4 commits into from
Jul 26, 2023

Conversation

co63oc
Copy link
Contributor

@co63oc co63oc commented Jul 23, 2023

@paddle-bot paddle-bot bot added the contributor External developers label Jul 23, 2023
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Jul 24, 2023
"""
import torch
torch.cuda.get_rng_state_all()
result = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

可以重写下compare函数,对get_rng_state_all输出结果进行判断下严格一些,可以判断是否属于Generator类型,参考paddle.seed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

from apibase import APIBase


class GetRngStateAllAPIBase(APIBase):
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个有点奇特,因为返回的是Generator的list,paddle_result应该是一个list,不过为啥没有报错呢

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改使用 assert验证

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 e3020de into PaddlePaddle:master Jul 26, 2023
@co63oc co63oc deleted the api126 branch August 19, 2023 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants