Skip to content

Commit

Permalink
reuse streams of compile_model for sync infer
Browse files Browse the repository at this point in the history
  • Loading branch information
xufang-lisa committed Oct 16, 2023
1 parent 6f60177 commit 85f1e13
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ class INFERENCE_ENGINE_1_0_DEPRECATED AsyncInferRequestThreadSafeDefault : publi
explicit ImmediateStreamsExecutor(const IStreamsExecutor::Ptr& streamsExecutor)
: _streamsExecutor{streamsExecutor} {}
void run(InferenceEngine::Task task) override {
_streamsExecutor->Execute(std::move(task));
std::vector<Task> tasks;
tasks.push_back(std::move(task));
_streamsExecutor->run_and_wait(tasks);
}
IStreamsExecutor::Ptr _streamsExecutor;
};
Expand Down

0 comments on commit 85f1e13

Please sign in to comment.