-
Notifications
You must be signed in to change notification settings - Fork 825
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
Scalar::As() support being called in device #8348
Conversation
要不直接把Maybe的接口去掉,default的时候assert |
我觉得可以,这个类的构造方法就保证了初始化吧,所以应该不需要调用者检查错误 |
这样的话要改动的地方蛮多的,functional里面用Scalar.As很多 |
如果去人这个 Maybe 是没必要,多改几个地方也没关系,因为这个改动应该不会导致额外的错误, 或者修改 As 接口直接返回 Maybe::Ok(Value()),这样总是返回ok,可以减少其他地方的改动,保持兼容,后面新的调用鼓励用Value |
那就还是都改掉吧,我先把涉及到的地方都改掉你们再确认下maybe是不是可以直接移除的 |
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/8348/ |
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
Speed stats:
|
No description provided.