[TIR][Analysis] Add SuggestIndexMap for layout rewriting#10732
Merged
junrushao merged 4 commits intoapache:mainfrom Mar 25, 2022
Merged
[TIR][Analysis] Add SuggestIndexMap for layout rewriting#10732junrushao merged 4 commits intoapache:mainfrom
junrushao merged 4 commits intoapache:mainfrom
Conversation
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn> Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com> Co-authored-by: Hongyi Jin <3231950289@qq.com> Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Xiyou Zhou <xiyou@octoml.ai>
junrushao
reviewed
Mar 23, 2022
Co-authored-by: Junru Shao <junrushao1994@gmail.com>
junrushao
reviewed
Mar 23, 2022
Comment on lines
+81
to
+82
| Array<arith::IterSumExpr> iter_sum_exprs = arith::DetectIterMap( | ||
| {analyzer->Simplify(index)}, input_iters, predicate, require_bijective, analyzer, diag_ctx); |
Member
There was a problem hiding this comment.
I found it less convincing to couple frontend features (DiagnosticContext) with purely arithmetic analysis. we ideally should remove this argument in DetectIterMap @wrongtest
Contributor
There was a problem hiding this comment.
@junrushao1994 Hi, any suggestion for the dbg info in DetectIterMap? We may remove them or change to logging if the diag ctx is not preferred.
Member
There was a problem hiding this comment.
Generally speaking, DiagnosticContext is a frontend feature, while arithmetic analysis is considered as a backend utility, which could be used with or without a particular frontend. Therefore, I would prefer moving error reporting to more frontend places instead of mixing them together in the backend
junrushao
approved these changes
Mar 25, 2022
pfk-beta
pushed a commit
to pfk-beta/tvm
that referenced
this pull request
Apr 11, 2022
This PR added an analysis function `SuggestIndexMap` to analyze buffer access pattern and suggest index map for layout transformations. Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn> Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com> Co-authored-by: Hongyi Jin <3231950289@qq.com> Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Xiyou Zhou <xiyou@octoml.ai>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR added an analysis function
SuggestIndexMapto analyze buffer access pattern and suggest index map for layout transformations.Co-authored-by: Siyuan Feng Hzfengsy@sjtu.edu.cn
Co-authored-by: Bohan Hou 32121147+spectrometerHBH@users.noreply.github.com
Co-authored-by: Hongyi Jin 3231950289@qq.com
Co-authored-by: Ruihang Lai lairuihangdongdong@qq.com
Co-authored-by: Junru Shao junrushao1994@gmail.com
Co-authored-by: Xiyou Zhou xiyou@octoml.ai
cc @junrushao1994 @jinhongyii @masahi