Skip to content
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

[TIR][Analysis] Add SuggestIndexMap for layout rewriting #10732

Merged
merged 4 commits into from
Mar 25, 2022

Conversation

vinx13
Copy link
Member

@vinx13 vinx13 commented Mar 23, 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 [email protected]
Co-authored-by: Bohan Hou [email protected]
Co-authored-by: Hongyi Jin [email protected]
Co-authored-by: Ruihang Lai [email protected]
Co-authored-by: Junru Shao [email protected]
Co-authored-by: Xiyou Zhou [email protected]

cc @junrushao1994 @jinhongyii @masahi

Co-authored-by: Siyuan Feng <[email protected]>
Co-authored-by: Bohan Hou <[email protected]>
Co-authored-by: Hongyi Jin <[email protected]>
Co-authored-by: Ruihang Lai <[email protected]>
Co-authored-by: Junru Shao <[email protected]>
Co-authored-by: Xiyou Zhou <[email protected]>
@github-actions github-actions bot requested review from junrushao and masahi March 23, 2022 17:53
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);
Copy link
Member

Choose a reason for hiding this comment

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

I found it less convincing to couple frontend features (DiagnosticContext) with purely arithmetic analysis. we ideally should remove this argument in DetectIterMap @wrongtest

Copy link
Contributor

Choose a reason for hiding this comment

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

@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.

Copy link
Member

Choose a reason for hiding this comment

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

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

@github-actions github-actions bot requested a review from junrushao March 23, 2022 17:59
@junrushao junrushao merged commit 937a14f into apache:main 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 <[email protected]>
Co-authored-by: Bohan Hou <[email protected]>
Co-authored-by: Hongyi Jin <[email protected]>
Co-authored-by: Ruihang Lai <[email protected]>
Co-authored-by: Junru Shao <[email protected]>
Co-authored-by: Xiyou Zhou <[email protected]>
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.

3 participants