[VPU] Enable new InferRequest behavior tests with OV 2.0 (#9301)
This commit is contained in:
1 parent
32bc7840fc
commit
c87ac722b1
11 files changed
+299
-2
No files matched your search
@@ -118,7 +118,7 @@ public:
|
||||
const std::string& operator[](const std::string& key) const;
|
||||
|
||||
InferenceEngine::Parameter asParameter(const std::string& key) const;
|
||||
|
||||
std::unordered_map<std::string, std::string> getValues() const {return values;}
|
||||
virtual void validate() const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -236,6 +236,15 @@ InferenceEngine::Parameter ExecutableNetwork::GetMetric(const std::string &name)
|
||||
}
|
||||
}
|
||||
|
||||
InferenceEngine::Parameter ExecutableNetwork::GetConfig(const std::string &name) const {
|
||||
auto confValues = _config.getValues();
|
||||
auto it = confValues.find(name);
|
||||
if (it != confValues.end()) {
|
||||
return it->second;
|
||||
}
|
||||
VPU_THROW_EXCEPTION << "Unsupported ExecutableNetwork config key: " << name;
|
||||
}
|
||||
|
||||
std::shared_ptr<ngraph::Function> ExecutableNetwork::GetExecGraphInfo() {
|
||||
auto perfInfo = _executor->getPerfTimeInfo(_graphDesc._graphHandle);
|
||||
if (_graphDesc._name == importedNetworkName)
|
||||
|
||||
@@ -101,6 +101,7 @@ public:
|
||||
}
|
||||
|
||||
ie::Parameter GetMetric(const std::string &name) const override;
|
||||
InferenceEngine::Parameter GetConfig(const std::string &name) const override;
|
||||
|
||||
std::shared_ptr<ngraph::Function> GetExecGraphInfo() override;
|
||||
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "behavior/ov_infer_request/callback.hpp"
|
||||
|
||||
using namespace ov::test::behavior;
|
||||
|
||||
namespace {
|
||||
const std::vector<std::map<std::string, std::string>> configs = {
|
||||
{},
|
||||
};
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> multiConfigs = {
|
||||
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}}
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestCallbackTests,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
|
||||
::testing::ValuesIn(configs)),
|
||||
OVInferRequestCallbackTests::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestCallbackTests,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_MULTI),
|
||||
::testing::ValuesIn(multiConfigs)),
|
||||
OVInferRequestCallbackTests::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestCallbackTests,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_AUTO),
|
||||
::testing::ValuesIn(multiConfigs)),
|
||||
OVInferRequestCallbackTests::getTestCaseName);
|
||||
} // namespace
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "behavior/ov_infer_request/cancellation.hpp"
|
||||
|
||||
using namespace ov::test::behavior;
|
||||
|
||||
namespace {
|
||||
const std::vector<std::map<std::string, std::string>> configs = {
|
||||
{},
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestCancellationTests,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
|
||||
::testing::ValuesIn(configs)),
|
||||
OVInferRequestCancellationTests::getTestCaseName);
|
||||
} // namespace
|
||||
+1
-1
@@ -23,7 +23,7 @@ const std::vector<std::map<std::string, std::string>> configs = {
|
||||
};
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> HeteroConfigs = {
|
||||
{{"TARGET_FALLBACK", CommonTestUtils::DEVICE_CPU}}
|
||||
{{"TARGET_FALLBACK", CommonTestUtils::DEVICE_MYRIAD}}
|
||||
};
|
||||
|
||||
std::shared_ptr<ngraph::Function> getFunction1() {
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "behavior/ov_infer_request/io_tensor.hpp"
|
||||
|
||||
using namespace ov::test::behavior;
|
||||
|
||||
namespace {
|
||||
const std::vector<std::map<std::string, std::string>> configs = {
|
||||
{},
|
||||
};
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> Multiconfigs = {
|
||||
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}}
|
||||
};
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> Autoconfigs = {
|
||||
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}}
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestIOTensorTest,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
|
||||
::testing::ValuesIn(configs)),
|
||||
OVInferRequestIOTensorTest::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestIOTensorTest,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_MULTI),
|
||||
::testing::ValuesIn(Multiconfigs)),
|
||||
OVInferRequestIOTensorTest::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestIOTensorTest,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_AUTO),
|
||||
::testing::ValuesIn(Autoconfigs)),
|
||||
OVInferRequestIOTensorTest::getTestCaseName);
|
||||
|
||||
std::vector<ov::element::Type> prcs = {
|
||||
ov::element::boolean,
|
||||
ov::element::bf16,
|
||||
ov::element::f16,
|
||||
ov::element::f32,
|
||||
ov::element::f64,
|
||||
ov::element::i4,
|
||||
ov::element::i8,
|
||||
ov::element::i16,
|
||||
ov::element::i32,
|
||||
ov::element::i64,
|
||||
ov::element::u1,
|
||||
ov::element::u4,
|
||||
ov::element::u8,
|
||||
ov::element::u16,
|
||||
ov::element::u32,
|
||||
ov::element::u64,
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestIOTensorSetPrecisionTest,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(prcs),
|
||||
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
|
||||
::testing::ValuesIn(configs)),
|
||||
OVInferRequestIOTensorSetPrecisionTest::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestIOTensorSetPrecisionTest,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(prcs),
|
||||
::testing::Values(CommonTestUtils::DEVICE_MULTI),
|
||||
::testing::ValuesIn(Multiconfigs)),
|
||||
OVInferRequestIOTensorSetPrecisionTest::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestIOTensorSetPrecisionTest,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(prcs),
|
||||
::testing::Values(CommonTestUtils::DEVICE_AUTO),
|
||||
::testing::ValuesIn(Autoconfigs)),
|
||||
OVInferRequestIOTensorSetPrecisionTest::getTestCaseName);
|
||||
|
||||
} // namespace
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "behavior/ov_infer_request/multithreading.hpp"
|
||||
|
||||
using namespace ov::test::behavior;
|
||||
|
||||
namespace {
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> configs = {
|
||||
{},
|
||||
};
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> Multiconfigs = {
|
||||
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}}
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestMultithreadingTests,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
|
||||
::testing::ValuesIn(configs)),
|
||||
OVInferRequestMultithreadingTests::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestMultithreadingTests,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_MULTI),
|
||||
::testing::ValuesIn(Multiconfigs)),
|
||||
OVInferRequestMultithreadingTests::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestMultithreadingTests,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_AUTO),
|
||||
::testing::ValuesIn(Multiconfigs)),
|
||||
OVInferRequestMultithreadingTests::getTestCaseName);
|
||||
|
||||
} // namespace
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "behavior/ov_infer_request/perf_counters.hpp"
|
||||
#include <openvino/core/type.hpp>
|
||||
#include <openvino/op/constant.hpp>
|
||||
|
||||
using namespace ov::test::behavior;
|
||||
|
||||
namespace {
|
||||
TEST_P(OVInferRequestPerfCountersTest, CheckOperationInProfilingInfo) {
|
||||
req = execNet.create_infer_request();
|
||||
ASSERT_NO_THROW(req.infer());
|
||||
std::vector<ov::runtime::ProfilingInfo> profiling_info;
|
||||
ASSERT_NO_THROW(profiling_info = req.get_profiling_info());
|
||||
for (const auto& op : function->get_ops()) {
|
||||
if (ov::is_type<ov::op::v0::Result>(op) || ov::is_type<ov::op::v0::Constant>(op))
|
||||
continue;
|
||||
auto op_is_in_profiling_info = std::any_of(std::begin(profiling_info), std::end(profiling_info),
|
||||
[&] (const ov::runtime::ProfilingInfo& info) {
|
||||
if (info.node_name.find(op->get_friendly_name() + "_") != std::string::npos || info.node_name == op->get_friendly_name()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if (!op_is_in_profiling_info) {
|
||||
std::cout << "Node w/o prof info: " << op->get_friendly_name()
|
||||
<< ", type : " << op->get_type_name() << std::endl;
|
||||
}
|
||||
ASSERT_TRUE(op_is_in_profiling_info) << "For op: " << op;
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> configs = {
|
||||
{}
|
||||
};
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> Multiconfigs = {
|
||||
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}}
|
||||
};
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> Autoconfigs = {
|
||||
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}}
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestPerfCountersTest,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
|
||||
::testing::ValuesIn(configs)),
|
||||
OVInferRequestPerfCountersTest::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestPerfCountersTest,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_MULTI),
|
||||
::testing::ValuesIn(Multiconfigs)),
|
||||
OVInferRequestPerfCountersTest::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestPerfCountersTest,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_AUTO),
|
||||
::testing::ValuesIn(Autoconfigs)),
|
||||
OVInferRequestPerfCountersTest::getTestCaseName);
|
||||
} // namespace
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "behavior/ov_infer_request/wait.hpp"
|
||||
|
||||
using namespace ov::test::behavior;
|
||||
|
||||
namespace {
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> configs = {
|
||||
{},
|
||||
};
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> Multiconfigs = {
|
||||
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}}
|
||||
};
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> Autoconfigs = {
|
||||
{{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_MYRIAD}}
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, OVInferRequestWaitTests,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_MYRIAD),
|
||||
::testing::ValuesIn(configs)),
|
||||
OVInferRequestWaitTests::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Multi_BehaviorTests, OVInferRequestWaitTests,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_MULTI),
|
||||
::testing::ValuesIn(Multiconfigs)),
|
||||
OVInferRequestWaitTests::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, OVInferRequestWaitTests,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_AUTO),
|
||||
::testing::ValuesIn(Autoconfigs)),
|
||||
OVInferRequestWaitTests::getTestCaseName);
|
||||
|
||||
} // namespace
|
||||
@@ -24,6 +24,8 @@ std::vector<std::string> disabledTestPatterns() {
|
||||
".*InferDynamicNetworkWithSetTensor2times.*",
|
||||
".*InferRequestDynamicTests.GetSameTensor2times.*",
|
||||
".*InferRequestDynamicTests.InferDynamicNetworkWithSetTensor.*",
|
||||
// TODO: Issue: 67972
|
||||
R"(.*Hetero.*InferRequestDynamicTests.*)",
|
||||
// TODO: Issue: 26268
|
||||
".*ConcatLayerTest.*axis=0.*",
|
||||
// TODO: Issue 31197
|
||||
|
||||
Reference in new issue
Block a user