forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Snippets] Specific loop iterations handler
- Loading branch information
Showing
27 changed files
with
908 additions
and
161 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
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
25 changes: 25 additions & 0 deletions
25
src/common/snippets/include/snippets/lowered/pass/insert_specific_iterations.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,25 @@ | ||
// Copyright (C) 2023 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#include "pass.hpp" | ||
|
||
namespace ov { | ||
namespace snippets { | ||
namespace lowered { | ||
namespace pass { | ||
|
||
class InsertSpecificIterations : public Pass { | ||
public: | ||
OPENVINO_RTTI("InsertSpecificIterations", "Pass") | ||
bool run(LinearIR& linear_ir) override; | ||
|
||
static LinearIR::container copy_loop(const LinearIR& linear_ir, const size_t loop_id); | ||
}; | ||
|
||
} // namespace pass | ||
} // namespace lowered | ||
} // namespace snippets | ||
} // namespace ov |
75 changes: 75 additions & 0 deletions
75
src/common/snippets/include/snippets/lowered/pass/iter_handler.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,75 @@ | ||
// Copyright (C) 2023 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#include "snippets/lowered/linear_ir.hpp" | ||
#include "snippets/lowered/pass/pass.hpp" | ||
#include "snippets/op/loop.hpp" | ||
|
||
namespace ov { | ||
namespace snippets { | ||
namespace lowered { | ||
namespace pass { | ||
|
||
class SetSingleIterationWithWorkAmount : public pass::SubgraphPass { | ||
public: | ||
SetSingleIterationWithWorkAmount(size_t work_amount); | ||
OPENVINO_RTTI("SetSingleIterationWithWorkAmount", "SubgraphPass") | ||
bool run(const LinearIR& linear_ir, LinearIR::constExprIt begin, LinearIR::constExprIt end) override; | ||
|
||
private: | ||
size_t m_work_amount; | ||
}; | ||
|
||
class UpdateMemoryAccessOps : public pass::SubgraphPass { | ||
public: | ||
UpdateMemoryAccessOps(size_t count); | ||
OPENVINO_RTTI("UpdateMemoryAccessOps", "SubgraphPass") | ||
bool run(const LinearIR& linear_ir, LinearIR::constExprIt begin, LinearIR::constExprIt end) override; | ||
|
||
private: | ||
size_t m_count; | ||
}; | ||
|
||
class ReduceWorkAmount : public pass::SubgraphPass { | ||
public: | ||
ReduceWorkAmount(size_t reduce_value); | ||
OPENVINO_RTTI("ReduceWorkAmount", "SubgraphPass") | ||
bool run(const LinearIR& linear_ir, LinearIR::constExprIt begin, LinearIR::constExprIt end) override; | ||
|
||
private: | ||
size_t m_reduce_value; | ||
}; | ||
|
||
class ZeroFinalizationOffsets : public pass::SubgraphPass { | ||
public: | ||
OPENVINO_RTTI("ZeroFinalizationOffsets", "SubgraphPass") | ||
bool run(const LinearIR& linear_ir, LinearIR::constExprIt begin, LinearIR::constExprIt end) override; | ||
}; | ||
|
||
class SetFillOffset : public pass::SubgraphPass { | ||
public: | ||
SetFillOffset(size_t offset); | ||
OPENVINO_RTTI("SetFillOffset", "SubgraphPass") | ||
bool run(const LinearIR& linear_ir, LinearIR::constExprIt begin, LinearIR::constExprIt end) override; | ||
|
||
private: | ||
size_t m_offset; | ||
}; | ||
|
||
class TransformInnerSplitLoop : public pass::SubgraphPass { | ||
public: | ||
TransformInnerSplitLoop(size_t tail_size); | ||
OPENVINO_RTTI("TransformInnerSplitLoop", "SubgraphPass") | ||
bool run(const LinearIR& linear_ir, LinearIR::constExprIt begin, LinearIR::constExprIt end) override; | ||
|
||
private: | ||
size_t m_tail_size; | ||
}; | ||
|
||
} // 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
28 changes: 28 additions & 0 deletions
28
src/common/snippets/include/snippets/lowered/pass/propagate_subtensors.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,28 @@ | ||
// Copyright (C) 2023 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#include "snippets/lowered/linear_ir.hpp" | ||
#include "snippets/lowered/pass/pass.hpp" | ||
|
||
namespace ov { | ||
namespace snippets { | ||
namespace lowered { | ||
namespace pass { | ||
|
||
class UpdateSubtensors : public pass::SubgraphPass { | ||
public: | ||
UpdateSubtensors(size_t tail_size); | ||
OPENVINO_RTTI("UpdateSubtensors", "Pass") | ||
bool run(const LinearIR& linear_ir, LinearIR::constExprIt begin, LinearIR::constExprIt end) override; | ||
|
||
private: | ||
size_t m_tail_size; | ||
}; | ||
|
||
} // 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
Oops, something went wrong.