Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[LPT] Unused legacy code is removed (#31889)

Vladislav Golubev3cf7e0d4340d
diff --git a/docs/articles_en/documentation/openvino-extensibility/openvino-plugin-library/advanced-guides/low-precision-transformations/step3-main.rst b/docs/articles_en/documentation/openvino-extensibility/openvino-plugin-library/advanced-guides/low-precision-transformations/step3-main.rst
index f2fb7a1cfb9..97cd1408474 100644
--- a/docs/articles_en/documentation/openvino-extensibility/openvino-plugin-library/advanced-guides/low-precision-transformations/step3-main.rst
+++ b/docs/articles_en/documentation/openvino-extensibility/openvino-plugin-library/advanced-guides/low-precision-transformations/step3-main.rst
@@ -43,7 +43,6 @@ Step 3. Main Transformations
ShuffleChannelsTransformation <step3-main/movement/shuffle-channels>
SplitTransformation <step3-main/movement/split>
StridedSliceTransformation <step3-main/movement/strided-slice>
- SubtractTransformation <step3-main/arithmetic/subtract>
TransposeTransformation <step3-main/movement/transpose>
UnsqueezeTransformation <step3-main/shape/unsqueeze>
VariadicSplitTransformation <step3-main/movement/variadic-split>
@@ -83,7 +82,6 @@ Main transformations are the majority of low precision transformations. Transfor
* :doc:`ShuffleChannelsTransformation <step3-main/movement/shuffle-channels>`
* :doc:`SplitTransformation <step3-main/movement/split>`
* :doc:`StridedSliceTransformation <step3-main/movement/strided-slice>`
-* :doc:`SubtractTransformation <step3-main/arithmetic/subtract>`
* :doc:`TransposeTransformation <step3-main/movement/transpose>`
* :doc:`UnsqueezeTransformation <step3-main/shape/unsqueeze>`
* :doc:`VariadicSplitTransformation <step3-main/movement/variadic-split>`
diff --git a/docs/articles_en/documentation/openvino-extensibility/openvino-plugin-library/advanced-guides/low-precision-transformations/step3-main/arithmetic/subtract.rst b/docs/articles_en/documentation/openvino-extensibility/openvino-plugin-library/advanced-guides/low-precision-transformations/step3-main/arithmetic/subtract.rst
deleted file mode 100644
index c6b0507b4e4..00000000000
--- a/docs/articles_en/documentation/openvino-extensibility/openvino-plugin-library/advanced-guides/low-precision-transformations/step3-main/arithmetic/subtract.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-SubtractTransformation transformation
-=====================================
-
-ov::pass::low_precision::SubtractTransformation class represents the `Subtract` operation transformation.
\ No newline at end of file
diff --git a/src/common/low_precision_transformations/include/low_precision/convert.hpp b/src/common/low_precision_transformations/include/low_precision/convert.hpp
deleted file mode 100644
index edfb58076c9..00000000000
--- a/src/common/low_precision_transformations/include/low_precision/convert.hpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (C) 2018-2025 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#pragma once
-
-
-#include "low_precision/layer_transformation.hpp"
-
-namespace ov {
-namespace pass {
-namespace low_precision {
-
-class LP_TRANSFORMATIONS_API ConvertTransformation : public LayerTransformation {
-public:
- OPENVINO_RTTI("ConvertTransformation", "0", LayerTransformation);
- ConvertTransformation(const Params& params = Params());
- bool transform(ov::pass::pattern::Matcher &m) override;
- bool isPrecisionPreserved(std::shared_ptr<Node> layer) const noexcept override;
-};
-
-} // namespace low_precision
-} // namespace pass
-} // namespace ov
diff --git a/src/common/low_precision_transformations/include/low_precision/network_helper.hpp b/src/common/low_precision_transformations/include/low_precision/network_helper.hpp
index 2c6e06ae9b4..5b53181b804 100644
--- a/src/common/low_precision_transformations/include/low_precision/network_helper.hpp
+++ b/src/common/low_precision_transformations/include/low_precision/network_helper.hpp
@@ -39,9 +39,6 @@ namespace low_precision {
*/
class LP_TRANSFORMATIONS_API NetworkHelper {
public:
- // Return true if `type` can be castable to at least one of `type`
- static bool is_castable_to_one_of(NodeTypeInfo type, const std::unordered_set<NodeTypeInfo>& types);
-
static std::vector<Input<Node>> consumer_inputs(std::shared_ptr<Node> node);
// Collect and return a vector with all nodes that consumes any of the `node` output
@@ -64,18 +61,10 @@ public:
static size_t getOutputChannelsCount(std::shared_ptr<const Node> layer, bool isOnWeights = false);
- static std::vector<std::shared_ptr<Node>> getParentsRecursivelyExceptTypes(
- std::shared_ptr<Node> layer,
- const std::unordered_set<NodeTypeInfo>& exceptionLayerTypes = {},
- const int portIndex = -1);
-
static size_t getInputChannelsCount(std::shared_ptr<Node> layer);
static size_t getGroupsCount(std::shared_ptr<Node> layer);
- // Remove node by connecting its 0th input with 0th output
- static void removeLayer(std::shared_ptr<Node> node);
-
static std::shared_ptr<Node> swapMultiplyAndAdd(std::shared_ptr<ov::opset1::Add> addAfterMultiply, const int multiplyBranch);
static void copyInfo(const std::vector<std::shared_ptr<Node>>& sources, const std::vector<std::shared_ptr<Node>>& targets, bool overrideName = true);
@@ -260,11 +249,6 @@ private:
const std::shared_ptr<ov::opset1::FakeQuantize>& fq,
const bool roundValues,
const bool roundValuesWasSet);
-
- // 1 - on weights
- // 0 - weightable layer was not found
- // -1 - on activations
- static int onWeightsInDepth(std::shared_ptr<Node> layer);
};
template <typename OperationType>
@@ -297,17 +281,6 @@ std::shared_ptr<Node> NetworkHelper::setOutDataPrecision(std::shared_ptr<Operati
}
}
-template <typename T>
-std::shared_ptr<Node> make_op_pattern(const ov::NodeVector& args) {
- return std::make_shared<ov::pass::pattern::op::Any>(
- element::dynamic,
- PartialShape{},
- [](std::shared_ptr<Node> n) {
- return !!ov::as_type_ptr<T>(n);
- },
- args);
-}
-
template <typename T, typename... Args>
std::shared_ptr<Node> fold(Args&&... args) {
auto node = std::make_shared<T>(std::forward<Args>(args)...);
diff --git a/src/common/low_precision_transformations/include/low_precision/subtract.hpp b/src/common/low_precision_transformations/include/low_precision/subtract.hpp
deleted file mode 100644
index c020480c1e3..00000000000
--- a/src/common/low_precision_transformations/include/low_precision/subtract.hpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (C) 2018-2025 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#pragma once
-
-
-#include "low_precision/layer_transformation.hpp"
-
-namespace ov {
-namespace pass {
-namespace low_precision {
-
-/**
- * @ingroup ov_transformation_common_api
- * @brief SubtractTransformation propagates dequantization operations through Subtract operation.
- *
- * For more details about the transformation, refer to
- * [SubtractTransformation](@ref openvino_docs_OV_UG_lpt_SubtractTransformation) page
- * in the OpenVINO Developer Guide.
- */
-class LP_TRANSFORMATIONS_API SubtractTransformation : public LayerTransformation {
-public:
- OPENVINO_RTTI("SubtractTransformation", "0", LayerTransformation);
- SubtractTransformation(const Params& params);
- bool transform(ov::pass::pattern::Matcher &m) override;
-};
-
-} // namespace low_precision
-} // namespace pass
-} // namespace ov
diff --git a/src/common/low_precision_transformations/src/convert.cpp b/src/common/low_precision_transformations/src/convert.cpp
deleted file mode 100644
index 41a0b11133a..00000000000
--- a/src/common/low_precision_transformations/src/convert.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (C) 2018-2025 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#include "low_precision/convert.hpp"
-
-#include <algorithm>
-#include <memory>
-#include <string>
-#include <unordered_set>
-#include <utility>
-#include <vector>
-
-#include "itt.hpp"
-#include "openvino/util/log.hpp"
-
-#include "openvino/pass/pattern/op/wrap_type.hpp"
-#include "low_precision/common/ie_lpt_exception.hpp"
-#include "low_precision/network_helper.hpp"
-#include "openvino/core/graph_util.hpp"
-
-namespace ov {
-namespace pass {
-namespace low_precision {
-
-ConvertTransformation::ConvertTransformation(const Params& params) : LayerTransformation(params) {
- MATCHER_SCOPE(ConvertTransformation);
- auto matcher = pattern::wrap_type<ov::opset1::Convert>();
-
- ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) {
- auto op = m.get_match_root();
- if (transformation_callback(op)) {
- return false;
- }
- return transform(m);
- };
-
- auto m = std::make_shared<ov::pass::pattern::Matcher>(matcher, matcher_name);
- this->register_matcher(m, callback);
-}
-
-bool ConvertTransformation::transform(ov::pass::pattern::Matcher &m) {
- std::shared_ptr<ov::opset1::Convert> convert = ov::as_type_ptr<ov::opset1::Convert>(m.get_match_root());
- if (!convert) {
- return false;
- }
-
- if (!canBeTransformed(convert)) {
- return false;
- }
-
- const ov::element::Type precisionBefore = convert->get_input_element_type(0);
-
- std::shared_ptr<ov::opset1::Subtract> subtract = std::make_shared<ov::op::TypeRelaxed<ov::opset1::Subtract>>(
- convert->input_value(0),
- std::make_shared<ov::opset1::Constant>(precisionBefore, Shape{}, std::vector<size_t>({ 0 })));
- NetworkHelper::setOutDataPrecision(subtract, convert->get_output_element_type(0));
-
- replace_node(convert, subtract);
-
- subtract->set_friendly_name(convert->get_friendly_name());
-
- OPENVINO_DEBUG("LPT: done: ", subtract);
- return true;
-}
-
-bool ConvertTransformation::isPrecisionPreserved(std::shared_ptr<Node> layer) const noexcept {
- return false;
-}
-
-} // namespace low_precision
-} // namespace pass
-} // namespace ov
diff --git a/src/common/low_precision_transformations/src/low_precision.cpp b/src/common/low_precision_transformations/src/low_precision.cpp
index c334b455a18..5996f0332c9 100644
--- a/src/common/low_precision_transformations/src/low_precision.cpp
+++ b/src/common/low_precision_transformations/src/low_precision.cpp
@@ -86,13 +86,11 @@
#include "low_precision/split.hpp"
#include "low_precision/squeeze.hpp"
#include "low_precision/strided_slice.hpp"
-#include "low_precision/subtract.hpp"
#include "low_precision/transpose.hpp"
#include "low_precision/unsqueeze.hpp"
#include "low_precision/variadic_split.hpp"
// cleanup transformations
-#include "low_precision/convert.hpp"
#include "low_precision/eliminate_fake_quantize.hpp"
#include "low_precision/fold_convert.hpp"
#include "low_precision/fold_fake_quantize.hpp"
diff --git a/src/common/low_precision_transformations/src/network_helper.cpp b/src/common/low_precision_transformations/src/network_helper.cpp
index 4a3880cff42..3f25112615f 100644
--- a/src/common/low_precision_transformations/src/network_helper.cpp
+++ b/src/common/low_precision_transformations/src/network_helper.cpp
@@ -41,16 +41,6 @@ namespace ov {
namespace pass {
namespace low_precision {
-// Return true if `type` can be castable to at least one of `type`
-bool NetworkHelper::is_castable_to_one_of(NodeTypeInfo type, const std::unordered_set<NodeTypeInfo>& types) {
- for (auto another : types) {
- if (type.is_castable(another)) {
- return true;
- }
- }
- return false;
-}
-
// Collect and return a vector with all nodes that consumes any of the `node` output
std::vector<Input<Node>> NetworkHelper::consumer_inputs(std::shared_ptr<Node> node) {
std::vector<Input<Node>> result;
@@ -159,28 +149,6 @@ size_t NetworkHelper::getOutputChannelsCount(std::shared_ptr<const Node> layer,
}
}
-std::vector<std::shared_ptr<Node>> NetworkHelper::getParentsRecursivelyExceptTypes(
- std::shared_ptr<Node> layer,
- const std::unordered_set<NodeTypeInfo>& exceptionLayerTypes,
- const int portIndex) {
- std::vector<std::shared_ptr<Node>> parents;
- int i = 0;
- for (auto input : layer->inputs()) {
- if ((portIndex == -1) || (portIndex == i)) {
- auto parent = input.get_source_output().get_node_shared_ptr();
- if (is_castable_to_one_of(parent->get_type_info(), exceptionLayerTypes)) {
- const std::vector<std::shared_ptr<Node>> tmpParents = getParentsRecursivelyExceptTypes(parent, exceptionLayerTypes);
- parents.insert(parents.end(), tmpParents.begin(), tmpParents.end());
- } else {
- parents.push_back(parent);
- }
- }
-
- i++;
- }
- return parents;
-}
-
size_t NetworkHelper::getInputChannelsCount(std::shared_ptr<Node> layer) {
if (layer->get_input_size() == 0) {
THROW_TRANSFORMATION_EXCEPTION << "There are no input layers";
@@ -204,10 +172,6 @@ size_t NetworkHelper::getGroupsCount(std::shared_ptr<Node> layer) {
}
}
-void NetworkHelper::removeLayer(std::shared_ptr<Node> layer) {
- ov::replace_output_update_name(layer->output(0), layer->input_value(0));
-}
-
std::shared_ptr<Node> NetworkHelper::swapMultiplyAndAdd(std::shared_ptr<ov::opset1::Add> addAfterMultiply, const int multiplyBranch) {
// Multiply --> Add(addAfterMultiply) ==> Add(new) --> Multiply(new)
// That means x*a + b ==> (x + b/a)*a; tries to fold b/a
diff --git a/src/common/low_precision_transformations/src/subtract.cpp b/src/common/low_precision_transformations/src/subtract.cpp
deleted file mode 100644
index 46b275251a6..00000000000
--- a/src/common/low_precision_transformations/src/subtract.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright (C) 2018-2025 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#include "low_precision/subtract.hpp"
-
-#include <algorithm>
-#include <memory>
-#include <string>
-#include <unordered_set>
-#include <utility>
-#include <vector>
-
-#include "openvino/pass/pattern/op/wrap_type.hpp"
-#include "openvino/pass/pattern/op/or.hpp"
-
-#include "low_precision/common/ie_lpt_exception.hpp"
-#include "low_precision/network_helper.hpp"
-#include "itt.hpp"
-#include "openvino/core/graph_util.hpp"
-#include "openvino/op/divide.hpp"
-
-namespace ov {
-namespace pass {
-namespace low_precision {
-
-SubtractTransformation::SubtractTransformation(const Params& params) : LayerTransformation(params) {
- MATCHER_SCOPE(SubtractTransformation);
- auto convert = pattern::wrap_type<ov::opset1::Convert>();
- auto multiply = pattern::wrap_type<ov::opset1::Multiply>();
- auto subParent = std::make_shared<pass::pattern::op::Or>(OutputVector{ convert, multiply });
- auto subtract = pattern::wrap_type<ov::opset1::Subtract>({ subParent, pattern::wrap_type<ov::opset1::Constant>() });
-
- ov::graph_rewrite_callback callback = [this](pattern::Matcher& m) {
- auto op = m.get_match_root();
- if (transformation_callback(op)) {
- return false;
- }
- return transform(m);
- };
-
- auto m = std::make_shared<ov::pass::pattern::Matcher>(subtract, matcher_name);
- this->register_matcher(m, callback);
-}
-
-bool SubtractTransformation::transform(ov::pass::pattern::Matcher &m) {
- std::shared_ptr<ov::opset1::Subtract> subtract = ov::as_type_ptr<ov::opset1::Subtract>(m.get_match_root());
- if (!canBeTransformed(subtract)) {
- return false;
- }
-
- const ov::element::Type originalPrecision = subtract->get_output_element_type(0);
-
- const FakeQuantizeDequantization dequantization = NetworkHelper::getDequantization(subtract, defaultPrecisions);
- if (dequantization.multiply != nullptr) {
- // before: Y = X * SC - SH, after: Y = (X - SH') * SC
- // X * SC - SH = X * SC - SH' * SC
- // SH' = SH / SC
- std::shared_ptr<ov::opset1::Subtract> newSubtract = ov::as_type_ptr<ov::opset1::Subtract>(subtract->clone_with_new_inputs({
- dequantization.multiply->input_value(0),
- ov::pass::low_precision::fold<ov::opset1::Divide>(
- subtract->input_value(1),
- dequantization.multiply->input_value(1))
- }));
-
- std::shared_ptr<Node> newMultiply = dequantization.multiply->clone_with_new_inputs({
- newSubtract,
- dequantization.multiplyConstant
- });
-
- replace_node(subtract, newMultiply);
- subtract = newSubtract;
- }
-
- if (dequantization.subtract != nullptr) {
- std::shared_ptr<ov::opset1::Subtract> newSubtract = ov::as_type_ptr<ov::opset1::Subtract>(subtract->clone_with_new_inputs({
- dequantization.subtract->input_value(0),
- fold<ov::opset1::Add>(subtract->input_value(1), dequantization.subtractConstant)
- }));
-
- replace_node(subtract, newSubtract);
- subtract = newSubtract;
- }
-
- if (dequantization.convert != nullptr) {
- // issue #43088
- // std::shared_ptr<Node> newSubtract = NetworkHelper::optimizeElementwise(subtract);
- subtract->set_output_type(0, originalPrecision, subtract->get_output_partial_shape(0));
-
- replace_node(subtract, std::make_shared<ov::op::TypeRelaxed<ov::opset1::Subtract>>(
- subtract->input_value(0),
- subtract->input_value(1)));
- }
- return true;
-}
-
-} // namespace low_precision
-} // namespace pass
-} // namespace ov
diff --git a/src/common/low_precision_transformations/tests/simple_low_precision_transformer.cpp b/src/common/low_precision_transformations/tests/simple_low_precision_transformer.cpp
index faf7728ee40..888d6b45023 100644
--- a/src/common/low_precision_transformations/tests/simple_low_precision_transformer.cpp
+++ b/src/common/low_precision_transformations/tests/simple_low_precision_transformer.cpp
@@ -12,7 +12,6 @@
#include "low_precision/markup_quantization_granularity.hpp"
// cleanup transformations
-#include "low_precision/convert.hpp"
#include "low_precision/eliminate_fake_quantize.hpp"
#include "low_precision/fold_convert.hpp"
#include "low_precision/fold_fake_quantize.hpp"
diff --git a/src/common/low_precision_transformations/tests/transformations_after_split_transformation.cpp b/src/common/low_precision_transformations/tests/transformations_after_split_transformation.cpp
index 7686bab97b7..df8f2199ce9 100644
--- a/src/common/low_precision_transformations/tests/transformations_after_split_transformation.cpp
+++ b/src/common/low_precision_transformations/tests/transformations_after_split_transformation.cpp
@@ -28,7 +28,6 @@
#include "low_precision/reshape.hpp"
#include "low_precision/relu.hpp"
#include "low_precision/squeeze.hpp"
-#include "low_precision/subtract.hpp"
#include "low_precision/strided_slice.hpp"
#include "low_precision/transpose.hpp"
#include "low_precision/unsqueeze.hpp"
diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/x64/subtract_transformation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/x64/subtract_transformation.cpp
deleted file mode 100644
index 0314d666406..00000000000
--- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/low_precision_transformations/x64/subtract_transformation.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (C) 2018-2025 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#include <vector>
-
-#include "low_precision_transformations/subtract_transformation.hpp"
-#include "common_test_utils/test_constants.hpp"
-
-using namespace LayerTestsDefinitions;
-using namespace ov::pass::low_precision;
-
-namespace {
-const std::vector<ov::element::Type> netPrecisions = {
- ov::element::f32,
- ov::element::f16
-};
-
-INSTANTIATE_TEST_SUITE_P(smoke_LPT, SubtractTransformation,
- ::testing::Combine(
- ::testing::ValuesIn(netPrecisions),
- ::testing::Values(ov::PartialShape({ 1, 3, 16, 16 })),
- ::testing::Values(ov::test::utils::DEVICE_CPU)),
- SubtractTransformation::getTestCaseName);
-} // namespace
diff --git a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/subtract_transformation.cpp b/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/subtract_transformation.cpp
deleted file mode 100644
index 2762f953fd2..00000000000
--- a/src/plugins/intel_gpu/tests/functional/shared_tests_instances/low_precision_transformations/subtract_transformation.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (C) 2018-2025 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#include <vector>
-
-#include "low_precision_transformations/subtract_transformation.hpp"
-#include "common_test_utils/test_constants.hpp"
-
-using namespace LayerTestsDefinitions;
-using namespace ov::pass::low_precision;
-
-namespace {
-const std::vector<ov::element::Type> netPrecisions = {
- ov::element::f32,
- ov::element::f16
-};
-
-INSTANTIATE_TEST_SUITE_P(smoke_LPT, SubtractTransformation,
- ::testing::Combine(
- ::testing::ValuesIn(netPrecisions),
- ::testing::Values(ov::PartialShape({ 1, 3, 16, 16 })),
- ::testing::Values(ov::test::utils::DEVICE_GPU)),
- SubtractTransformation::getTestCaseName);
-} // namespace
diff --git a/src/tests/functional/plugin/shared/include/low_precision_transformations/subtract_transformation.hpp b/src/tests/functional/plugin/shared/include/low_precision_transformations/subtract_transformation.hpp
deleted file mode 100644
index 1b807042f84..00000000000
--- a/src/tests/functional/plugin/shared/include/low_precision_transformations/subtract_transformation.hpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (C) 2018-2025 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#pragma once
-
-#include <string>
-#include <memory>
-
-#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp"
-
-namespace LayerTestsDefinitions {
-
-typedef std::tuple<
- ov::element::Type,
- ov::PartialShape,
- std::string
-> SubtractTransformationParams;
-
-class SubtractTransformation :
- public testing::WithParamInterface<SubtractTransformationParams>,
- public LayerTestsUtils::LayerTransformation {
-public:
- static std::string getTestCaseName(const testing::TestParamInfo<SubtractTransformationParams>& obj);
-
-protected:
- void SetUp() override;
-};
-
-} // namespace LayerTestsDefinitions
diff --git a/src/tests/functional/plugin/shared/src/low_precision_transformations/subtract_transformation.cpp b/src/tests/functional/plugin/shared/src/low_precision_transformations/subtract_transformation.cpp
deleted file mode 100644
index f73a4f9bc55..00000000000
--- a/src/tests/functional/plugin/shared/src/low_precision_transformations/subtract_transformation.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (C) 2018-2025 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#include "low_precision_transformations/subtract_transformation.hpp"
-
-#include <memory>
-#include <tuple>
-#include <vector>
-#include <string>
-
-#include "transformations/init_node_info.hpp"
-#include "ov_lpt_models/subtract.hpp"
-
-
-
-namespace LayerTestsDefinitions {
-
-std::string SubtractTransformation::getTestCaseName(const testing::TestParamInfo<SubtractTransformationParams>& obj) {
- auto [netPrecision, inputShapes, device] = obj.param;
- return get_test_case_name_by_params(netPrecision, inputShapes, device);
-}
-
-void SubtractTransformation::SetUp() {
- auto [netPrecision, inputShape, device] = this->GetParam();
- targetDevice = device;
-
- init_input_shapes(inputShape);
-
- function = ov::builder::subgraph::SubtractFunction::getOriginal(netPrecision, inputShape);
-}
-
-TEST_P(SubtractTransformation, CompareWithRefImpl) {
- run();
-};
-
-} // namespace LayerTestsDefinitions
diff --git a/src/tests/ov_helpers/ov_lpt_models/include/ov_lpt_models/subtract.hpp b/src/tests/ov_helpers/ov_lpt_models/include/ov_lpt_models/subtract.hpp
deleted file mode 100644
index 924e4b8b3dc..00000000000
--- a/src/tests/ov_helpers/ov_lpt_models/include/ov_lpt_models/subtract.hpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (C) 2018-2025 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#pragma once
-
-#include <memory>
-
-#include "ov_lpt_models/common/dequantization_operations.hpp"
-#include "ov_lpt_models/common/builders.hpp"
-
-namespace ov {
-namespace builder {
-namespace subgraph {
-
-class SubtractFunction {
-public:
- static std::shared_ptr<ov::Model> getOriginal(
- const ov::element::Type precision,
- const ov::PartialShape& inputShape);
-};
-
-} // namespace subgraph
-} // namespace builder
-} // namespace ov
diff --git a/src/tests/ov_helpers/ov_lpt_models/src/subtract.cpp b/src/tests/ov_helpers/ov_lpt_models/src/subtract.cpp
deleted file mode 100644
index 97697ae5f62..00000000000
--- a/src/tests/ov_helpers/ov_lpt_models/src/subtract.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (C) 2018-2025 Intel Corporation
-// SPDX-License-Identifier: Apache-2.0
-//
-
-#include "ov_lpt_models/subtract.hpp"
-#include "low_precision/network_helper.hpp"
-#include "openvino/opsets/opset1_decl.hpp"
-#include "ov_lpt_models/common/builders.hpp"
-#include "common_test_utils/node_builders/fake_quantize.hpp"
-
-using namespace ov::pass::low_precision;
-
-namespace ov {
-namespace builder {
-namespace subgraph {
- std::shared_ptr<ov::Model> SubtractFunction::getOriginal(
- const ov::element::Type precision,
- const ov::PartialShape& inputShape) {
- const float k = 50.f;
-
- const auto input = std::make_shared<ov::opset1::Parameter>(precision, inputShape);
- const auto fakeQuantizeOnActivations = ov::test::utils::make_fake_quantize(
- input, precision, 256ul, { 1ul },
- { 0.f }, { 255.f / k }, { 0.f }, { 255.f / k });
-
- const size_t channelsValue = inputShape[1].get_length();
- const auto weights = ov::opset1::Constant::create(
- precision,
- ov::Shape{ channelsValue, channelsValue, 1, 1 },
- std::vector<float>(channelsValue * channelsValue, 1));
-
- const auto convolution = std::make_shared<ov::opset1::Convolution>(
- fakeQuantizeOnActivations == nullptr ? input : fakeQuantizeOnActivations,
- ov::test::utils::make_fake_quantize(weights, precision, 256ul, { 1ul }, { -128.f / k }, { 127.f / k }, { -128.f / k }, { 127.f / k }),
- ov::Strides{ 1, 1 },
- ov::CoordinateDiff{ 0, 0 },
- ov::CoordinateDiff{ 0, 0 },
- ov::Strides{ 1, 1 });
-
- ov::ResultVector results{ std::make_shared<ov::opset1::Result>(convolution) };
- std::shared_ptr<ov::Model> function = std::make_shared<ov::Model>(
- results,
- ov::ParameterVector{ input },
- "SubtractTransformation");
-
- return function;
- }
-
-} // namespace subgraph
-} // namespace builder
-} // namespace ov