-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
- Loading branch information
Showing
14 changed files
with
461 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...ce-engine/tests/functional/inference_engine/serialization/single_layer/comparison_ops.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (C) 2018-2021 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "shared_test_classes/single_layer/comparison.hpp" | ||
|
||
struct ComparisionOpsData { | ||
const std::map<std::vector<size_t>, std::vector<std::vector<size_t>>> inputShapes; | ||
const std::vector<InferenceEngine::Precision> inputsPrecisions; | ||
const std::vector<ngraph::helpers::InputLayerType> secondInputTypes; | ||
const std::map<std::string, std::string> additional_config; | ||
const ngraph::helpers::ComparisonTypes opType; | ||
const InferenceEngine::Precision ieInputPrecision; | ||
const InferenceEngine::Precision ieOutputPrecision; | ||
const std::string deviceName; | ||
}; |
63 changes: 63 additions & 0 deletions
63
inference-engine/tests/functional/inference_engine/serialization/single_layer/equal.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// 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 |
63 changes: 63 additions & 0 deletions
63
inference-engine/tests/functional/inference_engine/serialization/single_layer/greater.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// 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::GREATER, | ||
// ieInputPrecision | ||
InferenceEngine::Precision::UNSPECIFIED, | ||
// ieOutputPrecision | ||
InferenceEngine::Precision::UNSPECIFIED, | ||
// deviceName | ||
CommonTestUtils::DEVICE_CPU, | ||
}; | ||
|
||
const auto SerializeGreaterTestParams = ::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, SerializeGreaterTestParams, ComparisonLayerTest::getTestCaseName); | ||
} // namespace |
63 changes: 63 additions & 0 deletions
63
inference-engine/tests/functional/inference_engine/serialization/single_layer/greater_eq.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// 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::GREATER_EQUAL, | ||
// ieInputPrecision | ||
InferenceEngine::Precision::UNSPECIFIED, | ||
// ieOutputPrecision | ||
InferenceEngine::Precision::UNSPECIFIED, | ||
// deviceName | ||
CommonTestUtils::DEVICE_CPU, | ||
}; | ||
|
||
const auto SerializeGreaterEqualTestParams = ::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, SerializeGreaterEqualTestParams, ComparisonLayerTest::getTestCaseName); | ||
} // namespace |
Oops, something went wrong.