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

[MetaSchedule] Fix for RewriteLayout + AllocateConst when the rank of the rewritten weight doesn't change #13851

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

masahi
Copy link
Member

@masahi masahi commented Jan 27, 2023

Previously, the condition constant.Shape().size() == index_map->initial_indices.size() was used to decide if the constant that TECompiler finds has its layout write already applied or not. But for 1x1 conv2d case, there seems to be a case where the rank of the weight doesn't change after layout rewriting. For example, (1, 1, 32, 16) -> (16, 4, 2, 4).

This bug led to the same index map being applied twice on a constant during MS tuning and the final compilation.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Jan 27, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

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!

@Hzfengsy Hzfengsy merged commit 18b7dc1 into apache:main Jan 27, 2023
csullivan pushed a commit to csullivan/tvm that referenced this pull request Feb 7, 2023
… the rewritten weight doesn't change (apache#13851)

[MetaSchedule] Fix for RewriteLayout + AllocateConst when the rank of
the rewritten weight doesn't change
fzi-peccia pushed a commit to fzi-peccia/tvm that referenced this pull request Mar 27, 2023
… the rewritten weight doesn't change (apache#13851)

[MetaSchedule] Fix for RewriteLayout + AllocateConst when the rank of
the rewritten weight doesn't change
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.

4 participants