Merged
Conversation
* [Arith] Inverse affine map * Update iter_affine_map.h * Update iter_affine_map.h * Update iter_affine_map.py * Topology order visit * doc * fix * address comments
0e9cdb4 to
8002518
Compare
tqchen
approved these changes
Jul 1, 2021
| iter_map = tvm.arith.detect_iter_map([l0_1_l1_1_fused[0], l0_0[0], l1_0[0]], var_dom([l0, l1])) | ||
| outputs = [tvm.tir.Var("output_{}".format(i), "int32") for i in range(len(iter_map))] | ||
| res = tvm.arith.inverse_affine_iter_map(iter_map, outputs) | ||
| print(res) |
Contributor
There was a problem hiding this comment.
this line can be removed
| ICHECK(base_scale.defined()); | ||
| std::vector<IterSplitExpr> iters; | ||
| std::vector<bool> visited(sum_expr->args.size(), false); | ||
| PrimExpr expected_scale = base_scale; |
Contributor
There was a problem hiding this comment.
I think we can expect the sum expression has its children in descending order, so to search for base scale is not necessary
Member
Author
There was a problem hiding this comment.
if the sum expression is produced by DetectIterMap this is true, can we can simply this whole function, I can add some assertions to check this assumption @tqchen
spectrometerHBH
approved these changes
Jul 3, 2021
Member
|
@vinx13 let us followup with another PR to address the last comment @spectrometerHBH bought up |
ylc
pushed a commit
to ylc/tvm
that referenced
this pull request
Sep 29, 2021
* [Arith] Inverse affine map * [Arith] Inverse affine map * Update iter_affine_map.h * Update iter_affine_map.h * Update iter_affine_map.py * Topology order visit * doc * fix * address comments * lint * remove print
zxy844288792
pushed a commit
to zxy844288792/tvm
that referenced
this pull request
Mar 4, 2022
* [Arith] Inverse affine map * [Arith] Inverse affine map * Update iter_affine_map.h * Update iter_affine_map.h * Update iter_affine_map.py * Topology order visit * doc * fix * address comments * lint * remove print
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 a utility function to perform inverse transformation for the bijective affine map. This will be helpful for tensorization in the future.
@tqchen