CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
【pir_save_load】support pir for jit_layer #67910
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
|
8b84e44
to
a829977
Compare
@@ -772,6 +772,8 @@ void BuildScope(const pir::Block& block, | |||
const_cast<Scope*>(value_exe_info->GetScope()->root())); | |||
|
|||
VLOG(6) << "Start handle keyword blockargument!"; | |||
|
|||
|
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.
删除无用的修改
#include "paddle/fluid/framework/block_desc.h" | ||
#include "paddle/fluid/framework/ir/graph.h" | ||
#include "paddle/fluid/framework/ir/graph_helper.h" | ||
#include "paddle/fluid/framework/ir/pass.h" |
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.
18-21是不需要的
// onednn_pass->Set("mkldnn_enabled_op_types", | ||
// new std::unordered_set<std::string>({})); | ||
// onednn_pass->Apply(&graph); | ||
// #endif |
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/fluid/jit/serializer.cc
Outdated
layer.SetEngine( | ||
func_name, | ||
utils::MakePirEngine<PirInterpreterEngine>( | ||
pir_info, params_dict, place, std::move(paddle::dialect::PdOpLowerToKernelPass(pir_info->Program().get(), place)))); |
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.
这个pdoplowertokernelpass加在paddle/fluid/jit/engine/pir_interpreter_engine.cc 65行调用interpretor_core 的位置再处理prog 比较合适
paddle/fluid/jit/serializer.cc
Outdated
PD_THROW("Invalid JitLayer engine type."); | ||
if(FLAGS_enable_pir_api){ | ||
auto pir_info = std::dynamic_pointer_cast<PirFunctionInfo>(base_info); | ||
if (FLAGS_jit_engine_type == "Predictor") { |
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.
这里不需要判断这个flag, 默认setengine 就可以
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.
将test_jit_layer.py 测试从deprecated目录里移到原始目录,完成pir 的ci 测试
474c02b
to
bb4794b
Compare
bb4794b
to
66e8b86
Compare
9537ead
into
PaddlePaddle:develop
hi, @eggman-1024
|
PR Category
Execute Infrastructure
PR Types
New features
Description
支持pir 下jit layer load 执行
https://www.yuque.com/ruizhidedahuluobutuzi12581/kq7oeb/vabxkqi92ou0t98x?singleDoc#