From e8cca16f27fd8a9b565ced9db5e6435c83983a17 Mon Sep 17 00:00:00 2001 From: mitruska Date: Thu, 28 Nov 2024 18:47:05 +0100 Subject: [PATCH] Refactor variadic_split shape infer namespace --- .../include/variadic_split_shape_inference.hpp | 5 ++--- src/core/src/op/variadic_split.cpp | 10 ++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/core/shape_inference/include/variadic_split_shape_inference.hpp b/src/core/shape_inference/include/variadic_split_shape_inference.hpp index 0dfb64a7b40699..e0cd837003a331 100644 --- a/src/core/shape_inference/include/variadic_split_shape_inference.hpp +++ b/src/core/shape_inference/include/variadic_split_shape_inference.hpp @@ -10,8 +10,6 @@ namespace ov { namespace op { -namespace v1 { - namespace variadic_split { template > std::vector shape_infer(const Node* op, @@ -123,11 +121,12 @@ std::vector shape_infer(const Node* op, } } // namespace variadic_split +namespace v1 { template > std::vector shape_infer(const VariadicSplit* op, const std::vector& input_shapes, const ITensorAccessor& ta = make_tensor_accessor()) { - return variadic_split::shape_infer(op, input_shapes, ta); + return op::variadic_split::shape_infer(op, input_shapes, ta); } } // namespace v1 diff --git a/src/core/src/op/variadic_split.cpp b/src/core/src/op/variadic_split.cpp index b7c2e3db5ad831..3f638ce2034162 100644 --- a/src/core/src/op/variadic_split.cpp +++ b/src/core/src/op/variadic_split.cpp @@ -99,7 +99,7 @@ bool VariadicSplit::evaluate(TensorVector& outputs, const TensorVector& inputs) ++out_partial_shape; } - return op::variadic_split::evaluate(outputs, inputs); + return variadic_split::evaluate(outputs, inputs); } else { return false; } @@ -112,18 +112,16 @@ bool VariadicSplit::has_evaluate() const { bool VariadicSplit::evaluate_lower(TensorVector& output_values) const { OV_OP_SCOPE(v1_Split_evaluate_lower); - return op::variadic_split::has_axis_and_splits_bound_set(this) && - default_lower_bound_evaluator(this, output_values); + return variadic_split::has_axis_and_splits_bound_set(this) && default_lower_bound_evaluator(this, output_values); } bool VariadicSplit::evaluate_upper(TensorVector& output_values) const { OV_OP_SCOPE(v1_Split_evaluate_upper); - return op::variadic_split::has_axis_and_splits_bound_set(this) && - default_upper_bound_evaluator(this, output_values); + return variadic_split::has_axis_and_splits_bound_set(this) && default_upper_bound_evaluator(this, output_values); } bool VariadicSplit::evaluate_symbol(TensorSymbolVector& output_symbols) const { - return op::variadic_split::has_axis_and_splits_bound_set(this) && + return variadic_split::has_axis_and_splits_bound_set(this) && ov::util::default_symbol_evaluator(this, output_symbols); } } // namespace v1