-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Paddle Inference] clean unused code #48392
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -982,9 +976,6 @@ void AnalysisConfig::Update() { | |||
"but did not have the option -DWITH_CUSTOM_DEVICE compiled.")); | |||
#endif | |||
} | |||
if (ir_debug_) { | |||
pass_builder()->TurnOnDebug(); | |||
} |
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.
这个会影响到ir_debug吗
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
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描述里面,描述下移除的工作以及移除原因
@@ -115,7 +115,6 @@ class PD_INFER_DECL PaddlePassBuilder { | |||
/// \cond Protected | |||
std::vector<std::string> analysis_passes_{ | |||
{"ir_graph_build_pass", | |||
"ir_graph_clean_pass", |
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.
说明下移除IrInferCleanGraphPass的原因
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.
说明下移除IrInferCleanGraphPass的原因
ok,thanks.
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.
删除ir_graph_clean_pass 的逻辑。 #46888
@@ -153,25 +153,6 @@ T &GetFromScope(const framework::Scope &scope, const std::string &name) { | |||
return *var->GetMutable<T>(); | |||
} | |||
|
|||
static framework::proto::ProgramDesc LoadProgramDesc( |
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 since this function is unused. The duplicate implementations in ./paddle/fluid/inference/api/analysis_predictor.h . (Only for review )
@@ -36,15 +36,6 @@ using string::PrettyLogEndl; | |||
using string::Style; | |||
|
|||
IRPassManager::IRPassManager(Argument *argument) { | |||
ARGUMENT_CHECK_FIELD(argument, main_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.
explain why delete these code
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.
explain why delete these code
- ARGUMENT_CHECK_FIELD(argument, main_program);
调用此之前,paddle/fluid/inference/analysis/passes/ir_analysis_pass.cc,有判断逻辑。这一块应该只是为了下一行的创建graph_对象,然而graph_对象并没有被使用过。 - 40-47行的删除同上。
@@ -1934,64 +1921,6 @@ bool AnalysisPredictor::LoadProgramDesc() { | |||
return true; | |||
} | |||
|
|||
bool AnalysisPredictor::LoadParameters() { |
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.
why delete this funtion? And not delete it in .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.
why delete this funtion? And not delete it in .h ?
Not used. It should also be deleted in .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.
Keep it.
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
* [Release2.4] Revert python link prs (#48573) * Revert "Fix mac link python (#48017)" This reverts commit 3fa7a73. * Revert "[Cherry-pick] Fix python link error (#47811)" This reverts commit ff642c6. * Update config.go * [Paddle Inference] Add float_to_half_pass to support inference with mixed precision (#47993) * [Inference] optimize some code and fix some bug (#48780) * clean ir_pass_manager and fix map_depthwise_conv_to_conv_pass * fix unitest timeout * [Paddle Inference] clean unused code (#48392) * fix * update * update Co-authored-by: Chen Weihang <chenweihang@baidu.com>
PR types
Others
PR changes
Others
Describe
clean unused code in inference
ref to PR, ir_graph_clean_pass's job is no longer needed.
remove LoadProgramDesc in paddle/fluid/inference/analysis/helper.h, etc.
fix some pass naming conventions, etc.