Skip to content

Commit c50b79f

Browse files
authored
[Snippets] Set names for subgraph passes on create (#32230)
### Details: Fix lack of names in subgraph passes (used for debug purposes) ### Tickets: - N/A
1 parent 96be022 commit c50b79f

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

src/common/snippets/include/snippets/pass/extract_constants.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace ov::snippets::pass {
2222
class ExtractConstants : public CommonOptimizations::SubgraphPass {
2323
public:
2424
OPENVINO_RTTI("ExtractConstants", "0");
25-
ExtractConstants() = default;
25+
ExtractConstants() : SubgraphPass("ExtractConstants") {}
2626

2727
bool run_on_subgraph(const std::shared_ptr<op::Subgraph>& subgraph) override;
2828
};

src/common/snippets/include/snippets/pass/extract_unsupported_transposes.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace ov::snippets::pass {
2121
class ExtractUnsupportedTransposes : public CommonOptimizations::SubgraphPass {
2222
public:
2323
OPENVINO_RTTI("ExtractUnsupportedTransposes", "0");
24-
ExtractUnsupportedTransposes() = default;
24+
ExtractUnsupportedTransposes() : SubgraphPass("ExtractUnsupportedTransposes") {}
2525

2626
bool run_on_subgraph(const std::shared_ptr<op::Subgraph>& subgraph) override;
2727
};

src/common/snippets/include/snippets/pass/split_dimension_m.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace ov::snippets::pass {
3232
class SplitDimensionM : public CommonOptimizations::SubgraphPass {
3333
public:
3434
OPENVINO_RTTI("SplitDimensionM", "0");
35-
explicit SplitDimensionM(size_t concurrency) : m_concurrency(concurrency) {}
35+
explicit SplitDimensionM(size_t concurrency) : SubgraphPass("SplitDimensionM"), m_concurrency(concurrency) {}
3636

3737
bool run_on_subgraph(const std::shared_ptr<op::Subgraph>& subgraph) override;
3838

src/common/snippets/include/snippets/pass/subgraph_pass.hpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,13 @@ namespace ov::snippets::pass {
2424
*/
2525
class CommonOptimizations::SubgraphPass {
2626
public:
27-
SubgraphPass() = default;
27+
SubgraphPass() = delete;
28+
explicit SubgraphPass(std::string name) : m_name(std::move(name)) {}
2829
virtual ~SubgraphPass() = default;
2930

3031
virtual bool run_on_subgraph(const std::shared_ptr<op::Subgraph>& subgraph) = 0;
3132

32-
void set_name(const std::string& name) {
33-
m_name = name;
34-
}
35-
[[nodiscard]] std::string get_name() const {
33+
[[nodiscard]] const std::string& get_name() const {
3634
return m_name;
3735
}
3836

0 commit comments

Comments
 (0)