-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Snippets] Brgemm blocking by KN dims at the LIR level #19335
[Snippets] Brgemm blocking by KN dims at the LIR level #19335
Conversation
3ac018c
to
20b2a91
Compare
73ae818
to
ef6b38b
Compare
ef6b38b
to
11a2a01
Compare
cf8a1de
to
9defd95
Compare
9defd95
to
3f554be
Compare
3e052a2
to
d027a05
Compare
51a567a
to
85c7b3c
Compare
d7199f7
to
6b0346a
Compare
src/plugins/intel_cpu/src/transformations/snippets/x64/pass/lowered/brgemm_blocking.cpp
Show resolved
Hide resolved
2c7622b
to
0fda262
Compare
@IvanNovoselov @a-sidorova as we agreed offline, I also separated snippets operation |
It was decided to merge the PR after #19644 |
7fcdce2
to
aedbdf3
Compare
@dmitry-gorokhov could you please take a look? |
f731831
to
8dfb8e8
Compare
8dfb8e8
to
68b48a0
Compare
68b48a0
to
2699590
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No major concerns
@v-Golubev Please answer remaining questions
* @param ptr_increments specifies i/o pointer increment performed on every iteration. This is an alternative to | ||
* apply_increments, which enables more flexibility. | ||
* @param is_incremented describes which data pointers attributed to the loop should be incremented on every iteration. | ||
* @param ptr_increments specifies i/o pointer increment performed on every iteration if the following is_incremented[i] is true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering why is_incremented[i]
cannot be expressed with ptr_increments[i] == 0
;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it can be expressed. Need to revert this change - I will do that in follow up PRs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it might be useful for dynamic loops (for dynamic loop end emitter) when you need this port as LoopPort
but it shouldn't be incremented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it might be useful for dynamic loops (for dynamic loop end emitter) when you need this port as
LoopPort
but it shouldn't be incremented.
Lets refactor in bounds of DynamicLoop enablement then.
@@ -32,19 +32,19 @@ class BrgemmCPU : public snippets::op::Brgemm { | |||
BrgemmCPU(const Output<Node>& A, const Output<Node>& B, const Type type, | |||
const size_t offset_a = 0, const size_t offset_b = 0, const size_t offset_c = 0, | |||
std::vector<size_t> layout_a = {}, std::vector<size_t> layout_b = {}, std::vector<size_t> layout_c = {}, | |||
const size_t blk_size_m = 0, const size_t blk_size_k = 0, const size_t blk_size_n = 0); | |||
const size_t blk_size_m = 0, const size_t blk_size_k = 0, const size_t blk_size_n = 0, const float beta = 0.f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't analyzed the code in details, but was is the purpose of having blk size as part of Brgemm semantics?
It sounds like everything should be done with transformations now. As far as I remember blocking heuristics are also expressed with separate transformation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blk size parameters are used to propagate information about preferred block sizes between ov::Model transformation (which applies blocking heuristics) and LIR blocking markup transformation.
We have already discussed this topic with @IvanNovoselov: we came to the conclusion that these 2 transformations can be easily combined into one: in this case, there will be no need to store block sizes as node fields.
### Details: - *Introduced loop handlers which define how to handle first/last loop iteration* - *Changed loop markup logic: loops with `increment > work_amount` are not created anymore: in this case `increment` is set equal to `work_amount`* ### Tickets: - *CVS-119851* ### Prerequisites: - #19335 - #21382
Details:
dim_idx
moved fromLoopInfo
toLoopPort
Tickets:
Prerequisites: