Skip to content

Commit

Permalink
Review comments 1 + RTTI update
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanNovoselov committed Dec 31, 2024
1 parent cb519eb commit 0b7ac60
Show file tree
Hide file tree
Showing 60 changed files with 85 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace pass {
*/
class AllocateBuffers: public RangedPass {
public:
OPENVINO_RTTI("AllocateBuffers", "RangedPass")
OPENVINO_RTTI("AllocateBuffers", "0", RangedPass)
AllocateBuffers(bool is_optimized = true);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace pass {
*/
class AssignRegisters : public Pass {
public:
OPENVINO_RTTI("AssignRegisters", "Pass")
OPENVINO_RTTI("AssignRegisters", "0", Pass)
explicit AssignRegisters(RegManager& reg_manager) : m_reg_manager(reg_manager) {}
bool run(LinearIR& linear_ir) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ template <typename BRGEMM_TYPE,
typename std::enable_if<std::is_base_of<ov::snippets::op::Brgemm, BRGEMM_TYPE>::value, bool>::type = true>
class BrgemmBlocking : public snippets::lowered::pass::RangedPass, public BrgemmBlockingBase {
public:
OPENVINO_RTTI("BrgemmBlocking", "RangedPass")
OPENVINO_RTTI("BrgemmBlocking", "0", RangedPass)

bool run(snippets::lowered::LinearIR& linear_ir,
snippets::lowered::LinearIR::constExprIt begin,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace pass {
*/
class CleanRepeatedDataPointerShifts: public RangedPass {
public:
OPENVINO_RTTI("CleanRepeatedDataPointerShifts", "RangedPass")
OPENVINO_RTTI("CleanRepeatedDataPointerShifts", "0", RangedPass)
CleanRepeatedDataPointerShifts() = default;

bool run(lowered::LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace pass {
*/
class CleanupLoopOffsets : public RangedPass {
public:
OPENVINO_RTTI("CleanupLoopOffsets", "RangedPass")
OPENVINO_RTTI("CleanupLoopOffsets", "0", RangedPass)
bool run(lowered::LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace pass {
*/
class ComputeBufferAllocationSize : public RangedPass {
public:
OPENVINO_RTTI("ComputeBufferAllocationSize", "RangedPass")
OPENVINO_RTTI("ComputeBufferAllocationSize", "0", RangedPass)
ComputeBufferAllocationSize() = default;

bool run(LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace pass {
*/
class DefineBufferClusters : public RangedPass {
public:
OPENVINO_RTTI("DefineBufferClusters", "RangedPass")
OPENVINO_RTTI("DefineBufferClusters", "0", RangedPass)

DefineBufferClusters() = default;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace pass {
*/
class ExtractLoopInvariants : public RangedPass {
public:
OPENVINO_RTTI("ExtractLoopInvariants", "RangedPass")
OPENVINO_RTTI("ExtractLoopInvariants", "0", RangedPass)
ExtractLoopInvariants() = default;
bool run(LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace pass {
*/
class FuseLoops : public RangedPass {
public:
OPENVINO_RTTI("FuseLoops", "RangedPass")
OPENVINO_RTTI("FuseLoops", "0", RangedPass)
FuseLoops();
bool run(LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace pass {

class InitBuffersDefault : public RangedPass {
public:
OPENVINO_RTTI("InitBuffersDefault", "RangedPass")
OPENVINO_RTTI("InitBuffersDefault", "0", RangedPass)

InitBuffersDefault(size_t& buffer_scratchpad_size) : m_buffer_scratchpad_size(buffer_scratchpad_size) {
m_buffer_scratchpad_size = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023 Intel Corporation
// Copyright (C) 2025 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

Expand All @@ -20,7 +20,7 @@ namespace pass {
*/
class InitLiveRanges : public Pass {
public:
OPENVINO_RTTI("InitLiveRanges", "Pass")
OPENVINO_RTTI("InitLiveRanges", "0", Pass)
explicit InitLiveRanges(RegManager& reg_manager) : m_reg_manager(reg_manager) {}
bool run(LinearIR& linear_ir) override;
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace pass {
*/
class InitLoops : public Pass {
public:
OPENVINO_RTTI("InitLoops", "Pass")
OPENVINO_RTTI("InitLoops", "0", Pass)
InitLoops() = default;
bool run(LinearIR& linear_ir) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace pass {
*/
class InsertBroadcastMove : public RangedPass {
public:
OPENVINO_RTTI("InsertBroadcastMove", "RangedPass")
OPENVINO_RTTI("InsertBroadcastMove", "0", RangedPass)
bool run(LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;

static bool is_broadcasting_supported(const std::shared_ptr<ov::Node>& n);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace pass {
*/
class InsertBuffers : public RangedPass {
public:
OPENVINO_RTTI("InsertBuffers", "RangedPass")
OPENVINO_RTTI("InsertBuffers", "0", RangedPass)
InsertBuffers() = default;
bool run(LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace pass {
*/
class InsertLoadStore : public RangedPass {
public:
OPENVINO_RTTI("InsertLoadStore", "RangedPass")
OPENVINO_RTTI("InsertLoadStore", "0", RangedPass)
explicit InsertLoadStore(size_t vector_size);
bool run(LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace pass {
*/
class InsertLoops : public RangedPass {
public:
OPENVINO_RTTI("InsertLoops", "RangedPass")
OPENVINO_RTTI("InsertLoops", "0", RangedPass)
InsertLoops() = default;
bool run(LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;
private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace pass {
*/
class InsertPerfCount: public RangedPass {
public:
OPENVINO_RTTI("InsertPerfCount", "RangedPass")
OPENVINO_RTTI("InsertPerfCount", "0", RangedPass)
InsertPerfCount(std::map<std::string, std::string> boundary_op_names);
bool run(LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ namespace pass {
*/
class InsertRegSpills : public Pass {
public:
OPENVINO_RTTI("InsertRegSpills", "Pass")
OPENVINO_RTTI("InsertRegSpills", "0", Pass)
explicit InsertRegSpills(RegManager& reg_manager) : m_reg_manager(reg_manager) {}
bool run(LinearIR& linear_ir) override;

private:
RegManager& m_reg_manager;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace pass {
*/
class InsertSpecificIterations : public RangedPass {
public:
OPENVINO_RTTI("InsertSpecificIterations", "RangedPass")
OPENVINO_RTTI("InsertSpecificIterations", "0", RangedPass)
InsertSpecificIterations() = default;
bool run(LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace pass {
class UpdateMemoryAccessCounts : public pass::RangedPass {
public:
UpdateMemoryAccessCounts(size_t count);
OPENVINO_RTTI("UpdateMemoryAccessCounts", "RangedPass")
OPENVINO_RTTI("UpdateMemoryAccessCounts", "0", RangedPass)
bool run(LinearIR& linear_ir, LinearIR::constExprIt begin, LinearIR::constExprIt end) override;
std::shared_ptr<pass::PassBase> merge(const std::shared_ptr<pass::PassBase>& other) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace pass {
class LoadMoveBroadcastToBroadcastLoad: public RangedPass {
public:
LoadMoveBroadcastToBroadcastLoad() = default;
OPENVINO_RTTI("LoadMoveBroadcastToBroadcastLoad", "RangedPass")
OPENVINO_RTTI("LoadMoveBroadcastToBroadcastLoad", "0", RangedPass)
bool run(LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace pass {
*/
class MarkInvariantShapePath: public RangedPass {
public:
OPENVINO_RTTI("MarkInvariantShapePath", "RangedPass")
OPENVINO_RTTI("MarkInvariantShapePath", "0", RangedPass)
MarkInvariantShapePath() = default;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace pass {
*/
class MarkLoops : public RangedPass {
public:
OPENVINO_RTTI("MarkLoops", "RangedPass")
OPENVINO_RTTI("MarkLoops", "0", RangedPass)
MarkLoops(size_t vector_size);
bool run(LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ namespace pass {
*/
class MHAParallelWAOptimizer : public lowered::pass::RuntimeOptimizer {
public:
OPENVINO_RTTI("MHAParallelWAOptimizer", "0", RuntimeOptimizer)
MHAParallelWAOptimizer() = default;
MHAParallelWAOptimizer(const lowered::LinearIRCPtr& linear_ir, const RuntimeConfigurator* configurator);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace pass {
*/
class MoveResultOutOfLoop : public Pass {
public:
OPENVINO_RTTI("MoveResultOutOfLoop", "Pass")
OPENVINO_RTTI("MoveResultOutOfLoop", "0", Pass)
MoveResultOutOfLoop() = default;
bool run(LinearIR& linear_ir) override;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace pass {
*/
class MoveScalarToConsumer : public Pass {
public:
OPENVINO_RTTI("MoveScalarsToConsumer", "Pass")
OPENVINO_RTTI("MoveScalarsToConsumer", "0", Pass)
MoveScalarToConsumer() = default;
bool run(LinearIR& linear_ir) override;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace pass {

class NormalizeBufferRegisterGroups : public RangedPass {
public:
OPENVINO_RTTI("NormalizeBufferRegisterGroups", "RangedPass")
OPENVINO_RTTI("NormalizeBufferRegisterGroups", "0", RangedPass)
/**
* @brief Apply the pass to the Linear IR
* @param linear_ir the target Linear IR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace pass {

class NormalizeLoopIDs : public Pass {
public:
OPENVINO_RTTI("NormalizeLoopIDs", "Pass")
OPENVINO_RTTI("NormalizeLoopIDs", "0", Pass)
NormalizeLoopIDs(bool has_specific_loops = true) : m_has_specific_loops(has_specific_loops) {}
bool run(lowered::LinearIR& linear_ir) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace pass {

class OptimizeDomain : public snippets::lowered::pass::Pass {
public:
OPENVINO_RTTI("OptimizeDomain", "Pass")
OPENVINO_RTTI("OptimizeDomain", "0", Pass)
explicit OptimizeDomain(size_t& tile_rank);
bool run(LinearIR& linear_ir) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace pass {
*/
class OptimizeLoopSingleEvaluation : public RangedPass {
public:
OPENVINO_RTTI("OptimizeLoopSingleEvaluation", "RangedPass")
OPENVINO_RTTI("OptimizeLoopSingleEvaluation", "0", RangedPass)
bool run(lowered::LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;
};

Expand Down
3 changes: 3 additions & 0 deletions src/common/snippets/include/snippets/lowered/pass/pass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class PassBase : public std::enable_shared_from_this<PassBase> {
*/
class Pass : public PassBase {
public:
OPENVINO_RTTI("Pass")
/**
* @brief Apply the pass to the Linear IR
* @param linear_ir the target Linear IR
Expand All @@ -74,6 +75,7 @@ class Pass : public PassBase {
*/
class ConstPass : public PassBase {
public:
OPENVINO_RTTI("ConstPass")
/**
* @brief Apply the pass to the Linear IR
* @param linear_ir the target Linear IR
Expand All @@ -89,6 +91,7 @@ class ConstPass : public PassBase {
*/
class RangedPass : public PassBase {
public:
OPENVINO_RTTI("RangedPass")
/**
* @brief Apply the pass to the Linear IR
* @param linear_ir the target Linear IR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace pass {
*/
class PropagateBufferOffset: public Pass {
public:
OPENVINO_RTTI("PropagateBufferOffset", "Pass")
OPENVINO_RTTI("PropagateBufferOffset", "0", Pass)
PropagateBufferOffset() = default;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace pass {
class UpdateSubtensors : public pass::RangedPass {
public:
UpdateSubtensors(size_t tail_size);
OPENVINO_RTTI("UpdateSubtensors", "RangedPass")
OPENVINO_RTTI("UpdateSubtensors", "0", RangedPass)
bool run(LinearIR& linear_ir, LinearIR::constExprIt begin, LinearIR::constExprIt end) override;
std::shared_ptr<pass::PassBase> merge(const std::shared_ptr<pass::PassBase>& other) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace pass {
*/
class ReduceDecomposition : public RangedPass {
public:
OPENVINO_RTTI("ReduceDecomposition", "RangedPass")
OPENVINO_RTTI("ReduceDecomposition", "0", RangedPass)
explicit ReduceDecomposition(size_t vector_size);
bool run(LinearIR& linear_ir, LinearIR::constExprIt begin, LinearIR::constExprIt end) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace pass {
*/
class RuntimeOptimizer : public ConstPass {
public:
OPENVINO_RTTI("RuntimeOptimizer", "0", ConstPass)
RuntimeOptimizer() = default;
RuntimeOptimizer(const RuntimeConfigurator* configurator) : m_configurator(configurator) {
OPENVINO_ASSERT(configurator, "RuntimeConfigurator musn't be nullptr");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace pass {
*/
class SerializeBase : public ConstPass {
public:
OPENVINO_RTTI("SerializeBase", "ConstPass")
OPENVINO_RTTI("SerializeBase", "0", ConstPass)
SerializeBase(const std::string& xml_path);

protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace pass {
*/
class SerializeControlFlow : public SerializeBase {
public:
OPENVINO_RTTI("SerializeControlFlow", "Pass", SerializeBase)
OPENVINO_RTTI("SerializeControlFlow", "0", SerializeBase)
SerializeControlFlow(const std::string& xml_path, bool update_dynamic_ops = false) :
SerializeBase(xml_path), m_update_dynamic_ops{update_dynamic_ops} {}
bool run(const LinearIR& linear_ir) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace pass {
*/
class SerializeDataFlow : public SerializeBase {
public:
OPENVINO_RTTI("SerializeDataFlow", "Pass", SerializeBase)
OPENVINO_RTTI("SerializeDataFlow", "0", SerializeBase)
SerializeDataFlow(const std::string& xml_path) : SerializeBase(xml_path) {}
bool run(const LinearIR& linear_ir) override;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace pass {
*/
class SetBufferRegGroup: public RangedPass {
public:
OPENVINO_RTTI("SetBufferRegGroup", "RangedPass")
OPENVINO_RTTI("SetBufferRegGroup", "0", RangedPass)
SetBufferRegGroup() = default;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace pass {
*/
class SetLoadStoreScalar : public RangedPass {
public:
OPENVINO_RTTI("SetLoadStoreScalar", "RangedPass")
OPENVINO_RTTI("SetLoadStoreScalar", "0", RangedPass)
SetLoadStoreScalar() = default;
bool run(LinearIR& linear_ir, lowered::LinearIR::constExprIt begin, lowered::LinearIR::constExprIt end) override;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace pass {
*/
class SolveBufferMemory : public Pass {
public:
OPENVINO_RTTI("SolveBufferMemory", "Pass")
OPENVINO_RTTI("SolveBufferMemory", "0", Pass)

SolveBufferMemory(size_t& static_buffer_scratchpad_size) : m_static_buffer_scratchpad_size(static_buffer_scratchpad_size) {}
/**
Expand Down
Loading

0 comments on commit 0b7ac60

Please sign in to comment.