-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
457ce11
commit 3a97f39
Showing
9 changed files
with
83 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/common/snippets/include/snippets/lowered/pass/init_registers.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (C) 2025 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#include "pass.hpp" | ||
#include "snippets/generator.hpp" | ||
#include "snippets/lowered/reg_manager.hpp" | ||
|
||
namespace ov { | ||
namespace snippets { | ||
namespace lowered { | ||
namespace pass { | ||
|
||
/** | ||
* @interface InitRegisters | ||
* @brief This pass combines all register-related transformations that are needed to initialize register info. | ||
* @ingroup snippets | ||
*/ | ||
class InitRegisters : public Pass { | ||
public: | ||
OPENVINO_RTTI("InitRegisters", "0", Pass) | ||
InitRegisters(const std::shared_ptr<const Generator>& generator, | ||
const std::shared_ptr<PassConfig>& pass_config); | ||
bool run(LinearIR& linear_ir) override; | ||
|
||
private: | ||
lowered::RegManager m_reg_manager; | ||
const std::shared_ptr<PassConfig>& m_pass_config; | ||
}; | ||
|
||
} // namespace pass | ||
} // namespace lowered | ||
} // namespace snippets | ||
} // namespace ov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (C) 2024 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "snippets/lowered/pass/init_registers.hpp" | ||
#include "snippets/lowered/pass/init_live_ranges.hpp" | ||
#include "snippets/lowered/pass/assign_registers.hpp" | ||
#include "snippets/lowered/pass/insert_reg_spills.hpp" | ||
#include "snippets/itt.hpp" | ||
|
||
namespace ov { | ||
namespace snippets { | ||
namespace lowered { | ||
namespace pass { | ||
|
||
InitRegisters::InitRegisters(const std::shared_ptr<const Generator>& generator, | ||
const std::shared_ptr<PassConfig>& pass_config) : | ||
Pass(), m_reg_manager(generator), m_pass_config(pass_config) { | ||
} | ||
|
||
bool InitRegisters::run(LinearIR& linear_ir) { | ||
OV_ITT_SCOPED_TASK(ov::pass::itt::domains::SnippetsTransform, "Snippets::InitRegisters"); | ||
lowered::pass::PassPipeline reg_pipeline(m_pass_config); | ||
reg_pipeline.register_pass<lowered::pass::InitLiveRanges>(m_reg_manager); | ||
reg_pipeline.register_pass<lowered::pass::AssignRegisters>(m_reg_manager); | ||
reg_pipeline.register_pass<lowered::pass::InsertRegSpills>(m_reg_manager); | ||
reg_pipeline.run(linear_ir); | ||
return true; | ||
} | ||
|
||
} // namespace pass | ||
} // namespace lowered | ||
} // namespace snippets | ||
} // namespace ov | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters