Skip to content

[TensorIR][M2a] Decompose-Reduction#9041

Merged
junrushao merged 16 commits intoapache:mainfrom
spectrometerHBH:decompose
Oct 2, 2021
Merged

[TensorIR][M2a] Decompose-Reduction#9041
junrushao merged 16 commits intoapache:mainfrom
spectrometerHBH:decompose

Conversation

@spectrometerHBH
Copy link
Copy Markdown
Contributor

This PR is part of the TensorIR upstreaming effort (#7527), which adds the following schedule primitives:

decompose_reduction
Co-authored-by: Junru Shao junrushao1994@gmail.com
Co-authored-by: Ruihang Lai lairuihangdongdong@qq.com
Co-authored-by: Hongyi Jin 3231950289@qq.com
Co-authored-by: Wuwei Lin wuwei@apache.org
Co-authored-by: Siyuan Feng Hzfengsy@sjtu.edu.cn

@spectrometerHBH
Copy link
Copy Markdown
Contributor Author

@junrushao junrushao self-assigned this Sep 19, 2021
@junrushao
Copy link
Copy Markdown
Member

Sorry I have a deadline on Monday...Will review do after that

Comment thread src/tir/schedule/primitive/reduction.cc Outdated
Comment thread src/tir/schedule/primitive/reduction.cc
Comment thread include/tvm/tir/schedule/schedule.h Outdated
Comment thread include/tvm/tir/schedule/schedule.h Outdated
Comment thread src/tir/schedule/primitive/reduction.cc Outdated
Comment thread src/tir/schedule/primitive/reduction.cc Outdated
Comment thread src/tir/schedule/primitive/reduction.cc Outdated
Comment thread src/tir/schedule/primitive/reduction.cc Outdated
Comment thread src/tir/schedule/primitive/loop_transformation.cc Outdated
Comment thread src/tir/schedule/primitive/reduction.cc Outdated
Comment thread src/tir/schedule/primitive/reduction.cc Outdated
Comment thread src/tir/schedule/primitive/reduction.cc
Comment thread include/tvm/tir/schedule/schedule.h
Comment thread include/tvm/tir/schedule/schedule.h Outdated
Comment thread python/tvm/tir/schedule/schedule.py Outdated
Comment thread src/tir/schedule/state.cc
Comment thread include/tvm/tir/schedule/state.h Outdated
Comment thread src/tir/schedule/primitive/reduction.cc
Comment thread src/tir/schedule/primitive/reduction.cc Outdated
Comment thread src/tir/schedule/primitive/reduction.cc Outdated
Comment thread src/tir/schedule/primitive/reduction.cc Outdated
Comment thread src/tir/schedule/primitive/reduction.cc
Comment on lines +74 to +81
Stmt VisitStmt_(const SeqStmtNode* seq) final {
Array<Stmt> new_stmts;
new_stmts.reserve(seq->seq.size());
for (const Stmt& old_stmt : seq->seq) {
new_stmts.push_back(VisitStmt(old_stmt));
}
return SeqStmt::Flatten(new_stmts);
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need special handling of SeqStmt btw?

@junrushao
Copy link
Copy Markdown
Member

@spectrometerHBH Sorry for the delay! I think I finally did a complete with the code review. Let me know if it makes sense to you

@spectrometerHBH
Copy link
Copy Markdown
Contributor Author

spectrometerHBH commented Sep 28, 2021

@spectrometerHBH Sorry for the delay! I think I finally did a complete with the code review. Let me know if it makes sense to you

@junrushao1994 Thanks!I might be slow to response in the next 2 days

@junrushao
Copy link
Copy Markdown
Member

Would be nice if we could get this merged this week or weekend :-)

Copy link
Copy Markdown
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spectrometerHBH and I discussed for quite a few days and finally addressed all my concerns. Thanks for the great effort!

@junrushao junrushao merged commit 6b3fe95 into apache:main Oct 2, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
This PR is part of the TensorIR upstreaming effort (apache#7527),
which adds the `decompose-reduction` scheduling primitive.

Co-authored-by: Junru Shao <junrushao1994@gmail.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
This PR is part of the TensorIR upstreaming effort (apache#7527),
which adds the `decompose-reduction` scheduling primitive.

Co-authored-by: Junru Shao <junrushao1994@gmail.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants