Sync model loading from different threads using single Core (#4842)

- Enable tests
This commit is contained in:
Krzysztof Bruniecki 2021-03-24 11:44:23 +01:00 committed by GitHub
parent e7b9b021ae
commit 985adb8223
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -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 <GNAPlugin> plgPtr;
std::shared_ptr<GNAPlugin> GetCurrentPlugin() const {
@ -32,6 +33,7 @@ public:
InferenceEngine::ExecutableNetworkInternal::Ptr LoadExeNetworkImpl(
const InferenceEngine::CNNNetwork &network,
const std::map<std::string, std::string> &config) override {
std::lock_guard<std::mutex> lock{ syncCallsToLoadExeNetworkImpl };
Config updated_config(defaultConfig);
updated_config.UpdateFromMap(config);
auto plg = std::make_shared<GNAPlugin>(updated_config.keyConfigMap);

View File

@ -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<Device, Config> > 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),