-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[PIR] add python api for if #60895
[PIR] add python api for if #60895
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
9a8ef41
to
7027952
Compare
7027952
to
ffbfbba
Compare
cond = cpu_cond.data<bool>()[0]; | ||
#else | ||
PADDLE_THROW(paddle::platform::errors::PreconditionNotMet( | ||
"This version of PaddlePaddle does NOT support GPU/XPU but got " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does NOT support GPU/XPU ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个目前是跟while的判定逻辑对齐的。
auto& cond_array = cond_var_->Get<VariableRefArray>(); | ||
cond = std::all_of( | ||
cond_array.begin(), cond_array.end(), [](const Variable* t) { | ||
return t->Get<phi::DenseTensor>().numel() != 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t 一定是 DenseTensor么,最好加一个检查?另外这里的判断逻辑就是要用tensor 的 numel 来判断么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
New features
PR changes
Others
Description
Other
Pcard-67164