[CPU] Graphs are created in compiled_model constructor (#10872)

This commit is contained in:
Anton Pankratov
2022-03-30 10:02:12 +03:00
committed by GitHub
parent e7b35c3b00
commit 614a6a3457
2 changed files with 13 additions and 8 deletions

View File

@@ -126,12 +126,19 @@ ExecNetwork::ExecNetwork(const InferenceEngine::CNNNetwork &network,
std::vector<Task> tasks; tasks.resize(streams);
_graphs.resize(streams);
if (_cfg.streamExecutorConfig._streams != 0) {
for (auto&& task : tasks) {
task = [this] {
ExecNetwork::GetGraph();
};
}
_taskExecutor->runAndWait(tasks);
auto all_graphs_ready = [&] {
return std::all_of(_graphs.begin(), _graphs.end(), [&] (Graph& graph) {
return graph.IsReady();
});
};
do {
for (auto&& task : tasks) {
task = [this] {
ExecNetwork::GetGraph();
};
}
_taskExecutor->runAndWait(tasks);
} while (!all_graphs_ready());
} else {
ExecNetwork::GetGraph();
}

View File

@@ -112,8 +112,6 @@ std::vector<std::string> disabledTestPatterns() {
R"(.*smoke_Auto_BehaviorTests.*DynamicOutputToDynamicInput.*)",
R"(.*smoke_Auto_BehaviorTests.*DynamicInputToDynamicOutput.*)",
// TODO: Issue CVS-51680
R"(.*BehaviorTests.*canRun3SyncRequestsConsistentlyFromThreads.*CPU_THROUGHPUT.*)",
// Issue 67214
R"(smoke_PrePostProcess.*resize_and_convert_layout_i8.*)",
// TODO: CVS-67255