Sync model loading from different threads using single Core (#4842)
- Enable tests
This commit is contained in:
parent
e7b9b021ae
commit
985adb8223
@ -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);
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user