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][CPU] Added external repacking via BrgemmCopyB (openvinotoo…
…lkit#28179) ### Details: - *Added two separate implementation for external repacking: in parallel section with kernel and in the separate parallel section before kernel execution* ### Tickets: - *159886* ### TODO: - [x] *Adjust heuristic of the impl choosing* - [x] *Add layout support* - [x] *[Cherry-picked] Merge the a-sidorova#266 to this branch* - [x] *[Cherry-picked] Merge the a-sidorova#267 to this branch* --------- Co-authored-by: Vladislav Golubev <[email protected]>
- Loading branch information
1 parent
2151da8
commit c421a52
Showing
64 changed files
with
1,734 additions
and
880 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
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,43 @@ | ||
// Copyright (C) 2024 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#include "shape_infer_op.hpp" | ||
#include "snippets/shape_inference/shape_inference.hpp" | ||
|
||
namespace ov { | ||
namespace snippets { | ||
namespace op { | ||
/** | ||
* @interface Reorder | ||
* @brief Reorder reshapes input tensor shape by reqiured target order. | ||
* The tensor data is not updated. | ||
* Note: Order is stored in input PortDescriptor | ||
* @ingroup snippets | ||
*/ | ||
class Reorder : public ShapeInferOp { | ||
public: | ||
OPENVINO_OP("Reorder", "SnippetsOpset", ShapeInferOp); | ||
Reorder() = default; | ||
Reorder(const Output<Node>& x, std::vector<size_t> order); | ||
|
||
bool visit_attributes(AttributeVisitor& visitor) override; | ||
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override; | ||
void validate_and_infer_types() override; | ||
|
||
class ShapeInfer : public IShapeInferSnippets { | ||
std::vector<size_t> m_target_order {}; | ||
public: | ||
explicit ShapeInfer(const std::shared_ptr<Node>& n); | ||
Result infer(const std::vector<VectorDimsRef>& input_shapes) override; | ||
}; | ||
|
||
private: | ||
void custom_constructor_validate_and_infer_types(std::vector<size_t> order); | ||
}; | ||
|
||
} // namespace op | ||
} // 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
27 changes: 27 additions & 0 deletions
27
src/common/snippets/include/snippets/op/shape_infer_op.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,27 @@ | ||
// Copyright (C) 2024 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#include "openvino/op/op.hpp" | ||
|
||
namespace ov { | ||
namespace snippets { | ||
namespace op { | ||
|
||
/** | ||
* @interface ShapeInferOp | ||
* @brief Op which infers shape without actually moving data | ||
* @ingroup snippets | ||
*/ | ||
class ShapeInferOp : public ov::op::Op { | ||
public: | ||
OPENVINO_OP("ShapeInferOp", "SnippetsOpset"); | ||
ShapeInferOp() = default; | ||
ShapeInferOp(const OutputVector& args) : ov::op::Op(args) {} | ||
}; | ||
|
||
} // namespace op | ||
} // 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
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
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.