diff --git a/.github/workflows/windows_vs2022_debug.yml b/.github/workflows/windows_vs2022_debug.yml index 8e7aafc9333eda..a7b7d2c3913092 100644 --- a/.github/workflows/windows_vs2022_debug.yml +++ b/.github/workflows/windows_vs2022_debug.yml @@ -48,7 +48,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} skip_when_only_listed_labels_set: 'docs' skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*' - + - name: Get target branch id: set_target_branch run: | @@ -81,8 +81,8 @@ jobs: affected-components: ${{ needs.smart_ci.outputs.affected_components }} os: 'windows_2022' build-type: 'Debug' - timeout-minutes: 60 - + timeout-minutes: 90 + Overall_Status: name: ci/gha_overall_status_windows_debug needs: [ Smart_CI, Build, CXX_Unit_Tests ] diff --git a/src/core/src/runtime/allocator.cpp b/src/core/src/runtime/allocator.cpp index b119ad4882291e..0676e9ab58fc37 100644 --- a/src/core/src/runtime/allocator.cpp +++ b/src/core/src/runtime/allocator.cpp @@ -86,7 +86,7 @@ bool Allocator::operator==(const Allocator& other) const { if (_impl == other._impl) { return true; } - return _impl->is_equal(*other._impl); + return other._impl && _impl->is_equal(*other._impl); }); } diff --git a/src/core/tests/ov_default_allocator_test.cpp b/src/core/tests/ov_default_allocator_test.cpp index 81fa65186ff08a..bd5a8f6cdc4297 100644 --- a/src/core/tests/ov_default_allocator_test.cpp +++ b/src/core/tests/ov_default_allocator_test.cpp @@ -10,6 +10,8 @@ #include "openvino/core/except.hpp" #include "openvino/runtime/allocator.hpp" +namespace ov::test { +using ::testing::_; using OVDefaultAllocatorTest = ::testing::Test; TEST_F(OVDefaultAllocatorTest, notThrowOnZeroSize) { @@ -59,3 +61,12 @@ TEST_F(OVDefaultAllocatorTest, canAllocate10KMemory) { EXPECT_EQ(ptr[9999], 11); allocator.deallocate(handle); } + +TEST_F(OVDefaultAllocatorTest, compareIfImplIsNull) { + auto a1 = ov::Allocator(); + auto a2 = std::move(a1); + + EXPECT_FALSE(a2 == a1); + OV_EXPECT_THROW(std::ignore = (a1 == a2), ov::Exception, _); +} +} // namespace ov::test diff --git a/src/inference/src/dev/core_impl.cpp b/src/inference/src/dev/core_impl.cpp index 4062187fd2e875..e561d6d47a8294 100644 --- a/src/inference/src/dev/core_impl.cpp +++ b/src/inference/src/dev/core_impl.cpp @@ -783,11 +783,16 @@ ov::Plugin ov::CoreImpl::get_plugin(const std::string& pluginName) const { // here we can store values like GPU.0, GPU.1 and we need to set properties to plugin // for each such .0, .1, .# device to make sure plugin can handle different settings for different // device IDs - for (auto pluginDesc : pluginRegistry) { - ov::DeviceIDParser parser(pluginDesc.first); - if (pluginDesc.first.find(deviceName) != std::string::npos && !parser.get_device_id().empty()) { - pluginDesc.second.defaultConfig[deviceKey] = parser.get_device_id(); - plugin.set_property(pluginDesc.second.defaultConfig); + { + std::unique_lock g_lock(get_mutex()); + for (auto pluginDesc : pluginRegistry) { + ov::DeviceIDParser parser(pluginDesc.first); + if (pluginDesc.first.find(deviceName) != std::string::npos && + !parser.get_device_id().empty()) { + g_lock.unlock(); + pluginDesc.second.defaultConfig[deviceKey] = parser.get_device_id(); + plugin.set_property(pluginDesc.second.defaultConfig); + } } } } diff --git a/src/inference/src/dev/plugin.cpp b/src/inference/src/dev/plugin.cpp index 0bc133d153fdd6..9d771870979bac 100644 --- a/src/inference/src/dev/plugin.cpp +++ b/src/inference/src/dev/plugin.cpp @@ -45,7 +45,7 @@ const ov::Version ov::Plugin::get_version() const { } void ov::Plugin::set_property(const ov::AnyMap& config) { - m_ptr->set_property(config); + OV_PLUGIN_CALL_STATEMENT(m_ptr->set_property(config)); } ov::SoPtr ov::Plugin::compile_model(const std::shared_ptr& model, @@ -108,7 +108,7 @@ ov::SoPtr ov::Plugin::get_default_context(const AnyMap& para } ov::Any ov::Plugin::get_property(const std::string& name, const AnyMap& arguments) const { - return {m_ptr->get_property(name, arguments), {m_so}}; + OV_PLUGIN_CALL_STATEMENT(return {m_ptr->get_property(name, arguments), {m_so}}); } bool ov::Plugin::supports_model_caching(const ov::AnyMap& arguments) const { diff --git a/src/inference/tests/functional/caching_test.cpp b/src/inference/tests/functional/caching_test.cpp index d474ee3bf8638c..1e5ab296e43afa 100644 --- a/src/inference/tests/functional/caching_test.cpp +++ b/src/inference/tests/functional/caching_test.cpp @@ -444,9 +444,7 @@ class CachingTest : public ::testing::TestWithParam index{0}; - auto plugin_path = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), - std::string("mock_engine") + OV_BUILD_POSTFIX); + const auto plugin_path = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), + std::string("mock_engine") + OV_BUILD_POSTFIX); runParallel( [&]() { - const std::string deviceName = std::to_string(index++); + const auto deviceName = std::to_string(index++); core.register_plugin(plugin_path, deviceName); core.get_versions(deviceName); core.unload_plugin(deviceName); @@ -110,12 +110,12 @@ TEST_F(CoreThreadingTests, RegisterPlugins) { # endif ov::Core core; std::atomic index{0}; - auto file_prefix = ov::test::utils::generateTestFilePrefix(); - auto plugin_path = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), - std::string("mock_engine") + OV_BUILD_POSTFIX); + const auto file_prefix = ov::test::utils::generateTestFilePrefix(); + const auto plugin_path = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), + std::string("mock_engine") + OV_BUILD_POSTFIX); auto getPluginXml = [&]() -> std::tuple { - std::string indexStr = std::to_string(index++); + const auto indexStr = std::to_string(index++); std::filesystem::path pluginsXML = file_prefix + indexStr + ".xml"; std::ofstream file(pluginsXML); @@ -127,7 +127,7 @@ TEST_F(CoreThreadingTests, RegisterPlugins) { file.flush(); file.close(); - return std::tie(pluginsXML, indexStr); + return std::make_tuple(pluginsXML, indexStr); }; runParallel( diff --git a/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp b/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp index 8704e8cdb32c78..247cd4bbe2992a 100644 --- a/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp +++ b/src/tests/test_utils/common_test_utils/include/common_test_utils/file_utils.hpp @@ -212,7 +212,6 @@ class MockPlugin : public ov::IPlugin { if (it.first == ov::num_streams.name()) num_streams = it.second.as(); } - OPENVINO_NOT_IMPLEMENTED; } ov::Any get_property(const std::string& name, const ov::AnyMap& arguments) const override { diff --git a/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp b/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp index fa27397156fa10..a419dc78630b6e 100644 --- a/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp +++ b/src/tests/test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp @@ -19,7 +19,7 @@ class MockInternalPlugin : public ov::IPlugin { ov::IPlugin* m_plugin = nullptr; - ov::AnyMap config; + ov::AnyMap config{}; public: explicit MockInternalPlugin(ov::IPlugin* target) : m_plugin(target) {} @@ -57,7 +57,7 @@ class MockInternalPlugin : public ov::IPlugin { ov::Any get_property(const std::string& name, const ov::AnyMap& arguments) const override { if (m_plugin) return m_plugin->get_property(name, arguments); - OPENVINO_NOT_IMPLEMENTED; + return ""; } ov::SoPtr create_context(const ov::AnyMap& remote_properties) const override {