Files
openvino/inference-engine/tests/functional/inference_engine/serialization/single_layer/equal.cpp
Bartek Szmelczynski 289df8db27 Revise equal (#6605)
* update spec, init backend file for equal op

* add backend, visitors, serialize SLT tests

* add backend test to manifest cause of mismatch of output type with cpu plugin

* add equal to list of trusted ops and to cmakelist file

* refactor backend tests to the new template

* refactor spec

* remove external link in numpy broadcast and update example

* remove comparison.in.cpp file and related tests from manifest

* fix example

* remove redundant arguments

* refactor backend tests

* add pdpd broadcast to the spec, and different precison to SLT test

* add precisions to SLT cpu

* remove unsupported type from SLT

* revert the deletion of comparison.in.cpp file

* remove visitors test, since it will be added in the other PR

* remove equal from CMakeLists.txt

* refactor links in the spec

* revert unwanted changes

* remove equal from unit test manifest

* revert links modification in spec

* add namespace

* split SSLTs for comaprison ops into seperate files

* fix SSLTs names

* add missing new lines

* udpate output type in spec

* rafactor numeric backend test to template

* merge numeric template tests into equal
2021-08-11 13:04:30 +03:00

64 lines
2.1 KiB
C++

// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "comparison_ops.hpp"
using namespace LayerTestsDefinitions;
using namespace LayerTestsDefinitions::ComparisonParams;
namespace {
TEST_P(ComparisonLayerTest, Serialize) {
Serialize();
}
ComparisionOpsData data = {
// inputsShape
{
{{1}, {{1}, {17}, {1, 1}, {2, 18}, {1, 1, 2}, {2, 2, 3}, {1, 1, 2, 3}}},
{{5}, {{1}, {1, 1}, {2, 5}, {1, 1, 1}, {2, 2, 5}}},
{{2, 200}, {{1}, {200}, {1, 200}, {2, 200}, {2, 2, 200}}},
{{1, 3, 20}, {{20}, {2, 1, 1}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {2, 1, 3, 4}}},
{{2, 17, 3, 4}, {{4}, {1, 3, 4}, {141, 1, 3, 4}}},
{{2, 1, 1, 3, 1}, {{1}, {1, 3, 4}, {2, 1, 3, 4}, {1, 1, 1, 1, 1}}},
},
// inputsPrecisions
{
InferenceEngine::Precision::FP64,
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U32,
InferenceEngine::Precision::BOOL,
},
// secondIinputsType
{
ngraph::helpers::InputLayerType::CONSTANT,
ngraph::helpers::InputLayerType::PARAMETER,
},
// additionalConfig
{},
// opType
ngraph::helpers::ComparisonTypes::EQUAL,
// ieInputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// ieOutputPrecision
InferenceEngine::Precision::UNSPECIFIED,
// deviceName
CommonTestUtils::DEVICE_CPU,
};
const auto SerializeEqualTestParams = ::testing::Combine(
::testing::ValuesIn(CommonTestUtils::combineParams(data.inputShapes)),
::testing::ValuesIn(data.inputsPrecisions),
::testing::Values(data.opType),
::testing::ValuesIn(data.secondInputTypes),
::testing::Values(data.ieInputPrecision),
::testing::Values(data.ieOutputPrecision),
::testing::Values(data.deviceName),
::testing::Values(data.additional_config));
INSTANTIATE_TEST_SUITE_P(smoke_CompareWithRefs, ComparisonLayerTest, SerializeEqualTestParams, ComparisonLayerTest::getTestCaseName);
} // namespace