-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added MockNPU/CPU, FakeNPU/CPU and functional tests #25236
Conversation
} | ||
T med() const { | ||
std::vector<T> cpy(records); | ||
std::nth_element(cpy.begin(), cpy.begin() + cpy.size()/2, cpy.end()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting why do we need intermediate vector? just use c.begin() c.end() in nth_element call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed that file!
dc2c45b
to
c07488a
Compare
}; | ||
|
||
|
||
} // anonymous namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing line at the end of file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was also removed! Will be pushed in next PR!
934ed93
to
fa552db
Compare
3da60b5
to
0ab903f
Compare
55b25f1
to
2e34b83
Compare
src/plugins/intel_npu/tests/functional/behavior/npuw/mocks/fake_plugins.cpp
Outdated
Show resolved
Hide resolved
src/plugins/intel_npu/tests/functional/behavior/npuw/mocks/mock_plugins.hpp
Show resolved
Hide resolved
src/plugins/intel_npu/tests/functional/behavior/npuw/mocks/fake_plugins.cpp
Outdated
Show resolved
Hide resolved
src/plugins/intel_npu/tests/functional/behavior/npuw/use_case_tests.cpp
Outdated
Show resolved
Hide resolved
9688cb7
to
7c196a2
Compare
auto param = std::make_shared<ov::opset11::Parameter>(ov::element::i64, ov::PartialShape{1, 3, 2, 2}); | ||
param->set_friendly_name("input"); | ||
auto const_value = ov::opset11::Constant::create(ov::element::i64, ov::Shape{1, 1, 1, 1}, {1}); | ||
const_value->set_friendly_name("const_val"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case, why i64
for this simple arith? Not the most obvious choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just was copied from some network implementations in tests..
EXPECT_CALL(*npu_plugin, get_property).Times(AnyNumber()); | ||
EXPECT_CALL(*npu_plugin, get_property(std::string("AVAILABLE_DEVICES"), _)).Times(1); | ||
EXPECT_CALL(*cpu_plugin, get_property).Times(AnyNumber()); | ||
EXPECT_CALL(*cpu_plugin, get_property(std::string("AVAILABLE_DEVICES"), _)).Times(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these mocks or the real plugins tested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are mock plugins, will rename them, thanks!
std::shared_ptr<MockNpuPlugin> npu_plugin; | ||
std::shared_ptr<MockCpuPlugin> cpu_plugin; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I'd recommend renaming these two to mock_npu_plugin
/ mock_cpu_plugin
to avoid disambiguation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will do! Will update in the following PR!
Details:
Tickets: