Skip to content

Commit c558f05

Browse files
committed
fix
1 parent 4794d9c commit c558f05

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

paddle/fluid/framework/executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class Executor {
6060
void Run(const ProgramDesc& prog, Scope* scope, int block_id,
6161
bool create_local_scope = true, bool create_vars = true);
6262

63+
// This API is very slow.
6364
void Run(const ProgramDesc& program, Scope* scope,
6465
std::map<std::string, const LoDTensor*>* feed_targets,
6566
std::map<std::string, LoDTensor*>* fetch_targets,
@@ -79,6 +80,7 @@ class Executor {
7980
bool create_local_scope = true,
8081
bool create_vars = true, bool keep_kids = false);
8182

83+
// This API is very slow.
8284
void RunPreparedContext(ExecutorPrepareContext* ctx, Scope* scope,
8385
std::map<std::string, const LoDTensor*>* feed_targets,
8486
std::map<std::string, LoDTensor*>* fetch_targets,

paddle/fluid/inference/api/analysis_predictor.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ class AnalysisPredictor : public NativePaddlePredictor {
8080
sub_scope_ ? sub_scope_ : scope_.get(), 0);
8181

8282
// Get the feed_target_names and fetch_target_names
83-
feed_target_names_ = inference_program_->GetFeedTargetNames();
84-
fetch_target_names_ = inference_program_->GetFetchTargetNames();
83+
PrepareFeedFetch();
8584
return true;
8685
}
8786

0 commit comments

Comments
 (0)