Cleanup single_layer_tests (#2716)
authorIrina Efode <irina.efode@intel.com>
Tue, 20 Oct 2020 11:31:59 +0000 (14:31 +0300)
committerGitHub <noreply@github.com>
Tue, 20 Oct 2020 11:31:59 +0000 (14:31 +0300)
inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/equal.cpp [deleted file]
inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/greater.cpp [deleted file]
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/equal.hpp [deleted file]
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/greater.hpp [deleted file]
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/equal.cpp [deleted file]
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/greater.cpp [deleted file]
inference-engine/tests/ngraph_functions/include/ngraph_functions/utils/ngraph_helpers.hpp
inference-engine/tests/ngraph_functions/src/eltwise.cpp

diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/equal.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/equal.cpp
deleted file mode 100644 (file)
index ffd20a2..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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
diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/greater.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/greater.cpp
deleted file mode 100644 (file)
index 14d693d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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
diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/equal.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/equal.hpp
deleted file mode 100644 (file)
index 8985f16..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// 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
diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/greater.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/greater.hpp
deleted file mode 100644 (file)
index 32b3b9b..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// 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
diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/equal.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/equal.cpp
deleted file mode 100644 (file)
index e92bb68..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-// 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
diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/greater.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/greater.cpp
deleted file mode 100644 (file)
index 8687c71..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-// 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
index 9a2a52e..1ed6693 100644 (file)
@@ -29,6 +29,8 @@ std::shared_ptr<ngraph::Node> makeEltwise(const ngraph::Output<Node> &in0,
             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");
         }