+++ /dev/null
-// Copyright (C) 2020 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#include "single_layer_tests/equal.hpp"
-
-#include "common_test_utils/test_constants.hpp"
-
-#include <vector>
-
-using namespace LayerTestsDefinitions;
-
-namespace {
-
-std::vector<std::vector<InferenceEngine::SizeVector>> inShapes = {
- {{200}, {200}},
- {{1000}, {1}},
- {{1, 256, 512}, {1, 256, 512}},
- {{1}, {1, 256, 512}},
-};
-
-INSTANTIATE_TEST_CASE_P(smoke_equalS32, EqualLayerTest,
- ::testing::Combine(
- ::testing::ValuesIn(inShapes),
- ::testing::Values(InferenceEngine::Precision::I32),
- ::testing::Values(InferenceEngine::Precision::I32),
- ::testing::Values(CommonTestUtils::DEVICE_MYRIAD)),
- EqualLayerTest::getTestCaseName);
-
-} // namespace
+++ /dev/null
-// Copyright (C) 2020 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#include "single_layer_tests/greater.hpp"
-
-#include "common_test_utils/test_constants.hpp"
-
-#include <vector>
-
-using namespace LayerTestsDefinitions;
-
-namespace {
-
-std::vector<std::vector<InferenceEngine::SizeVector>> inShapes = {
- {{200}, {200}},
- {{1000}, {1}},
- {{1, 256, 512}, {1, 256, 512}},
- {{1}, {1, 256, 512}},
-};
-
-INSTANTIATE_TEST_CASE_P(smoke_greaterS32, GreaterLayerTest,
- ::testing::Combine(
- ::testing::ValuesIn(inShapes),
- ::testing::Values(InferenceEngine::Precision::FP16),
- ::testing::Values(InferenceEngine::Precision::I32),
- ::testing::Values(CommonTestUtils::DEVICE_MYRIAD)),
- GreaterLayerTest::getTestCaseName);
-
-} // namespace
+++ /dev/null
-// Copyright (C) 2020 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#pragma once
-
-#include "functional_test_utils/layer_test_utils.hpp"
-
-#include "ngraph_functions/builders.hpp"
-#include "ngraph_functions/utils/ngraph_helpers.hpp"
-
-#include <tuple>
-#include <string>
-#include <vector>
-#include <map>
-#include <memory>
-
-namespace LayerTestsDefinitions {
-
-using EqualTestParam = typename std::tuple<
- std::vector<InferenceEngine::SizeVector>, // Input shapes
- InferenceEngine::Precision, // Input precision
- InferenceEngine::Precision, // Output precision
- LayerTestsUtils::TargetDevice>; // Config
-
-class EqualLayerTest : public testing::WithParamInterface<EqualTestParam>,
- virtual public LayerTestsUtils::LayerTestsCommon {
-public:
- static std::string getTestCaseName(const testing::TestParamInfo<EqualTestParam>& obj);
-
-protected:
- void SetUp() override;
-};
-
-} // namespace LayerTestsDefinitions
+++ /dev/null
-// Copyright (C) 2020 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#pragma once
-
-#include "functional_test_utils/layer_test_utils.hpp"
-
-#include "ngraph_functions/builders.hpp"
-#include "ngraph_functions/utils/ngraph_helpers.hpp"
-
-#include <tuple>
-#include <string>
-#include <vector>
-#include <map>
-#include <memory>
-
-namespace LayerTestsDefinitions {
-
-using GreaterTestParam = typename std::tuple<
- std::vector<InferenceEngine::SizeVector>, // Input shapes
- InferenceEngine::Precision, // Input precision
- InferenceEngine::Precision, // Output precision
- LayerTestsUtils::TargetDevice>; // Config
-
-class GreaterLayerTest : public testing::WithParamInterface<GreaterTestParam>,
- virtual public LayerTestsUtils::LayerTestsCommon {
-public:
- static std::string getTestCaseName(const testing::TestParamInfo<GreaterTestParam>& obj);
-
-protected:
- void SetUp() override;
-};
-
-} // namespace LayerTestsDefinitions
+++ /dev/null
-// Copyright (C) 2020 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#include "single_layer_tests/equal.hpp"
-
-#include "functional_test_utils/blob_utils.hpp"
-#include "functional_test_utils/layer_test_utils.hpp"
-#include "common_test_utils/common_utils.hpp"
-
-#include <tuple>
-#include <string>
-#include <vector>
-#include <memory>
-#include <ie_core.hpp>
-
-
-namespace LayerTestsDefinitions {
-
-std::string EqualLayerTest::getTestCaseName(const testing::TestParamInfo<EqualTestParam>& obj) {
- InferenceEngine::Precision inPrecision;
- InferenceEngine::Precision outPrecision;
- std::vector<InferenceEngine::SizeVector> inputShapes;
- std::string targetDevice;
-
- std::tie(inputShapes, inPrecision, outPrecision, targetDevice) = obj.param;
-
- std::ostringstream result;
- result << "IS=" << CommonTestUtils::vec2str(inputShapes) << "_";
- result << "inPrc=" << inPrecision.name() << "_";
- result << "outPrc=" << outPrecision.name() << "_";
- result << "targetDevice=" << targetDevice;
-
- return result.str();
-}
-
-void EqualLayerTest::SetUp() {
- std::vector<InferenceEngine::SizeVector> inputShapes;
- InferenceEngine::Precision inputPrecision = InferenceEngine::Precision::UNSPECIFIED;
-
- std::tie(inputShapes, inputPrecision, outPrc, targetDevice) = this->GetParam();
-
- auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(inputPrecision);
- auto paramsVector = ngraph::builder::makeParams(ngPrc, {inputShapes});
- IE_ASSERT(paramsVector.size() == 2);
-
- auto equalOp = std::make_shared<ngraph::opset3::Equal>(paramsVector[0], paramsVector[1]);
- ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(equalOp)};
-
- function = std::make_shared<ngraph::Function>(results, paramsVector, "Equal");
-}
-
-TEST_P(EqualLayerTest, CompareWithRefs) {
- Run();
-}
-} // namespace LayerTestsDefinitions
+++ /dev/null
-// Copyright (C) 2020 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#include "single_layer_tests/greater.hpp"
-
-#include "functional_test_utils/blob_utils.hpp"
-#include "functional_test_utils/layer_test_utils.hpp"
-#include "common_test_utils/common_utils.hpp"
-
-#include <tuple>
-#include <string>
-#include <vector>
-#include <memory>
-#include <ie_core.hpp>
-
-
-namespace LayerTestsDefinitions {
-
-std::string GreaterLayerTest::getTestCaseName(const testing::TestParamInfo<GreaterTestParam>& obj) {
- InferenceEngine::Precision inPrecision;
- InferenceEngine::Precision outPrecision;
- std::vector<InferenceEngine::SizeVector> inputShapes;
- std::string targetDevice;
-
- std::tie(inputShapes, inPrecision, outPrecision, targetDevice) = obj.param;
-
- std::ostringstream result;
- result << "IS=" << CommonTestUtils::vec2str(inputShapes) << "_";
- result << "inPrc=" << inPrecision.name() << "_";
- result << "outPrc=" << outPrecision.name() << "_";
- result << "targetDevice=" << targetDevice;
-
- return result.str();
-}
-
-void GreaterLayerTest::SetUp() {
- std::vector<InferenceEngine::SizeVector> inputShapes;
- InferenceEngine::Precision inputPrecision = InferenceEngine::Precision::UNSPECIFIED;
-
- std::tie(inputShapes, inputPrecision, outPrc, targetDevice) = this->GetParam();
-
- auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(inputPrecision);
- auto paramsVector = ngraph::builder::makeParams(ngPrc, {inputShapes});
- IE_ASSERT(paramsVector.size() == 2);
-
- auto equalOp = std::make_shared<ngraph::opset3::Greater>(paramsVector[0], paramsVector[1]);
- ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(equalOp)};
-
- function = std::make_shared<ngraph::Function>(results, paramsVector, "Greater");
-}
-
-TEST_P(GreaterLayerTest, CompareWithRefs) {
- Run();
-}
-} // namespace LayerTestsDefinitions
DIVIDE,
SQUARED_DIFF,
POWER,
- FLOOR_MOD
+ FLOOR_MOD,
+ MOD
};
enum ComparisonTypes {
return std::make_shared<ngraph::opset3::Power>(in0, in1);
case ngraph::helpers::EltwiseTypes::FLOOR_MOD:
return std::make_shared<ngraph::opset3::FloorMod>(in0, in1);
+ case ngraph::helpers::EltwiseTypes::MOD:
+ return std::make_shared<ngraph::opset3::Mod>(in0, in1);
default: {
throw std::runtime_error("Incorrect type of Eltwise operation");
}