diff --git a/inference-engine/src/gna_plugin/gna_plugin_internal.hpp b/inference-engine/src/gna_plugin/gna_plugin_internal.hpp index c6d8d8b79ed..9a57dbc123d 100644 --- a/inference-engine/src/gna_plugin/gna_plugin_internal.hpp +++ b/inference-engine/src/gna_plugin/gna_plugin_internal.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2018-2020 Intel Corporation +// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // @@ -17,6 +17,7 @@ namespace GNAPluginNS { class GNAPluginInternal : public InferenceEngine::InferencePluginInternal { private: + std::mutex syncCallsToLoadExeNetworkImpl; Config defaultConfig; std::weak_ptr plgPtr; std::shared_ptr GetCurrentPlugin() const { @@ -32,6 +33,7 @@ public: InferenceEngine::ExecutableNetworkInternal::Ptr LoadExeNetworkImpl( const InferenceEngine::CNNNetwork &network, const std::map &config) override { + std::lock_guard lock{ syncCallsToLoadExeNetworkImpl }; Config updated_config(defaultConfig); updated_config.UpdateFromMap(config); auto plg = std::make_shared(updated_config.keyConfigMap); diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/core_threading_tests.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/core_threading_tests.cpp index 1adbd58045b..4beebf8c118 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/core_threading_tests.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/core_threading_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // @@ -16,7 +16,7 @@ std::vector< std::tuple > paramsWithIterations{ params[0], param INSTANTIATE_TEST_CASE_P(GNA, CoreThreadingTests, testing::ValuesIn(params), CoreThreadingTests::getTestCaseName); -INSTANTIATE_TEST_CASE_P(DISABLED_GNA, CoreThreadingTestsWithIterations, +INSTANTIATE_TEST_CASE_P(GNA, CoreThreadingTestsWithIterations, testing::Combine(testing::ValuesIn(paramsWithIterations), testing::Values(3), testing::Values(4),