|
| 1 | +// Copyright (C) 2018-2021 Intel Corporation |
| 2 | +// SPDX-License-Identifier: Apache-2.0 |
| 3 | +// |
| 4 | + |
| 5 | +#include "comparison_ops.hpp" |
| 6 | + |
| 7 | +using namespace LayerTestsDefinitions; |
| 8 | +using namespace LayerTestsDefinitions::ComparisonParams; |
| 9 | + |
| 10 | +namespace { |
| 11 | +TEST_P(ComparisonLayerTest, Serialize) { |
| 12 | + Serialize(); |
| 13 | + } |
| 14 | + |
| 15 | +ComparisionOpsData data = { |
| 16 | + // inputsShape |
| 17 | + { |
| 18 | + {{1}, {{1}, {17}, {1, 1}, {2, 18}, {1, 1, 2}, {2, 2, 3}, {1, 1, 2, 3}}}, |
| 19 | + {{5}, {{1}, {1, 1}, {2, 5}, {1, 1, 1}, {2, 2, 5}}}, |
| 20 | + {{2, 200}, {{1}, {200}, {1, 200}, {2, 200}, {2, 2, 200}}}, |
| 21 | + {{1, 3, 20}, {{20}, {2, 1, 1}}}, |
| 22 | + {{2, 17, 3, 4}, {{4}, {1, 3, 4}, {2, 1, 3, 4}}}, |
| 23 | + {{2, 17, 3, 4}, {{4}, {1, 3, 4}, {141, 1, 3, 4}}}, |
| 24 | + {{2, 1, 1, 3, 1}, {{1}, {1, 3, 4}, {2, 1, 3, 4}, {1, 1, 1, 1, 1}}}, |
| 25 | + }, |
| 26 | + // inputsPrecisions |
| 27 | + { |
| 28 | + InferenceEngine::Precision::FP64, |
| 29 | + InferenceEngine::Precision::FP32, |
| 30 | + InferenceEngine::Precision::FP16, |
| 31 | + InferenceEngine::Precision::I32, |
| 32 | + InferenceEngine::Precision::U32, |
| 33 | + InferenceEngine::Precision::BOOL, |
| 34 | + }, |
| 35 | + // secondIinputsType |
| 36 | + { |
| 37 | + ngraph::helpers::InputLayerType::CONSTANT, |
| 38 | + ngraph::helpers::InputLayerType::PARAMETER, |
| 39 | + }, |
| 40 | + // additionalConfig |
| 41 | + {}, |
| 42 | + // opType |
| 43 | + ngraph::helpers::ComparisonTypes::GREATER_EQUAL, |
| 44 | + // ieInputPrecision |
| 45 | + InferenceEngine::Precision::UNSPECIFIED, |
| 46 | + // ieOutputPrecision |
| 47 | + InferenceEngine::Precision::UNSPECIFIED, |
| 48 | + // deviceName |
| 49 | + CommonTestUtils::DEVICE_CPU, |
| 50 | +}; |
| 51 | + |
| 52 | +const auto SerializeGreaterEqualTestParams = ::testing::Combine( |
| 53 | + ::testing::ValuesIn(CommonTestUtils::combineParams(data.inputShapes)), |
| 54 | + ::testing::ValuesIn(data.inputsPrecisions), |
| 55 | + ::testing::Values(data.opType), |
| 56 | + ::testing::ValuesIn(data.secondInputTypes), |
| 57 | + ::testing::Values(data.ieInputPrecision), |
| 58 | + ::testing::Values(data.ieOutputPrecision), |
| 59 | + ::testing::Values(data.deviceName), |
| 60 | + ::testing::Values(data.additional_config)); |
| 61 | + |
| 62 | +INSTANTIATE_TEST_SUITE_P(smoke_CompareWithRefs, ComparisonLayerTest, SerializeGreaterEqualTestParams, ComparisonLayerTest::getTestCaseName); |
| 63 | +} // namespace |
0 commit comments