-
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
【Hackathon 6th No.50】add python api for pylayer op -part #60359
【Hackathon 6th No.50】add python api for pylayer op -part #60359
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
❌ The PR is not created using PR's template. You can refer to this Demo. |
Sorry to inform you that 59c28b9's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
auto& fwd_block = pylayer_op.forward_block(); | ||
std::unordered_map<pir::Value, std::vector<int>> inputs; | ||
GetInputIds(op, *value_exec_info, &inputs); | ||
auto fwd_outside_inputs = |
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.
auto fwd_outside_inputs = | |
const auto fwd_outside_inputs = |
后续可以留意下,对于可const的,尽量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.
好的,下一个 pr 修改
#include "paddle/fluid/framework/new_executor/interpreter/execution_config.h" | ||
|
||
namespace ir { | ||
class Operation; |
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.
这个前置声明是做什么的?或者这里应该是namespace pir ? 可以考虑是否可以删除
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.
好的,下一个 pr 修改
} else if (inner_var->IsType<phi::TensorArray>()) { | ||
const auto& inner_array = inner_var->Get<phi::TensorArray>(); | ||
auto* output_array = output_vars[i]->GetMutable<phi::TensorArray>(); | ||
// output_array->clear(); |
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.
好的,下一个 pr 修改
std::unique_ptr<pir::Block> &&fwd_block) { | ||
VLOG(4) << "Start build PyLayerOp"; | ||
if (fwd_block && !fwd_block->empty() && | ||
fwd_block->back().isa<pir::YieldOp>()) { |
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.
fwd_block->back().isa<pir::YieldOp>()
这个不作为if条件,而是要作为一个ENFORCE检查是不是更好一些?
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.
好的,下一个 pr 修改
@@ -0,0 +1,173 @@ | |||
// Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. |
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.
// Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. | |
// Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved. |
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.
好的,下一个 pr 修改
@@ -0,0 +1,64 @@ | |||
// Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. |
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.
// Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. | |
// Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved. |
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.
好的,下一个 pr 修改
PR types
Others
PR changes
Others
Description
related issuse: #60688
Main Works
CopyBranchOutput
function fromif_instruction.cc
toinstruction_util.cc
. BecauseCopyBranchOutput
can be reused by bothif_instruction
andpylayer_instruction
.Pcard-80565