diff --git a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/not_fused_conv_simple_op.cpp b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/not_fused_conv_simple_op.cpp new file mode 100644 index 00000000000000..3405a6c8d0576d --- /dev/null +++ b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/not_fused_conv_simple_op.cpp @@ -0,0 +1,48 @@ +// Copyright (C) 2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "ngraph_functions/builders.hpp" +#include "test_utils/cpu_test_utils.hpp" + +using namespace ngraph; +using ngraph::helpers::EltwiseTypes; + +namespace SubgraphTestsDefinitions { + +class NotFusedConvSimpleOp : public LayerTestsUtils::LayerTestsCommon { +protected: + void SetUp() override { + targetDevice = CommonTestUtils::DEVICE_CPU; + + auto inputParams = builder::makeParams(element::f32, {{1, 3, 12, 9}, {1, 16, 12, 9}}); + auto paramOuts = helpers::convert2OutputVector(helpers::castOps2Nodes(inputParams)); + + std::shared_ptr conv; + { + const std::vector kernelSize = {3, 3}; + const std::vector strides = {1, 1}; + const std::vector padBegin = {0, 0}; + const std::vector padEnd = {0, 0}; + const std::vector dilation = {1, 1}; + const size_t numOutChannels = 16; + const op::PadType paddingType = op::PadType::EXPLICIT; + conv = builder::makeConvolution(paramOuts[0], element::f32, kernelSize, strides, padBegin, padEnd, dilation, paddingType, numOutChannels); + } + const auto sharedNode = builder::makeConstant(element::f32, {1, 16, 1, 1}, std::vector{}, true); + const auto postOpCandidate = builder::makeEltwise(conv, sharedNode, EltwiseTypes::ADD); + + const auto secondConsumpt = builder::makeEltwise(paramOuts[1], sharedNode, EltwiseTypes::ADD); + + NodeVector results{postOpCandidate, secondConsumpt}; + function = std::make_shared(results, inputParams, "NotFusedConvSimpleOp"); + } +}; + +TEST_F(NotFusedConvSimpleOp, CompareWithRefs) { + SKIP_IF_CURRENT_TEST_IS_DISABLED() + + Run(); +} + +} // namespace SubgraphTestsDefinitions