-
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] Support if op exe #57801
[PIR] Support if op exe #57801
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
Sorry to inform you that 4af0d5a's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
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
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 overall,comment可以单独提PR fix
value_2_var_name, | ||
var_name_2_id, | ||
variable_2_var_name); | ||
std::vector<int> inputs_id = GetValueIds(value, value_exec_info); |
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.
std::vector<int> inputs_id = GetValueIds(value, value_exec_info); | |
input_ids->emplace(value, GetValueIds(value, value_exec_info)); |
这里有input_ids和 inputs_id,感觉可以只保留最终的,不需要中间tmp变量,也就不需要解决命名问题了
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.
done
auto true_scope = sub_blocks.at(true_branch_block); | ||
true_branch_inter = | ||
Scope* true_scope = &(value_exec_info->GetScope()->NewScope()); | ||
true_branch_inter_ = |
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.
在哪里 delete 这个new出来的对象的?
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.
子 Scope 的生命周期由父Scope 管理,NewScope 的返回值是一个引用,该函数的定义是:
/// Create a sub-scope. Returns a reference other than a pointer so
/// to prevent from manual deletion.
/// Mark it to const because that new kid scope cannot change parent scope.
Scope& NewScope() const;
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.
我指的是 true_branch_inter_ 这个
PADDLE_ENFORCE_EQ(interpreter::IsSupportedHeterPlace(place), | ||
true, | ||
phi::errors::Fatal("Unsupported current place %s", place)); | ||
|
||
auto& op_attributes = op->attributes(); | ||
|
||
if ((op->dialect()->name() == "pd_kernel") && |
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.
这里不推荐使用 == string 的方式,建议使用 KernelDialect::name()
|
||
if (op_name == "pd_op.shape") { | ||
return OpFuncType::kGpuSync; | ||
if (op_name == "pd_op.shape") { |
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.
paddle::dialect::ShapeOp::name()
* add * add * fix * fix * refine * delete sub_blocks * refine * refien * add ut * fix
* add * add * fix * fix * refine * delete sub_blocks * refine * refien * add ut * fix
* add * add * fix * fix * refine * delete sub_blocks * refine * refien * add ut * fix
PR types
Others
PR changes
Others
Description
支持 IfOp 执行。
Pcard-67164