-
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] lowering group op through op fusion && fusion merge pass and kernel jit pass #58193
[PIR] lowering group op through op fusion && fusion merge pass and kernel jit pass #58193
Conversation
… test_pir_cinn_softmax
… test_pir_cinn_softmax
… test_pir_cinn_softmax
… test_pir_cinn_softmax
… test_pir_cinn_softmax
… test_pir_cinn_softmax
…e/Paddle into connect_softmax_all_path
… connect_softmax_all_path
… connect_softmax_all_path
… connect_softmax_all_path
你的PR提交成功,感谢你对开源项目的贡献! |
❌ The PR is not created using PR's template. You can refer to this Demo. |
… connect_softmax_all_path
… connect_softmax_all_path
… connect_softmax_all_path
… connect_softmax_all_path
… connect_softmax_all_path
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频繁被冲突,comment可以单独提PR修复,LGTM overall
namespace ir { | ||
|
||
std::vector<pir::Value> GetBlockOutsideInput( | ||
const std::vector<pir::Operation*> op_list) { |
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.
const std::vector<pir::Operation*> op_list) { | |
const std::vector<pir::Operation*>& op_list) { |
} | ||
|
||
std::vector<pir::Value> GetBlockOutsideOutput( | ||
const std::vector<pir::Operation*> op_list) { |
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.
const std::vector<pir::Operation*> op_list) { | |
const std::vector<pir::Operation*>& op_list) { |
"Only support one group after group fusion")); | ||
for (auto group : group_list) { | ||
auto ir_compiler = | ||
new cinn::hlir::framework::PIRCompiler(*program, target, scope); |
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.
这里会有潜在的mem leak风险,如之前讨论,我们还没有确定最终如何统一管理PIRCompiler 对象,但可以先简单地用单例持有下,这样能保证退出后可以delete掉这个new的对象
return vec_res; | ||
} | ||
|
||
std::unique_ptr<pir::Program> CINNGroupLoweringPass(::pir::Program* program) { |
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::unique_ptr<pir::Program> CINNGroupLoweringPass(::pir::Program* program) { | |
std::unique_ptr<pir::Program> CINNGroupLoweringPass(const ::pir::Program* program) { |
这里可以const一下?
@@ -61,9 +61,11 @@ std::vector<pir::CUDAJITInfo> PIRCompiler::BuildCUDAJITInfo( | |||
|
|||
auto fn_ptrs = compiler_->GetFnPtr(); | |||
|
|||
auto* compilter_ptr = compiler_.release(); |
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.
这里release后,jit.info是不是仅持有了指向资源的指针,但其实没有负责析构(即delete)它?
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来处理这块
…rnel jit pass (PaddlePaddle#58193) * update * update * revert some code * update * poish print * fix compile bug * update * update * polish code * update * update * update * update * update * remove useless code * remove useless code * remove useless code * fix compile bug
…rnel jit pass (PaddlePaddle#58193) * update * update * revert some code * update * poish print * fix compile bug * update * update * polish code * update * update * update * update * update * remove useless code * remove useless code * remove useless code * fix compile bug
…rnel jit pass (PaddlePaddle#58193) * update * update * revert some code * update * poish print * fix compile bug * update * update * polish code * update * update * update * update * update * remove useless code * remove useless code * remove useless code * fix compile bug
PR types
Function optimization
PR changes
Others
Description
TODO:
当前group中的input 和output 存在问题,pr中进行了限制,会在新PR中进行优化
Pcard-67164