Skip to content

Commit

Permalink
fix ci coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
b3602sss committed Jun 4, 2021
1 parent e08d91b commit 16d776d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions paddle/fluid/inference/api/analysis_predictor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ static void DisablePrepareDataOpt(
std::shared_ptr<framework::ProgramDesc> inference_program, int block,
bool pre_disable_opt) {
bool disable_opt = false;
auto &infer_block = inference_program_->Block(block);
auto &infer_block = inference_program->Block(block);
for (auto *op : infer_block.AllOps()) {
if (disable_opt || pre_disable_opt) {
op->SetAttr("inference_force_prepare_data", true);
Expand All @@ -302,9 +302,8 @@ static void DisablePrepareDataOpt(
DisablePrepareDataOpt(inference_program, blockID,
disable_opt || pre_disable_opt);
}
if (IsPrepareDataOptTargetOp(op)) {
disable_opt = true;
}
// disable prepare data if unfriendly op is found
disable_opt = IsPrepareDataOptTargetOp(op);
}
}

Expand Down

1 comment on commit 16d776d

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.