Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/windows_vs2022_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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 ]
Expand Down
2 changes: 1 addition & 1 deletion src/core/src/runtime/allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}

Expand Down
11 changes: 11 additions & 0 deletions src/core/tests/ov_default_allocator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
15 changes: 10 additions & 5 deletions src/inference/src/dev/core_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::mutex> 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);
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/inference/src/dev/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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::ICompiledModel> ov::Plugin::compile_model(const std::shared_ptr<const ov::Model>& model,
Expand Down Expand Up @@ -108,7 +108,7 @@ ov::SoPtr<ov::IRemoteContext> 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 {
Expand Down
4 changes: 1 addition & 3 deletions src/inference/tests/functional/caching_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,7 @@ class CachingTest : public ::testing::TestWithParam<std::tuple<TestParam, std::s
return res;
}));

EXPECT_CALL(plugin, set_property(_)).Times(AnyNumber()).WillRepeatedly(Invoke([](const ov::AnyMap&) {
OPENVINO_NOT_IMPLEMENTED;
}));
EXPECT_CALL(plugin, set_property(_)).Times(AnyNumber());
}
};

Expand Down
16 changes: 8 additions & 8 deletions src/inference/tests/functional/ov_core_threading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ TEST_F(CoreThreadingTests, SetConfigPluginDoesNotExist) {
TEST_F(CoreThreadingTests, RegisterPlugin) {
ov::Core core;
std::atomic<int> 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);
Expand All @@ -110,12 +110,12 @@ TEST_F(CoreThreadingTests, RegisterPlugins) {
# endif
ov::Core core;
std::atomic<unsigned int> 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::filesystem::path, std::string> {
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);

Expand All @@ -127,7 +127,7 @@ TEST_F(CoreThreadingTests, RegisterPlugins) {
file.flush();
file.close();

return std::tie(pluginsXML, indexStr);
return std::make_tuple(pluginsXML, indexStr);
};

runParallel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ class MockPlugin : public ov::IPlugin {
if (it.first == ov::num_streams.name())
num_streams = it.second.as<ov::streams::Num>();
}
OPENVINO_NOT_IMPLEMENTED;
}

ov::Any get_property(const std::string& name, const ov::AnyMap& arguments) const override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down Expand Up @@ -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<ov::IRemoteContext> create_context(const ov::AnyMap& remote_properties) const override {
Expand Down
Loading