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] Support affine expressions as indices in reverse compute inline #11317

Merged
merged 2 commits into from
May 16, 2022

Conversation

vinx13
Copy link
Member

@vinx13 vinx13 commented May 13, 2022

ReverseComputeInline requires the consumer body to be B[...] = g(i, j, k, A[f(i, j, k, ...)] ...), previously f can only be a permutation function over variable i, j, k, .... This PR allows f to be a bijective affine function.
After ReverseComputeInline, f^-1 will be applied the LHS buffer store indices in the producer site, to find the corresponding buffer store location in the consumer site.
This allows reshape operation to be inlined.

cc @junrushao1994 @spectrometerHBH @masahi @tqchen @tqchen

@vinx13 vinx13 force-pushed the feat/reverse-compute-inline-reshape branch 2 times, most recently from 5186f7c to 8fa122d Compare May 14, 2022 00:20
Copy link
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.

LGTM

@vinx13 vinx13 force-pushed the feat/reverse-compute-inline-reshape branch from 8fa122d to 7b5a2d6 Compare May 16, 2022 20:07
@vinx13 vinx13 merged commit 55b6be5 into apache:main May 16, 2022
shtinsa pushed a commit to Deelvin/tvm that referenced this pull request May 17, 2022
…apache#11317)

* [TIR] Support affine expressions as indices in reverse compute inline

* fix trivial iterators
shingjan pushed a commit to shingjan/tvm that referenced this pull request May 17, 2022
…apache#11317)

* [TIR] Support affine expressions as indices in reverse compute inline

* fix trivial iterators
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.

2 participants