From f70e22facb4deb649537537eb2e6adb74d2e1a92 Mon Sep 17 00:00:00 2001 From: Ivan Novoselov Date: Fri, 4 Nov 2022 16:25:00 +0100 Subject: [PATCH] Remove overriden_shapes and corr methods from op::Subgraph --- .../snippets/include/snippets/op/subgraph.hpp | 9 --------- src/common/snippets/src/op/subgraph.cpp | 13 +++---------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/common/snippets/include/snippets/op/subgraph.hpp b/src/common/snippets/include/snippets/op/subgraph.hpp index a5a1c7efc36a60..c5465e10f3188c 100644 --- a/src/common/snippets/include/snippets/op/subgraph.hpp +++ b/src/common/snippets/include/snippets/op/subgraph.hpp @@ -105,11 +105,6 @@ class Subgraph : public ngraph::op::Op { return config.m_has_domain_sensitive_ops; } - const std::vector& get_overriden_shapes() const { - return overriden_io_shapes; - } - - void set_overriden_shapes(std::vector); size_t tileRank = 0; // set by plugin to facilitate scheduling snippets::Schedule generate(const BlockedShapeVector& output_shapes, const BlockedShapeVector& input_shapes, ngraph::pass::Manager& opt, @@ -167,10 +162,6 @@ class Subgraph : public ngraph::op::Op { } config; ov::PartialShape master_shape; - // Input and output shapes that will be passed to snippets::pass::InsertLoops. - // overriden_io_shapes are used to propagate scheduling shapes without a proper body reshape in cases when - // body contains domain-sensitive operations that can't be easily reshaped to an arbitrary domain (e.g. Transpose) - std::vector overriden_io_shapes; }; static inline std::ostream& operator<<(std::ostream& os, const op::Subgraph::BlockedShape& blocked_shape) { diff --git a/src/common/snippets/src/op/subgraph.cpp b/src/common/snippets/src/op/subgraph.cpp index 9e6979439b30af..b221652c50ea33 100644 --- a/src/common/snippets/src/op/subgraph.cpp +++ b/src/common/snippets/src/op/subgraph.cpp @@ -43,15 +43,8 @@ void snippets::op::Subgraph::set_non_scalar_constants_count(const size_t count) m_non_scalar_constants_count = count; } -void snippets::op::Subgraph::set_overriden_shapes(std::vector new_shapes) { -// OPENVINO_ASSERT(has_domain_sensitive_ops(), "You can override io shapes only if Subgraph body contains domain-sensitive ops"); - size_t body_io_size = m_body->get_parameters().size() + m_body->get_results().size(); - OPENVINO_ASSERT(new_shapes.size() == body_io_size, "Invalid number of overriden shapes, must be a shape for every result and parameter"); - overriden_io_shapes = std::move(new_shapes); -} - snippets::op::Subgraph::Subgraph(const OutputVector& args, std::shared_ptr body) - : Op(args), m_body(body), m_generator(nullptr), overriden_io_shapes({}) { + : Op(args), m_body(std::move(body)), m_generator(nullptr) { const auto ops = m_body->get_ops(); for (const auto& op : ops) { config.m_is_quantized = config.m_is_quantized || ov::is_type(op); @@ -65,7 +58,7 @@ snippets::op::Subgraph::Subgraph(const OutputVector& args, std::shared_ptr body) - : Subgraph(as_output_vector(args), body) {} + : Subgraph(as_output_vector(args), std::move(body)) {} std::shared_ptr snippets::op::Subgraph::clone_with_new_inputs(const OutputVector& inputs) const { INTERNAL_OP_SCOPE(Subgraph); @@ -415,7 +408,7 @@ void snippets::op::Subgraph::convert_to_snippet_dialect() { if (!has_domain_sensitive_ops()) manager.register_pass(master_shape, tileRank, m_generator->get_target_machine()->get_lanes()); - manager.register_pass("transpose_lowered.xml", "transpose_lowered.bin"); +// manager.register_pass("transpose_lowered.xml", "transpose_lowered.bin"); } manager.run_passes(m_body); }