-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -195,5 +195,6 @@ void NaiveExecutor::ResetTrtOps(int num) { | |
} | ||
#endif | ||
} | ||
|
||
} // namespace framework | ||
} // namespace paddle |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
graph_ = std::unique_ptr<Graph>(new Graph(argument->main_program())); | ||
if (argument->Has("scope")) { | ||
auto *scope_ptr = argument->scope_ptr(); | ||
PADDLE_ENFORCE_NOT_NULL(scope_ptr, | ||
platform::errors::PreconditionNotMet( | ||
"The scope ptr should not be nullptr.")); | ||
graph_->SetNotOwned(framework::ir::kParamScopeAttr, scope_ptr); | ||
} | ||
disable_logs_ = argument->disable_logs(); | ||
|
||
ARGUMENT_CHECK_FIELD(argument, ir_analysis_passes); | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -770,13 +770,7 @@ void AnalysisConfig::Update() { | |
((use_custom_device() ^ pass_builder_->use_custom_device()))) { | ||
if (use_gpu()) { | ||
pass_builder_.reset(new GpuPassStrategy); | ||
|
||
if (use_tensorrt_) { | ||
// Append after the Affine_channel_conv_fuse pass. | ||
pass_builder()->InsertPass(3, "tensorrt_subgraph_pass"); | ||
} | ||
} else if (use_ipu()) { | ||
VLOG(1) << "IpuPassStrategy has been used for new."; | ||
pass_builder_.reset(new IpuPassStrategy); | ||
} else if (use_xpu()) { | ||
PADDLE_ENFORCE_EQ( | ||
|
@@ -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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 后面还有对应逻辑的,不会影响。 |
||
} | ||
|
||
std::string AnalysisConfig::SerializeInfoCache() { | ||
|
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 )