Migrated all subgraph tests after quantization graphs (#20381)
* Migrated all subgraph tests after quantization graphs * Fixed skip tests config * Add alias for NPU * Try to fix NPU * Remove unsupported precisions * Remove GNA test * Remove more tests
This commit is contained in:
parent
157041e6f8
commit
e289e8282d
@ -24,8 +24,8 @@ std::vector<std::string> disabledTestPatterns() {
|
||||
R"(.*(QuantGroupConv3D).*)",
|
||||
// TODO: Issue: 34518
|
||||
R"(.*RangeLayerTest.*)",
|
||||
R"(.*(RangeAddSubgraphTest).*Start=1.2.*Stop=(5.2|-5.2).*Step=(0.1|-0.1).*netPRC=FP16.*)",
|
||||
R"(.*(RangeNumpyAddSubgraphTest).*netPRC=FP16.*)",
|
||||
R"(.*(RangeAddSubgraphTest).*Start=1.2.*Stop=(5.2|-5.2).*Step=(0.1|-0.1).*ET=f16.*)",
|
||||
R"(.*(RangeNumpyAddSubgraphTest).*ET=f16.*)",
|
||||
// TODO: Issue: 43793
|
||||
R"(.*InferRequestPreprocessDynamicallyInSetBlobTest.*iPRC=0.*_iLT=1.*)",
|
||||
R"(.*InferRequestPreprocessDynamicallyInSetBlobTest.*oPRC=0.*_oLT=1.*)",
|
||||
|
@ -2,97 +2,76 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "subgraph_tests/range_add.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "subgraph_tests/range_add.hpp"
|
||||
#include "common_test_utils/test_constants.hpp"
|
||||
|
||||
using namespace SubgraphTestsDefinitions;
|
||||
using namespace ov::test;
|
||||
|
||||
namespace {
|
||||
|
||||
const std::vector<float> positiveStart = { 1.0f, 1.2f };
|
||||
const std::vector<float> positiveStop = { 5.0f, 5.2f };
|
||||
const std::vector<float> positiveStep = { 1.0f, 0.1f };
|
||||
const std::vector<float> positiveStart = {1.0f, 1.2f};
|
||||
const std::vector<float> positiveStop = {5.0f, 5.2f};
|
||||
const std::vector<float> positiveStep = {1.0f, 0.1f};
|
||||
|
||||
const std::vector<float> negativeStart = { 1.0f, 1.2f };
|
||||
const std::vector<float> negativeStop = { -5.0f, -5.2f };
|
||||
const std::vector<float> negativeStep = { -1.0f, -0.1f };
|
||||
const std::vector<float> negativeStart = {1.0f, 1.2f};
|
||||
const std::vector<float> negativeStop = {-5.0f, -5.2f};
|
||||
const std::vector<float> negativeStep = {-1.0f, -0.1f};
|
||||
|
||||
const std::vector<float> trunc_start = { 1.2f, 1.9f };
|
||||
const std::vector<float> trunc_stop = { 11.4f, 11.8f };
|
||||
const std::vector<float> trunc_step = { 1.3f, 2.8f };
|
||||
const std::vector<float> trunc_start = {1.2f, 1.9f};
|
||||
const std::vector<float> trunc_stop = {11.4f, 11.8f};
|
||||
const std::vector<float> trunc_step = {1.3f, 2.8f};
|
||||
|
||||
const std::vector<InferenceEngine::Precision> netPrecisions = {
|
||||
InferenceEngine::Precision::FP32,
|
||||
InferenceEngine::Precision::FP16 // "[NOT_IMPLEMENTED] Input image format FP16 is not supported yet...
|
||||
const std::vector<ov::element::Type> element_types = {
|
||||
ov::element::f32,
|
||||
ov::element::f16 // "[NOT_IMPLEMENTED] Input image format FP16 is not supported yet...
|
||||
};
|
||||
|
||||
// ------------------------------ V0 ------------------------------
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BasicPositive, RangeAddSubgraphTest,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(positiveStart),
|
||||
::testing::ValuesIn(positiveStop),
|
||||
::testing::ValuesIn(positiveStep),
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||
::testing::Values(InferenceEngine::Layout::ANY),
|
||||
::testing::Values(InferenceEngine::Layout::ANY),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
RangeAddSubgraphTest::getTestCaseName);
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BasicPositive,
|
||||
RangeAddSubgraphTest,
|
||||
::testing::Combine(::testing::ValuesIn(positiveStart),
|
||||
::testing::ValuesIn(positiveStop),
|
||||
::testing::ValuesIn(positiveStep),
|
||||
::testing::ValuesIn(element_types),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
RangeAddSubgraphTest::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BasicNegative, RangeAddSubgraphTest,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(negativeStart),
|
||||
::testing::ValuesIn(negativeStop),
|
||||
::testing::ValuesIn(negativeStep),
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||
::testing::Values(InferenceEngine::Layout::ANY),
|
||||
::testing::Values(InferenceEngine::Layout::ANY),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
RangeAddSubgraphTest::getTestCaseName);
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BasicNegative,
|
||||
RangeAddSubgraphTest,
|
||||
::testing::Combine(::testing::ValuesIn(negativeStart),
|
||||
::testing::ValuesIn(negativeStop),
|
||||
::testing::ValuesIn(negativeStep),
|
||||
::testing::ValuesIn(element_types),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
RangeAddSubgraphTest::getTestCaseName);
|
||||
|
||||
// ------------------------------ V4 ------------------------------
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BasicPositive, RangeNumpyAddSubgraphTest,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(positiveStart),
|
||||
::testing::ValuesIn(positiveStop),
|
||||
::testing::ValuesIn(positiveStep),
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||
::testing::Values(InferenceEngine::Layout::ANY),
|
||||
::testing::Values(InferenceEngine::Layout::ANY),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
RangeNumpyAddSubgraphTest::getTestCaseName);
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BasicPositive,
|
||||
RangeNumpyAddSubgraphTest,
|
||||
::testing::Combine(::testing::ValuesIn(positiveStart),
|
||||
::testing::ValuesIn(positiveStop),
|
||||
::testing::ValuesIn(positiveStep),
|
||||
::testing::ValuesIn(element_types),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
RangeNumpyAddSubgraphTest::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BasicNegative, RangeNumpyAddSubgraphTest,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(negativeStart),
|
||||
::testing::ValuesIn(negativeStop),
|
||||
::testing::ValuesIn(negativeStep),
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||
::testing::Values(InferenceEngine::Layout::ANY),
|
||||
::testing::Values(InferenceEngine::Layout::ANY),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
RangeNumpyAddSubgraphTest::getTestCaseName);
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BasicNegative,
|
||||
RangeNumpyAddSubgraphTest,
|
||||
::testing::Combine(::testing::ValuesIn(negativeStart),
|
||||
::testing::ValuesIn(negativeStop),
|
||||
::testing::ValuesIn(negativeStep),
|
||||
::testing::ValuesIn(element_types),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
RangeNumpyAddSubgraphTest::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BasicTruncateInputs, RangeNumpyAddSubgraphTest,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(trunc_start),
|
||||
::testing::ValuesIn(trunc_stop),
|
||||
::testing::ValuesIn(trunc_step),
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::Values(InferenceEngine::Precision::I32),
|
||||
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
|
||||
::testing::Values(InferenceEngine::Layout::ANY),
|
||||
::testing::Values(InferenceEngine::Layout::ANY),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
RangeNumpyAddSubgraphTest::getTestCaseName);
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BasicTruncateInputs,
|
||||
RangeNumpyAddSubgraphTest,
|
||||
::testing::Combine(::testing::ValuesIn(trunc_start),
|
||||
::testing::ValuesIn(trunc_stop),
|
||||
::testing::ValuesIn(trunc_step),
|
||||
::testing::ValuesIn(element_types),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
RangeNumpyAddSubgraphTest::getTestCaseName);
|
||||
} // namespace
|
||||
|
@ -2,22 +2,20 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "subgraph_tests/relu_shape_of.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "subgraph_tests/relu_shape_of.hpp"
|
||||
#include "common_test_utils/test_constants.hpp"
|
||||
|
||||
using namespace SubgraphTestsDefinitions;
|
||||
using namespace ov::test;
|
||||
|
||||
namespace {
|
||||
const std::vector<InferenceEngine::Precision> netPrecisions = {
|
||||
InferenceEngine::Precision::I32
|
||||
};
|
||||
const std::vector<ov::element::Type> input_types = {ov::element::i32};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Check, ReluShapeOfSubgraphTest,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::Values(std::vector<size_t>({20, 10, 10, 10})),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
ReluShapeOfSubgraphTest::getTestCaseName);
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Check,
|
||||
ReluShapeOfSubgraphTest,
|
||||
::testing::Combine(::testing::ValuesIn(input_types),
|
||||
::testing::Values(ov::element::i64),
|
||||
::testing::Values(ov::Shape{20, 10, 10, 10}),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
ReluShapeOfSubgraphTest::getTestCaseName);
|
||||
} // namespace
|
||||
|
@ -2,47 +2,46 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <vector>
|
||||
#include "subgraph_tests/reshape_squeeze_reshape_relu.hpp"
|
||||
#include "common_test_utils/test_constants.hpp"
|
||||
|
||||
using namespace SubgraphTestsDefinitions;
|
||||
#include <vector>
|
||||
|
||||
using namespace ov::test;
|
||||
|
||||
namespace {
|
||||
std::vector<ShapeAxesTuple> inputs{
|
||||
{{1, 1, 3}, {0, 1}},
|
||||
{{1, 1, 3}, {0}},
|
||||
{{1, 1, 3}, {1}},
|
||||
{{1, 3, 1}, {0, 2}},
|
||||
{{1, 3, 1}, {0}},
|
||||
{{1, 3, 1}, {2}},
|
||||
{{3, 1, 1}, {1, 2}},
|
||||
{{3, 1, 1}, {1}},
|
||||
{{3, 1, 1}, {2}},
|
||||
{{4, 1, 3, 1}, {1, 3}},
|
||||
{{4, 1, 1, 3}, {1, 2}},
|
||||
{{1, 4, 1, 3}, {0, 2}},
|
||||
{{1, 3, 5, 2, 1}, {0, 4}},
|
||||
{{3, 1, 2, 4, 4, 3}, {1}},
|
||||
{{1, 1, 1, 1, 1, 3}, {0, 1, 2, 3, 4}},
|
||||
{{1, 1, 1, 1, 1, 3}, {1, 3}},
|
||||
{{1}, {0}},
|
||||
};
|
||||
std::vector<ShapeAxesTuple> inputs{
|
||||
{{1, 1, 3}, {0, 1}},
|
||||
{{1, 1, 3}, {0}},
|
||||
{{1, 1, 3}, {1}},
|
||||
{{1, 3, 1}, {0, 2}},
|
||||
{{1, 3, 1}, {0}},
|
||||
{{1, 3, 1}, {2}},
|
||||
{{3, 1, 1}, {1, 2}},
|
||||
{{3, 1, 1}, {1}},
|
||||
{{3, 1, 1}, {2}},
|
||||
{{4, 1, 3, 1}, {1, 3}},
|
||||
{{4, 1, 1, 3}, {1, 2}},
|
||||
{{1, 4, 1, 3}, {0, 2}},
|
||||
{{1, 3, 5, 2, 1}, {0, 4}},
|
||||
{{3, 1, 2, 4, 4, 3}, {1}},
|
||||
{{1, 1, 1, 1, 1, 3}, {0, 1, 2, 3, 4}},
|
||||
{{1, 1, 1, 1, 1, 3}, {1, 3}},
|
||||
{{1}, {0}},
|
||||
};
|
||||
|
||||
std::vector<InferenceEngine::Precision> netPrecisions = {InferenceEngine::Precision::FP32,
|
||||
InferenceEngine::Precision::FP16,
|
||||
};
|
||||
std::vector<ov::element::Type> input_types = {
|
||||
ov::element::f32,
|
||||
ov::element::f16,
|
||||
};
|
||||
|
||||
const std::vector<ngraph::helpers::SqueezeOpType> opTypes = {
|
||||
ngraph::helpers::SqueezeOpType::SQUEEZE,
|
||||
ngraph::helpers::SqueezeOpType::UNSQUEEZE
|
||||
};
|
||||
const std::vector<ov::test::utils::SqueezeOpType> opTypes = {ov::test::utils::SqueezeOpType::SQUEEZE,
|
||||
ov::test::utils::SqueezeOpType::UNSQUEEZE};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_reshape_squeeze_reshape_relu, ReshapeSqueezeReshapeRelu,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(inputs),
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU),
|
||||
::testing::ValuesIn(opTypes)),
|
||||
ReshapeSqueezeReshapeRelu::getTestCaseName);
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_reshape_squeeze_reshape_relu,
|
||||
ReshapeSqueezeReshapeRelu,
|
||||
::testing::Combine(::testing::ValuesIn(inputs),
|
||||
::testing::ValuesIn(input_types),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU),
|
||||
::testing::ValuesIn(opTypes)),
|
||||
ReshapeSqueezeReshapeRelu::getTestCaseName);
|
||||
} // namespace
|
||||
|
@ -2,28 +2,20 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "subgraph_tests/split_conv_concat.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "subgraph_tests/split_conv_concat.hpp"
|
||||
#include "common_test_utils/test_constants.hpp"
|
||||
|
||||
using namespace SubgraphTestsDefinitions;
|
||||
using namespace ov::test;
|
||||
|
||||
namespace {
|
||||
|
||||
const std::vector<InferenceEngine::Precision> netPrecisions = {
|
||||
InferenceEngine::Precision::FP32,
|
||||
InferenceEngine::Precision::FP16
|
||||
};
|
||||
const std::vector<ov::element::Type> input_types = {ov::element::f32, ov::element::f16};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_NoReshape, SplitConvConcat,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::Values(InferenceEngine::SizeVector({1, 6, 40, 40})),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
SplitConvConcat::getTestCaseName);
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_NoReshape,
|
||||
SplitConvConcat,
|
||||
::testing::Combine(::testing::ValuesIn(input_types),
|
||||
::testing::Values(ov::Shape{1, 6, 40, 40}),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
SplitConvConcat::getTestCaseName);
|
||||
} // namespace
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -4,60 +4,52 @@
|
||||
|
||||
#include "subgraph_tests/variadic_split_pad.hpp"
|
||||
|
||||
using namespace SubgraphTestsDefinitions;
|
||||
using namespace ov::test;
|
||||
|
||||
namespace {
|
||||
|
||||
const std::vector<InferenceEngine::Precision> netPrecision = {
|
||||
InferenceEngine::Precision::FP32
|
||||
};
|
||||
const std::vector<ov::element::Type> input_type = {ov::element::f32};
|
||||
|
||||
const std::vector<InferenceEngine::SizeVector> shapes = {
|
||||
{1, 8, 3, 2},
|
||||
{3, 8, 8, 8},
|
||||
const std::vector<ov::Shape> shapes = {
|
||||
{1, 8, 3, 2},
|
||||
{3, 8, 8, 8},
|
||||
};
|
||||
|
||||
const std::vector<std::vector<size_t>> connectedIndexes = {
|
||||
{0},
|
||||
{0, 2},
|
||||
{0, 1, 3},
|
||||
{0, 1, 1, 0},
|
||||
{0, 0, 0, 1},
|
||||
{0},
|
||||
{0, 2},
|
||||
{0, 1, 3},
|
||||
{0, 1, 1, 0},
|
||||
{0, 0, 0, 1},
|
||||
};
|
||||
|
||||
const std::vector<std::vector<size_t>> numSplits = {
|
||||
{2, 2, 2, 2},
|
||||
{1, 2, 4, 1},
|
||||
{3, 2, 2, 1}
|
||||
};
|
||||
const std::vector<std::vector<size_t>> numSplits = {{2, 2, 2, 2}, {1, 2, 4, 1}, {3, 2, 2, 1}};
|
||||
|
||||
const std::vector<std::vector<int64_t>> padsBegin = {
|
||||
{0, 0, 0, 0},
|
||||
{0, 0, 1, 1},
|
||||
{0, 0, 0, 0},
|
||||
{0, 0, 1, 1},
|
||||
};
|
||||
|
||||
const std::vector<std::vector<int64_t>> padsEnd = {
|
||||
{0, 0, 0, 0},
|
||||
{0, 0, 1, 1},
|
||||
{0, 0, 0, 0},
|
||||
{0, 0, 1, 1},
|
||||
};
|
||||
|
||||
const std::vector<ngraph::helpers::PadMode> padMode = {
|
||||
ngraph::helpers::PadMode::CONSTANT,
|
||||
ngraph::helpers::PadMode::EDGE,
|
||||
ngraph::helpers::PadMode::REFLECT,
|
||||
ngraph::helpers::PadMode::SYMMETRIC
|
||||
};
|
||||
const std::vector<ov::op::PadMode> padMode = {ov::op::PadMode::CONSTANT,
|
||||
ov::op::PadMode::EDGE,
|
||||
ov::op::PadMode::REFLECT,
|
||||
ov::op::PadMode::SYMMETRIC};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_CPU, VariadicSplitPad,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(shapes),
|
||||
::testing::Values(1),
|
||||
::testing::ValuesIn(numSplits),
|
||||
::testing::ValuesIn(connectedIndexes),
|
||||
::testing::ValuesIn(padsBegin),
|
||||
::testing::ValuesIn(padsEnd),
|
||||
::testing::ValuesIn(padMode),
|
||||
::testing::ValuesIn(netPrecision),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
VariadicSplitPad::getTestCaseName);
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_CPU,
|
||||
VariadicSplitPad,
|
||||
::testing::Combine(::testing::ValuesIn(shapes),
|
||||
::testing::Values(1),
|
||||
::testing::ValuesIn(numSplits),
|
||||
::testing::ValuesIn(connectedIndexes),
|
||||
::testing::ValuesIn(padsBegin),
|
||||
::testing::ValuesIn(padsEnd),
|
||||
::testing::ValuesIn(padMode),
|
||||
::testing::ValuesIn(input_type),
|
||||
::testing::Values(ov::test::utils::DEVICE_CPU)),
|
||||
VariadicSplitPad::getTestCaseName);
|
||||
} // namespace
|
||||
|
@ -1,49 +0,0 @@
|
||||
// Copyright (C) 2018-2023 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "subgraph_tests/reshape_squeeze_reshape_relu.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "common_test_utils/test_constants.hpp"
|
||||
|
||||
using namespace SubgraphTestsDefinitions;
|
||||
|
||||
namespace {
|
||||
std::vector<ShapeAxesTuple> inputs{
|
||||
{{1, 1, 3}, {0, 1}},
|
||||
{{1, 1, 3}, {0}},
|
||||
{{1, 1, 3}, {1}},
|
||||
{{1, 3, 1}, {0, 2}},
|
||||
{{1, 3, 1}, {0}},
|
||||
{{1, 3, 1}, {2}},
|
||||
{{3, 1, 1}, {1, 2}},
|
||||
{{3, 1, 1}, {1}},
|
||||
{{3, 1, 1}, {2}},
|
||||
{{4, 1, 3, 1}, {1, 3}},
|
||||
{{4, 1, 1, 3}, {1, 2}},
|
||||
{{1, 4, 1, 3}, {0, 2}},
|
||||
{{1, 3, 5, 2, 1}, {0, 4}},
|
||||
{{3, 1, 2, 4, 4, 3}, {1}},
|
||||
{{1, 1, 1, 1, 1, 3}, {0, 1, 2, 3, 4}},
|
||||
{{1, 1, 1, 1, 1, 3}, {1, 3}},
|
||||
{{1}, {0}},
|
||||
};
|
||||
|
||||
std::vector<InferenceEngine::Precision> netPrecisions = {
|
||||
InferenceEngine::Precision::FP32,
|
||||
InferenceEngine::Precision::FP16,
|
||||
};
|
||||
|
||||
const std::vector<ngraph::helpers::SqueezeOpType> opTypes = {ngraph::helpers::SqueezeOpType::SQUEEZE,
|
||||
ngraph::helpers::SqueezeOpType::UNSQUEEZE};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_reshape_squeeze_reshape_relu,
|
||||
ReshapeSqueezeReshapeRelu,
|
||||
::testing::Combine(::testing::ValuesIn(inputs),
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::Values(ov::test::utils::DEVICE_GNA),
|
||||
::testing::ValuesIn(opTypes)),
|
||||
ReshapeSqueezeReshapeRelu::getTestCaseName);
|
||||
} // namespace
|
@ -1,22 +0,0 @@
|
||||
// Copyright (C) 2018-2023 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "subgraph_tests/split_conv_concat.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "common_test_utils/test_constants.hpp"
|
||||
|
||||
using namespace SubgraphTestsDefinitions;
|
||||
const std::vector<InferenceEngine::Precision> netPrecisions = {InferenceEngine::Precision::FP32,
|
||||
InferenceEngine::Precision::FP16};
|
||||
|
||||
std::vector<std::vector<size_t>> inputShapes = {{1, 32, 1, 130}, {1, 64, 1, 170}, {1, 32, 1, 1026}};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_SplitConvConcat,
|
||||
SplitConvConcat,
|
||||
::testing::Combine(::testing::ValuesIn(netPrecisions),
|
||||
::testing::ValuesIn(inputShapes),
|
||||
::testing::Values(ov::test::utils::DEVICE_GNA)),
|
||||
SplitConvConcat::getTestCaseName);
|
@ -2,48 +2,48 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <vector>
|
||||
#include "subgraph_tests/reshape_squeeze_reshape_relu.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "common_test_utils/test_constants.hpp"
|
||||
|
||||
using namespace SubgraphTestsDefinitions;
|
||||
using namespace ov::test;
|
||||
|
||||
namespace {
|
||||
std::vector<ShapeAxesTuple> inputs_squeeze {
|
||||
{{1, 1, 3}, {0, 1}},
|
||||
{{1, 1, 3}, {1}},
|
||||
{{1, 3, 1}, {0, 2}},
|
||||
{{3, 1, 1}, {1}},
|
||||
{{1, 4, 1, 3}, {0, 2}},
|
||||
{{3, 1, 2, 4, 4, 3}, {1}},
|
||||
{{1, 1, 1, 1, 1, 3}, {0, 1, 2, 3, 4}},
|
||||
{{1}, {0}},
|
||||
};
|
||||
std::vector<ShapeAxesTuple> inputs_squeeze{
|
||||
{{1, 1, 3}, {0, 1}},
|
||||
{{1, 1, 3}, {1}},
|
||||
{{1, 3, 1}, {0, 2}},
|
||||
{{3, 1, 1}, {1}},
|
||||
{{1, 4, 1, 3}, {0, 2}},
|
||||
{{3, 1, 2, 4, 4, 3}, {1}},
|
||||
{{1, 1, 1, 1, 1, 3}, {0, 1, 2, 3, 4}},
|
||||
{{1}, {0}},
|
||||
};
|
||||
|
||||
std::vector<ShapeAxesTuple> inputs_unsqueeze{
|
||||
{{1}, {0}},
|
||||
{{1}, {0, 1}},
|
||||
{{1}, {0, 1, 2}},
|
||||
{{1, 2, 3}, {0}},
|
||||
{{1, 1, 3}, {1, 2}},
|
||||
{{1, 4, 1, 3}, {0, 2}},
|
||||
};
|
||||
std::vector<ShapeAxesTuple> inputs_unsqueeze{
|
||||
{{1}, {0}},
|
||||
{{1}, {0, 1}},
|
||||
{{1}, {0, 1, 2}},
|
||||
{{1, 2, 3}, {0}},
|
||||
{{1, 1, 3}, {1, 2}},
|
||||
{{1, 4, 1, 3}, {0, 2}},
|
||||
};
|
||||
|
||||
std::vector<InferenceEngine::Precision> netPrecisions = {InferenceEngine::Precision::FP32,
|
||||
InferenceEngine::Precision::FP16,
|
||||
};
|
||||
std::vector<ov::element::Type> input_types = {
|
||||
ov::element::f32,
|
||||
ov::element::f16,
|
||||
};
|
||||
|
||||
const std::vector<ov::test::utils::SqueezeOpType> opTypes = {ov::test::utils::SqueezeOpType::SQUEEZE,
|
||||
ov::test::utils::SqueezeOpType::UNSQUEEZE};
|
||||
|
||||
const std::vector<ngraph::helpers::SqueezeOpType> opTypes = {
|
||||
ngraph::helpers::SqueezeOpType::SQUEEZE,
|
||||
ngraph::helpers::SqueezeOpType::UNSQUEEZE
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_reshape_squeeze_reshape_relu, ReshapeSqueezeReshapeRelu,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(inputs_squeeze),
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::Values(ov::test::utils::DEVICE_GPU),
|
||||
::testing::ValuesIn(opTypes)),
|
||||
ReshapeSqueezeReshapeRelu::getTestCaseName);
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_reshape_squeeze_reshape_relu,
|
||||
ReshapeSqueezeReshapeRelu,
|
||||
::testing::Combine(::testing::ValuesIn(inputs_squeeze),
|
||||
::testing::ValuesIn(input_types),
|
||||
::testing::Values(ov::test::utils::DEVICE_GPU),
|
||||
::testing::ValuesIn(opTypes)),
|
||||
ReshapeSqueezeReshapeRelu::getTestCaseName);
|
||||
} // namespace
|
||||
|
@ -2,26 +2,21 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "subgraph_tests/split_conv_concat.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "subgraph_tests/split_conv_concat.hpp"
|
||||
#include "common_test_utils/test_constants.hpp"
|
||||
|
||||
using namespace SubgraphTestsDefinitions;
|
||||
using namespace ov::test;
|
||||
|
||||
namespace {
|
||||
const std::vector<InferenceEngine::Precision> netPrecisions = {
|
||||
InferenceEngine::Precision::FP32,
|
||||
InferenceEngine::Precision::FP16
|
||||
};
|
||||
const std::vector<ov::element::Type> input_types = {ov::element::f32, ov::element::f16};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_NoReshape, SplitConvConcat,
|
||||
::testing::Combine(
|
||||
::testing::ValuesIn(netPrecisions),
|
||||
::testing::Values(std::vector<size_t >({1, 6, 40, 40})),
|
||||
::testing::Values(ov::test::utils::DEVICE_GPU)),
|
||||
SplitConvConcat::getTestCaseName);
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_NoReshape,
|
||||
SplitConvConcat,
|
||||
::testing::Combine(::testing::ValuesIn(input_types),
|
||||
::testing::Values(ov::Shape{1, 6, 40, 40}),
|
||||
::testing::Values(ov::test::utils::DEVICE_GPU)),
|
||||
SplitConvConcat::getTestCaseName);
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
|
@ -6,14 +6,16 @@
|
||||
|
||||
#include "shared_test_classes/subgraph/range_add.hpp"
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
TEST_P(RangeAddSubgraphTest, CompareWithRefs) {
|
||||
Run();
|
||||
run();
|
||||
}
|
||||
|
||||
TEST_P(RangeNumpyAddSubgraphTest, CompareWithRefs) {
|
||||
Run();
|
||||
run();
|
||||
}
|
||||
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
@ -6,10 +6,12 @@
|
||||
|
||||
#include "shared_test_classes/subgraph/relu_shape_of.hpp"
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
TEST_P(ReluShapeOfSubgraphTest, CompareWithRefs) {
|
||||
Run();
|
||||
run();
|
||||
}
|
||||
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
@ -6,10 +6,12 @@
|
||||
|
||||
#include "shared_test_classes/subgraph/reshape_squeeze_reshape_relu.hpp"
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
TEST_P(ReshapeSqueezeReshapeRelu, CompareWithRefs){
|
||||
Run();
|
||||
TEST_P(ReshapeSqueezeReshapeRelu, CompareWithRefs) {
|
||||
run();
|
||||
};
|
||||
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
@ -6,14 +6,17 @@
|
||||
|
||||
#include "shared_test_classes/subgraph/split_conv_concat.hpp"
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
TEST_P(SplitConvConcat, CompareWithRefImpl) {
|
||||
Run();
|
||||
run();
|
||||
};
|
||||
|
||||
TEST_P(SplitConvConcat, QueryNetwork) {
|
||||
QueryNetwork();
|
||||
TEST_P(SplitConvConcat, QueryModel) {
|
||||
query_model();
|
||||
}
|
||||
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
||||
|
@ -6,10 +6,12 @@
|
||||
|
||||
#include "shared_test_classes/subgraph/variadic_split_pad.hpp"
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
TEST_P(VariadicSplitPad, CompareWithRefs){
|
||||
Run();
|
||||
TEST_P(VariadicSplitPad, CompareWithRefs) {
|
||||
run();
|
||||
};
|
||||
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
@ -20,6 +20,12 @@ using ElementType = ov::element::Type_t;
|
||||
using Config = ov::AnyMap;
|
||||
using TargetDevice = std::string;
|
||||
|
||||
typedef std::tuple<ov::element::Type, // Input element type
|
||||
ov::Shape, // Input Shape
|
||||
TargetDevice // Target Device
|
||||
>
|
||||
BasicParams;
|
||||
|
||||
class SubgraphBaseTest : public ov::test::TestsCommon {
|
||||
public:
|
||||
virtual void run();
|
||||
|
@ -4,36 +4,45 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <tuple>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#include "shared_test_classes/base/layer_test_utils.hpp"
|
||||
#include "ov_models/builders.hpp"
|
||||
#include "shared_test_classes/base/ov_subgraph.hpp"
|
||||
|
||||
#include "shared_test_classes/single_layer/range.hpp"
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
typedef std::tuple<float, // start
|
||||
float, // stop
|
||||
float, // step
|
||||
ov::element::Type, // Input type
|
||||
std::string // Target device name
|
||||
>
|
||||
RangeParams;
|
||||
|
||||
// ------------------------------ V0 ------------------------------
|
||||
|
||||
class RangeAddSubgraphTest : public testing::WithParamInterface<LayerTestsDefinitions::RangeParams>,
|
||||
virtual public LayerTestsUtils::LayerTestsCommon {
|
||||
class RangeAddSubgraphTest : public testing::WithParamInterface<RangeParams>,
|
||||
virtual public ov::test::SubgraphBaseStaticTest {
|
||||
public:
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<LayerTestsDefinitions::RangeParams>& obj);
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<RangeParams>& obj);
|
||||
|
||||
protected:
|
||||
void SetUp() override;
|
||||
};
|
||||
|
||||
// ------------------------------ V4 ------------------------------
|
||||
|
||||
class RangeNumpyAddSubgraphTest : public testing::WithParamInterface<LayerTestsDefinitions::RangeParams>,
|
||||
virtual public LayerTestsUtils::LayerTestsCommon {
|
||||
class RangeNumpyAddSubgraphTest : public testing::WithParamInterface<RangeParams>,
|
||||
virtual public ov::test::SubgraphBaseStaticTest {
|
||||
public:
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<LayerTestsDefinitions::RangeParams>& obj);
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<RangeParams>& obj);
|
||||
|
||||
protected:
|
||||
void SetUp() override;
|
||||
};
|
||||
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
@ -4,23 +4,26 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <tuple>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include "shared_test_classes/base/ov_subgraph.hpp"
|
||||
|
||||
#include "shared_test_classes/base/layer_test_utils.hpp"
|
||||
#include "shared_test_classes/single_layer/shape_of.hpp"
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
#include "ov_models/builders.hpp"
|
||||
typedef std::tuple<ov::element::Type, // Input type
|
||||
ov::element::Type, // Output type
|
||||
ov::Shape, // Input shapes
|
||||
std::string // Device name
|
||||
>
|
||||
ShapeOfParams;
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
|
||||
class ReluShapeOfSubgraphTest : public testing::WithParamInterface<LayerTestsDefinitions::shapeOfParamsCommon>,
|
||||
virtual public LayerTestsUtils::LayerTestsCommon {
|
||||
class ReluShapeOfSubgraphTest : public testing::WithParamInterface<ov::test::ShapeOfParams>,
|
||||
virtual public ov::test::SubgraphBaseStaticTest {
|
||||
public:
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<LayerTestsDefinitions::shapeOfParamsCommon>& obj);
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<ov::test::ShapeOfParams>& obj);
|
||||
|
||||
protected:
|
||||
void SetUp() override;
|
||||
};
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
@ -4,30 +4,32 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <tuple>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include "shared_test_classes/base/layer_test_utils.hpp"
|
||||
#include "ov_models/builders.hpp"
|
||||
#include "ov_models/utils/ov_helpers.hpp"
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
using ShapeAxesTuple = std::pair<std::vector<size_t>, std::vector<int>>;
|
||||
#include "common_test_utils/test_enums.hpp"
|
||||
#include "shared_test_classes/base/ov_subgraph.hpp"
|
||||
|
||||
using ReshapeSqueezeReshapeReluTuple = typename std::tuple<
|
||||
ShapeAxesTuple, // Input shapes & squeeze_indices
|
||||
InferenceEngine::Precision, // Network precision
|
||||
std::string, // Device name
|
||||
ngraph::helpers::SqueezeOpType // SqueezeOpType
|
||||
>;
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
class ReshapeSqueezeReshapeRelu
|
||||
: public testing::WithParamInterface<ReshapeSqueezeReshapeReluTuple>,
|
||||
virtual public LayerTestsUtils::LayerTestsCommon {
|
||||
using ShapeAxesTuple = std::pair<ov::Shape, std::vector<int>>;
|
||||
|
||||
using ReshapeSqueezeReshapeReluTuple = typename std::tuple<ShapeAxesTuple, // Input shapes & squeeze_indices
|
||||
ov::element::Type, // Input element type
|
||||
std::string, // Device name
|
||||
ov::test::utils::SqueezeOpType // SqueezeOpType
|
||||
>;
|
||||
|
||||
class ReshapeSqueezeReshapeRelu : public testing::WithParamInterface<ReshapeSqueezeReshapeReluTuple>,
|
||||
virtual public ov::test::SubgraphBaseStaticTest {
|
||||
public:
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<ReshapeSqueezeReshapeReluTuple> &obj);
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<ReshapeSqueezeReshapeReluTuple>& obj);
|
||||
|
||||
protected:
|
||||
void SetUp() override;
|
||||
};
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
@ -4,19 +4,37 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include "shared_test_classes/base/layer_test_utils.hpp"
|
||||
#include "ov_models/utils/ov_helpers.hpp"
|
||||
#include "ov_models/builders.hpp"
|
||||
#include "shared_test_classes/base/ov_subgraph.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
class SplitConvConcatBase : public ov::test::SubgraphBaseStaticTest {
|
||||
protected:
|
||||
void configure_test(const ov::test::BasicParams& param);
|
||||
};
|
||||
|
||||
class SplitConvConcat : public testing::WithParamInterface<ov::test::BasicParams>, virtual public SplitConvConcatBase {
|
||||
public:
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<ov::test::BasicParams>& obj);
|
||||
|
||||
protected:
|
||||
void SetUp() override;
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
|
||||
class SplitConvConcat : public testing::WithParamInterface<LayerTestsUtils::basicParams>,
|
||||
virtual public LayerTestsUtils::LayerTestsCommon {
|
||||
virtual public ov::test::SplitConvConcatBase {
|
||||
public:
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<LayerTestsUtils::basicParams>& obj);
|
||||
|
||||
|
@ -4,33 +4,35 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <tuple>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#include "shared_test_classes/base/layer_test_utils.hpp"
|
||||
#include "ov_models/builders.hpp"
|
||||
#include "shared_test_classes/base/ov_subgraph.hpp"
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
typedef std::tuple<
|
||||
InferenceEngine::SizeVector, // Input shapes
|
||||
size_t, // Axis
|
||||
std::vector<size_t>, // Split number
|
||||
std::vector<size_t>, // Index connected layer
|
||||
std::vector<int64_t>, // Pad begin
|
||||
std::vector<int64_t>, // Pad end
|
||||
ngraph::helpers::PadMode, // Pad mode
|
||||
InferenceEngine::Precision, // Network precision
|
||||
std::string // Device name
|
||||
> SplitPadTuple;
|
||||
typedef std::tuple<ov::Shape, // Input shapes
|
||||
size_t, // Axis
|
||||
std::vector<size_t>, // Split number
|
||||
std::vector<size_t>, // Index connected layer
|
||||
std::vector<int64_t>, // Pad begin
|
||||
std::vector<int64_t>, // Pad end
|
||||
ov::op::PadMode, // Pad mode
|
||||
ov::element::Type, // Input element type
|
||||
std::string // Device name
|
||||
>
|
||||
SplitPadTuple;
|
||||
|
||||
|
||||
class VariadicSplitPad: public testing::WithParamInterface<SplitPadTuple>,
|
||||
virtual public LayerTestsUtils::LayerTestsCommon{
|
||||
class VariadicSplitPad : public testing::WithParamInterface<SplitPadTuple>,
|
||||
virtual public ov::test::SubgraphBaseStaticTest {
|
||||
public:
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<SplitPadTuple> &obj);
|
||||
static std::string getTestCaseName(const testing::TestParamInfo<SplitPadTuple>& obj);
|
||||
|
||||
protected:
|
||||
void SetUp() override;
|
||||
};
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
@ -4,84 +4,79 @@
|
||||
|
||||
#include "shared_test_classes/subgraph/range_add.hpp"
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
#include "ov_models/builders.hpp"
|
||||
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
// ------------------------------ V0 ------------------------------
|
||||
|
||||
std::string RangeAddSubgraphTest::getTestCaseName(const testing::TestParamInfo<LayerTestsDefinitions::RangeParams>& obj) {
|
||||
InferenceEngine::Precision netPrecision;
|
||||
InferenceEngine::Precision inPrc, outPrc;
|
||||
InferenceEngine::Layout inLayout, outLayout;
|
||||
std::string RangeAddSubgraphTest::getTestCaseName(const testing::TestParamInfo<RangeParams>& obj) {
|
||||
ov::element::Type input_type;
|
||||
float start, stop, step;
|
||||
std::string targetDevice;
|
||||
std::tie(start, stop, step, netPrecision, inPrc, outPrc, inLayout, outLayout, targetDevice) = obj.param;
|
||||
std::tie(start, stop, step, input_type, targetDevice) = obj.param;
|
||||
|
||||
std::ostringstream result;
|
||||
const char separator = '_';
|
||||
result << "Start=" << start << separator;
|
||||
result << "Stop=" << stop << separator;
|
||||
result << "Step=" << step << separator;
|
||||
result << "netPRC=" << netPrecision.name() << separator;
|
||||
result << "ET=" << input_type << separator;
|
||||
result << "targetDevice=" << targetDevice;
|
||||
return result.str();
|
||||
}
|
||||
|
||||
void RangeAddSubgraphTest::SetUp() {
|
||||
InferenceEngine::Precision netPrecision;
|
||||
ov::element::Type element_type;
|
||||
float start, stop, step;
|
||||
std::tie(start, stop, step, netPrecision, inPrc, outPrc, inLayout, outLayout, targetDevice) = GetParam();
|
||||
auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision);
|
||||
std::tie(start, stop, step, element_type, targetDevice) = GetParam();
|
||||
|
||||
auto startConstant = std::make_shared<ngraph::opset1::Constant>(ngPrc, ngraph::Shape{}, start);
|
||||
auto stopConstant = std::make_shared<ngraph::opset1::Constant>(ngPrc, ngraph::Shape{}, stop);
|
||||
auto stepConstant = std::make_shared<ngraph::opset1::Constant>(ngPrc, ngraph::Shape{}, step);
|
||||
auto range = std::make_shared<ngraph::opset3::Range>(startConstant, stopConstant, stepConstant);
|
||||
auto startConstant = std::make_shared<ov::op::v0::Constant>(element_type, ov::Shape{}, start);
|
||||
auto stopConstant = std::make_shared<ov::op::v0::Constant>(element_type, ov::Shape{}, stop);
|
||||
auto stepConstant = std::make_shared<ov::op::v0::Constant>(element_type, ov::Shape{}, step);
|
||||
auto range = std::make_shared<ov::op::v0::Range>(startConstant, stopConstant, stepConstant);
|
||||
|
||||
ov::ParameterVector params{std::make_shared<ov::op::v0::Parameter>(ngPrc, range->get_shape())};
|
||||
auto eltwise = ngraph::builder::makeEltwise(params.front(), range, ngraph::helpers::EltwiseTypes::ADD);
|
||||
const ngraph::ResultVector results{std::make_shared<ngraph::opset3::Result>(eltwise)};
|
||||
function = std::make_shared<ngraph::Function>(results, params, "RangeEltwise");
|
||||
ov::ParameterVector params{std::make_shared<ov::op::v0::Parameter>(element_type, range->get_shape())};
|
||||
auto eltwise = ngraph::builder::makeEltwise(params.front(), range, ov::test::utils::EltwiseTypes::ADD);
|
||||
const ov::ResultVector results{std::make_shared<ov::op::v0::Result>(eltwise)};
|
||||
function = std::make_shared<ov::Model>(results, params, "RangeEltwise");
|
||||
}
|
||||
|
||||
// ------------------------------ V4 ------------------------------
|
||||
|
||||
std::string RangeNumpyAddSubgraphTest::getTestCaseName(const testing::TestParamInfo<LayerTestsDefinitions::RangeParams>& obj) {
|
||||
InferenceEngine::Precision netPrc;
|
||||
InferenceEngine::Precision constPrc;
|
||||
InferenceEngine::Precision outPrc;
|
||||
InferenceEngine::Layout inLayout, outLayout;
|
||||
std::string RangeNumpyAddSubgraphTest::getTestCaseName(const testing::TestParamInfo<RangeParams>& obj) {
|
||||
ov::element::Type element_type;
|
||||
float start, stop, step;
|
||||
std::string targetDevice;
|
||||
std::tie(start, stop, step, constPrc, netPrc, outPrc, inLayout, outLayout, targetDevice) = obj.param;
|
||||
std::tie(start, stop, step, element_type, targetDevice) = obj.param;
|
||||
|
||||
std::ostringstream result;
|
||||
const char separator = '_';
|
||||
result << "Start=" << start << separator;
|
||||
result << "Stop=" << stop << separator;
|
||||
result << "Step=" << step << separator;
|
||||
result << "constPRC=" << constPrc.name() << separator;
|
||||
result << "netPRC=" << netPrc.name() << separator;
|
||||
result << "ET=" << element_type << separator;
|
||||
result << "targetDevice=" << targetDevice;
|
||||
return result.str();
|
||||
}
|
||||
|
||||
void RangeNumpyAddSubgraphTest::SetUp() {
|
||||
InferenceEngine::Precision netPrc;
|
||||
InferenceEngine::Precision constPrc;
|
||||
ov::element::Type element_type;
|
||||
float start, stop, step;
|
||||
std::tie(start, stop, step, constPrc, netPrc, outPrc, inLayout, outLayout, targetDevice) = GetParam();
|
||||
auto ngConstPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(constPrc);
|
||||
auto ngNetPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrc);
|
||||
std::tie(start, stop, step, element_type, targetDevice) = GetParam();
|
||||
|
||||
auto startConstant = std::make_shared<ngraph::opset1::Constant>(ngConstPrc, ngraph::Shape{}, start);
|
||||
auto stopConstant = std::make_shared<ngraph::opset1::Constant>(ngConstPrc, ngraph::Shape{}, stop);
|
||||
auto stepConstant = std::make_shared<ngraph::opset1::Constant>(ngConstPrc, ngraph::Shape{}, step);
|
||||
auto range = std::make_shared<ngraph::opset4::Range>(startConstant, stopConstant, stepConstant, ngNetPrc);
|
||||
auto startConstant = std::make_shared<ov::op::v0::Constant>(element_type, ov::Shape{}, start);
|
||||
auto stopConstant = std::make_shared<ov::op::v0::Constant>(element_type, ov::Shape{}, stop);
|
||||
auto stepConstant = std::make_shared<ov::op::v0::Constant>(element_type, ov::Shape{}, step);
|
||||
auto range = std::make_shared<ov::op::v4::Range>(startConstant, stopConstant, stepConstant, element_type);
|
||||
|
||||
ov::ParameterVector params{std::make_shared<ov::op::v0::Parameter>(ngNetPrc, range->get_shape())};
|
||||
ov::ParameterVector params{std::make_shared<ov::op::v0::Parameter>(element_type, range->get_shape())};
|
||||
|
||||
auto eltwise = ngraph::builder::makeEltwise(params.front(), range, ngraph::helpers::EltwiseTypes::ADD);
|
||||
const ngraph::ResultVector results{std::make_shared<ngraph::opset3::Result>(eltwise)};
|
||||
function = std::make_shared<ngraph::Function>(results, params, "RangeEltwise");
|
||||
auto eltwise = ngraph::builder::makeEltwise(params.front(), range, ov::test::utils::EltwiseTypes::ADD);
|
||||
const ov::ResultVector results{std::make_shared<ov::op::v0::Result>(eltwise)};
|
||||
function = std::make_shared<ov::Model>(results, params, "RangeEltwise");
|
||||
}
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
@ -4,29 +4,32 @@
|
||||
|
||||
#include "shared_test_classes/subgraph/relu_shape_of.hpp"
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
std::string ReluShapeOfSubgraphTest::getTestCaseName(const testing::TestParamInfo<LayerTestsDefinitions::shapeOfParamsCommon>& obj) {
|
||||
InferenceEngine::SizeVector inputShapes;
|
||||
InferenceEngine::Precision inputPrecision;
|
||||
std::string targetDevice;
|
||||
std::tie(inputPrecision, inputShapes, targetDevice) = obj.param;
|
||||
std::ostringstream result;
|
||||
result << "IS=" << ov::test::utils::vec2str(inputShapes) << "_";
|
||||
result << "Precision=" << inputPrecision.name() << "_";
|
||||
result << "TargetDevice=" << targetDevice;
|
||||
return result.str();
|
||||
}
|
||||
std::string ReluShapeOfSubgraphTest::getTestCaseName(const testing::TestParamInfo<ov::test::ShapeOfParams>& obj) {
|
||||
ov::Shape inputShapes;
|
||||
ov::element::Type element_type, output_type;
|
||||
std::string targetDevice;
|
||||
std::tie(element_type, output_type, inputShapes, targetDevice) = obj.param;
|
||||
std::ostringstream result;
|
||||
result << "IS=" << ov::test::utils::vec2str(inputShapes) << "_";
|
||||
result << "IET=" << element_type << "_";
|
||||
result << "OET=" << output_type << "_";
|
||||
result << "TargetDevice=" << targetDevice;
|
||||
return result.str();
|
||||
}
|
||||
|
||||
void ReluShapeOfSubgraphTest::SetUp() {
|
||||
InferenceEngine::SizeVector inputShapes;
|
||||
InferenceEngine::Precision inputPrecision;
|
||||
std::tie(inputPrecision, inputShapes, targetDevice) = this->GetParam();
|
||||
auto inType = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(inputPrecision);
|
||||
ov::ParameterVector param {std::make_shared<ov::op::v0::Parameter>(inType, ov::Shape(inputShapes))};
|
||||
auto relu = std::make_shared<ngraph::opset3::Relu>(param[0]);
|
||||
auto shapeOf = std::make_shared<ngraph::opset3::ShapeOf>(relu, inType);
|
||||
const ngraph::ResultVector results{std::make_shared<ngraph::opset3::Result>(shapeOf)};
|
||||
function = std::make_shared<ngraph::Function>(results, param, "ReluShapeOf");
|
||||
}
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
void ReluShapeOfSubgraphTest::SetUp() {
|
||||
ov::Shape inputShapes;
|
||||
ov::element::Type element_type, output_type;
|
||||
std::tie(element_type, output_type, inputShapes, targetDevice) = this->GetParam();
|
||||
ov::ParameterVector param{std::make_shared<ov::op::v0::Parameter>(element_type, ov::Shape(inputShapes))};
|
||||
auto relu = std::make_shared<ov::op::v0::Relu>(param[0]);
|
||||
auto shapeOf = std::make_shared<ov::op::v3::ShapeOf>(relu, output_type);
|
||||
const ov::ResultVector results{std::make_shared<ov::op::v0::Result>(shapeOf)};
|
||||
function = std::make_shared<ov::Model>(results, param, "ReluShapeOf");
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
@ -2,46 +2,50 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include <debug.h>
|
||||
#include "shared_test_classes/subgraph/reshape_squeeze_reshape_relu.hpp"
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
std::string ReshapeSqueezeReshapeRelu::getTestCaseName(const testing::TestParamInfo<ReshapeSqueezeReshapeReluTuple> &obj) {
|
||||
ShapeAxesTuple squeezeShape;
|
||||
InferenceEngine::Precision netPrecision;
|
||||
std::string targetName;
|
||||
ngraph::helpers::SqueezeOpType opType;
|
||||
std::tie(squeezeShape, netPrecision, targetName, opType) = obj.param;
|
||||
std::ostringstream results;
|
||||
results << "OpType=" << opType;
|
||||
results << "IS=" << ov::test::utils::vec2str(squeezeShape.first) << "_";
|
||||
results << "indices=" << ov::test::utils::vec2str(squeezeShape.second) << "_";
|
||||
results << "netPRC=" << netPrecision.name() << "_";
|
||||
results << "targetDevice=" << targetName << "_";
|
||||
return results.str();
|
||||
}
|
||||
#include "ov_models/builders.hpp"
|
||||
|
||||
void ReshapeSqueezeReshapeRelu::SetUp() {
|
||||
ShapeAxesTuple squeezeShape;
|
||||
InferenceEngine::Precision netPrecision;
|
||||
ngraph::helpers::SqueezeOpType opType;
|
||||
std::tie(squeezeShape, netPrecision, targetDevice, opType) = this->GetParam();
|
||||
const std::size_t input_dim = InferenceEngine::details::product(squeezeShape.first);
|
||||
auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision);
|
||||
std::vector<size_t> shape_input{1, input_dim};
|
||||
ov::ParameterVector input {std::make_shared<ov::op::v0::Parameter>(ngPrc, ov::Shape(shape_input))};
|
||||
auto reshape1_pattern = std::make_shared<ngraph::op::Constant>(ngraph::element::i64,
|
||||
ngraph::Shape{squeezeShape.first.size()},
|
||||
squeezeShape.first);
|
||||
auto reshape1 = std::make_shared<ngraph::op::v1::Reshape>(input[0], reshape1_pattern, false);
|
||||
auto squeeze = ngraph::builder::makeSqueezeUnsqueeze(reshape1, ngraph::element::i64, squeezeShape.second, opType);
|
||||
auto reshape2_pattern = std::make_shared<ngraph::op::Constant>(ngraph::element::i64,
|
||||
ngraph::Shape{2},
|
||||
std::vector<size_t>{1, input_dim});
|
||||
auto reshape2 = std::make_shared<ngraph::op::v1::Reshape>(squeeze, reshape2_pattern, false);
|
||||
auto func = std::make_shared<ngraph::opset1::Relu>(reshape2);
|
||||
std::string squeezeType;
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
function = std::make_shared<ngraph::Function>(func, input, "reshape_squeeze_reshape_relu");
|
||||
}
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
std::string ReshapeSqueezeReshapeRelu::getTestCaseName(
|
||||
const testing::TestParamInfo<ReshapeSqueezeReshapeReluTuple>& obj) {
|
||||
ShapeAxesTuple squeezeShape;
|
||||
ov::element::Type element_type;
|
||||
std::string targetName;
|
||||
ov::test::utils::SqueezeOpType opType;
|
||||
std::tie(squeezeShape, element_type, targetName, opType) = obj.param;
|
||||
std::ostringstream results;
|
||||
results << "OpType=" << opType;
|
||||
results << "IS=" << ov::test::utils::vec2str(squeezeShape.first) << "_";
|
||||
results << "indices=" << ov::test::utils::vec2str(squeezeShape.second) << "_";
|
||||
results << "netPRC=" << element_type << "_";
|
||||
results << "targetDevice=" << targetName << "_";
|
||||
return results.str();
|
||||
}
|
||||
|
||||
void ReshapeSqueezeReshapeRelu::SetUp() {
|
||||
ShapeAxesTuple squeezeShape;
|
||||
ov::element::Type element_type;
|
||||
ov::test::utils::SqueezeOpType opType;
|
||||
std::tie(squeezeShape, element_type, targetDevice, opType) = this->GetParam();
|
||||
const size_t input_dim = ov::shape_size(squeezeShape.first);
|
||||
std::vector<size_t> shape_input{1, input_dim};
|
||||
ov::ParameterVector input{std::make_shared<ov::op::v0::Parameter>(element_type, ov::Shape(shape_input))};
|
||||
auto reshape1_pattern = std::make_shared<ov::op::v0::Constant>(ov::element::i64,
|
||||
ov::Shape{squeezeShape.first.size()},
|
||||
squeezeShape.first);
|
||||
auto reshape1 = std::make_shared<ov::op::v1::Reshape>(input[0], reshape1_pattern, false);
|
||||
auto squeeze = ngraph::builder::makeSqueezeUnsqueeze(reshape1, ov::element::i64, squeezeShape.second, opType);
|
||||
auto reshape2_pattern =
|
||||
std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{2}, std::vector<size_t>{1, input_dim});
|
||||
auto reshape2 = std::make_shared<ov::op::v1::Reshape>(squeeze, reshape2_pattern, false);
|
||||
auto func = std::make_shared<ov::op::v0::Relu>(reshape2);
|
||||
std::string squeezeType;
|
||||
|
||||
function = std::make_shared<ov::Model>(func, input, "reshape_squeeze_reshape_relu");
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
@ -4,30 +4,40 @@
|
||||
|
||||
#include "shared_test_classes/subgraph/split_conv_concat.hpp"
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
#include "common_test_utils/data_utils.hpp"
|
||||
#include "ie_common.h"
|
||||
#include "ov_models/builders.hpp"
|
||||
#include "shared_test_classes/base/layer_test_utils.hpp"
|
||||
#include "shared_test_classes/base/ov_subgraph.hpp"
|
||||
|
||||
std::string SplitConvConcat::getTestCaseName(const testing::TestParamInfo<LayerTestsUtils::basicParams>& obj) {
|
||||
InferenceEngine::Precision netPrecision;
|
||||
InferenceEngine::SizeVector inputShapes, newInputShapes;
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
std::string SplitConvConcat::getTestCaseName(const testing::TestParamInfo<ov::test::BasicParams>& obj) {
|
||||
ov::element::Type element_type;
|
||||
ov::Shape inputShapes;
|
||||
std::string targetDevice;
|
||||
std::tie(netPrecision, inputShapes, targetDevice) = obj.param;
|
||||
std::tie(element_type, inputShapes, targetDevice) = obj.param;
|
||||
|
||||
std::ostringstream result;
|
||||
result << "IS=" << ov::test::utils::vec2str(inputShapes) << "_";
|
||||
result << "netPRC=" << netPrecision.name() << "_";
|
||||
result << "ET=" << element_type << "_";
|
||||
result << "targetDevice=" << targetDevice;
|
||||
return result.str();
|
||||
}
|
||||
|
||||
void SplitConvConcat::SetUp() {
|
||||
std::vector<size_t> inputShape;
|
||||
InferenceEngine::Precision netPrecision;
|
||||
std::tie(netPrecision, inputShape, targetDevice) = this->GetParam();
|
||||
auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision);
|
||||
configure_test(this->GetParam());
|
||||
}
|
||||
|
||||
ov::ParameterVector params{std::make_shared<ov::op::v0::Parameter>(ngPrc, ov::Shape(inputShape))};
|
||||
void SplitConvConcatBase::configure_test(const ov::test::BasicParams& param) {
|
||||
ov::Shape inputShape;
|
||||
ov::element::Type element_type;
|
||||
std::tie(element_type, inputShape, targetDevice) = param;
|
||||
|
||||
auto split = ngraph::builder::makeSplit(params[0], ngPrc, 2, 1);
|
||||
ov::ParameterVector params{std::make_shared<ov::op::v0::Parameter>(element_type, ov::Shape(inputShape))};
|
||||
|
||||
auto split = ngraph::builder::makeSplit(params[0], element_type, 2, 1);
|
||||
|
||||
std::vector<float> filterWeights1;
|
||||
std::vector<float> filterWeights2;
|
||||
@ -35,17 +45,65 @@ void SplitConvConcat::SetUp() {
|
||||
filterWeights1 = ov::test::utils::generate_float_numbers(8 * inputShape[1] / 2 * 3, -0.2f, 0.2f);
|
||||
filterWeights2 = ov::test::utils::generate_float_numbers(8 * inputShape[1] / 2 * 3, -0.2f, 0.2f);
|
||||
}
|
||||
auto conv1 = ngraph::builder::makeConvolution(split->output(0), ngPrc, {1, 3}, {1, 1}, {0, 0}, {0, 0}, {1, 1},
|
||||
ngraph::op::PadType::VALID, 8, false, filterWeights1);
|
||||
auto relu1 = std::make_shared<ngraph::opset1::Relu>(conv1);
|
||||
auto conv1 = ngraph::builder::makeConvolution(split->output(0),
|
||||
element_type,
|
||||
{1, 3},
|
||||
{1, 1},
|
||||
{0, 0},
|
||||
{0, 0},
|
||||
{1, 1},
|
||||
ov::op::PadType::VALID,
|
||||
8,
|
||||
false,
|
||||
filterWeights1);
|
||||
auto relu1 = std::make_shared<ov::op::v0::Relu>(conv1);
|
||||
|
||||
auto conv2 = ngraph::builder::makeConvolution(split->output(1), ngPrc, {1, 3}, {1, 1}, {0, 0}, {0, 0}, {1, 1},
|
||||
ngraph::op::PadType::VALID, 8, false, filterWeights2);
|
||||
auto relu2 = std::make_shared<ngraph::opset1::Relu>(conv2);
|
||||
auto concat = std::make_shared<ngraph::opset1::Concat>(ngraph::OutputVector{relu1->output(0), relu2->output(0)}, 1);
|
||||
auto conv2 = ngraph::builder::makeConvolution(split->output(1),
|
||||
element_type,
|
||||
{1, 3},
|
||||
{1, 1},
|
||||
{0, 0},
|
||||
{0, 0},
|
||||
{1, 1},
|
||||
ov::op::PadType::VALID,
|
||||
8,
|
||||
false,
|
||||
filterWeights2);
|
||||
auto relu2 = std::make_shared<ov::op::v0::Relu>(conv2);
|
||||
auto concat = std::make_shared<ov::op::v0::Concat>(ov::OutputVector{relu1->output(0), relu2->output(0)}, 1);
|
||||
|
||||
ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(concat)};
|
||||
function = std::make_shared<ngraph::Function>(results, params, "SplitConvConcat");
|
||||
ov::ResultVector results{std::make_shared<ov::op::v0::Result>(concat)};
|
||||
function = std::make_shared<ov::Model>(results, params, "SplitConvConcat");
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
|
||||
std::string SplitConvConcat::getTestCaseName(const testing::TestParamInfo<LayerTestsUtils::basicParams>& obj) {
|
||||
InferenceEngine::Precision precision;
|
||||
InferenceEngine::SizeVector inputShapes;
|
||||
std::string targetDevice;
|
||||
std::tie(precision, inputShapes, targetDevice) = obj.param;
|
||||
auto element_type = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(precision);
|
||||
|
||||
std::ostringstream result;
|
||||
result << "IS=" << ov::test::utils::vec2str(inputShapes) << "_";
|
||||
result << "ET=" << element_type << "_";
|
||||
result << "targetDevice=" << targetDevice;
|
||||
return result.str();
|
||||
}
|
||||
|
||||
void SplitConvConcat::SetUp() {
|
||||
InferenceEngine::Precision precision;
|
||||
InferenceEngine::SizeVector inputShapes;
|
||||
std::tie(precision, inputShapes, targetDevice) = this->GetParam();
|
||||
auto element_type = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(precision);
|
||||
ov::Shape shape = inputShapes;
|
||||
|
||||
ov::test::BasicParams param(element_type, shape, targetDevice);
|
||||
configure_test(param);
|
||||
}
|
||||
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
|
@ -4,48 +4,54 @@
|
||||
|
||||
#include "shared_test_classes/subgraph/variadic_split_pad.hpp"
|
||||
|
||||
namespace SubgraphTestsDefinitions {
|
||||
#include "ov_models/builders.hpp"
|
||||
|
||||
std::string VariadicSplitPad::getTestCaseName(const testing::TestParamInfo<SplitPadTuple> &obj) {
|
||||
InferenceEngine::SizeVector inputShape;
|
||||
namespace ov {
|
||||
namespace test {
|
||||
|
||||
std::string VariadicSplitPad::getTestCaseName(const testing::TestParamInfo<SplitPadTuple>& obj) {
|
||||
ov::Shape input_shape;
|
||||
int64_t axis;
|
||||
std::vector<size_t> numSplits, connectIndexes;
|
||||
std::vector<int64_t> padsBegin, padsEnd;
|
||||
ngraph::helpers::PadMode padMode;
|
||||
InferenceEngine::Precision netPrecision;
|
||||
ov::op::PadMode padMode;
|
||||
ov::element::Type element_type;
|
||||
std::string targetName;
|
||||
std::tie(inputShape, axis, numSplits, connectIndexes, padsBegin, padsEnd, padMode, netPrecision, targetName) = obj.param;
|
||||
std::tie(input_shape, axis, numSplits, connectIndexes, padsBegin, padsEnd, padMode, element_type, targetName) =
|
||||
obj.param;
|
||||
std::ostringstream results;
|
||||
|
||||
results << "IS=" << ov::test::utils::vec2str(inputShape) << "_";
|
||||
results << "IS=" << ov::test::utils::vec2str(input_shape) << "_";
|
||||
results << "Axis=" << axis << "_";
|
||||
results << "NumSplits=" << ov::test::utils::vec2str(numSplits) << "_";
|
||||
results << "ConnectIndexes=" << ov::test::utils::vec2str(connectIndexes) << "_";
|
||||
results << "padsBegin=" << ov::test::utils::vec2str(padsBegin) << "_";
|
||||
results << "padsEnd=" << ov::test::utils::vec2str(padsEnd) << "_";
|
||||
results << "PadMode=" << padMode << "_";
|
||||
results << "netPRC=" << netPrecision.name() << "_";
|
||||
results << "netPRC=" << element_type << "_";
|
||||
results << "targetDevice=" << targetName << "_";
|
||||
return results.str();
|
||||
}
|
||||
|
||||
void VariadicSplitPad::SetUp() {
|
||||
InferenceEngine::SizeVector inputs;
|
||||
ov::Shape input_shape;
|
||||
int64_t axis;
|
||||
std::vector<size_t> numSplits, connectIndexes;
|
||||
std::vector<int64_t> padBegin, padEnd;
|
||||
ngraph::helpers::PadMode padMode;
|
||||
InferenceEngine::Precision netPrecision;
|
||||
std::tie(inputs, axis, numSplits, connectIndexes, padBegin, padEnd, padMode, netPrecision, targetDevice) = this->GetParam();
|
||||
auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision);
|
||||
ov::ParameterVector input {std::make_shared<ov::op::v0::Parameter>(ngPrc, ov::Shape(inputs))};
|
||||
ov::op::PadMode padMode;
|
||||
ov::element::Type element_type;
|
||||
std::tie(input_shape, axis, numSplits, connectIndexes, padBegin, padEnd, padMode, element_type, targetDevice) =
|
||||
this->GetParam();
|
||||
ov::ParameterVector input{std::make_shared<ov::op::v0::Parameter>(element_type, ov::Shape(input_shape))};
|
||||
auto split = ngraph::builder::makeVariadicSplit(input[0], numSplits, axis);
|
||||
ngraph::ResultVector results;
|
||||
ov::ResultVector results;
|
||||
|
||||
for (size_t i : connectIndexes) {
|
||||
auto pad = ngraph::builder::makePad(split->output(i), padBegin, padEnd, 0, padMode);
|
||||
results.push_back(std::make_shared<ngraph::opset1::Result>(pad));
|
||||
results.push_back(std::make_shared<ov::op::v0::Result>(pad));
|
||||
}
|
||||
function = std::make_shared<ngraph::Function>(results, input, "variadic_split_pad");
|
||||
function = std::make_shared<ov::Model>(results, input, "variadic_split_pad");
|
||||
}
|
||||
} // namespace SubgraphTestsDefinitions
|
||||
|
||||
} // namespace test
|
||||
} // namespace ov
|
||||
|
Loading…
Reference in New Issue
Block a user