[MetaSchedule] AutoBind rule and MutateThreadBinding#11177
Merged
junrushao merged 1 commit intoapache:mainfrom May 21, 2022
Merged
[MetaSchedule] AutoBind rule and MutateThreadBinding#11177junrushao merged 1 commit intoapache:mainfrom
junrushao merged 1 commit intoapache:mainfrom
Conversation
junrushao
reviewed
Apr 29, 2022
junrushao
reviewed
Apr 29, 2022
junrushao
reviewed
Apr 29, 2022
b46fceb to
44029b3
Compare
junrushao
reviewed
Apr 29, 2022
121c17e to
9b26709
Compare
9b26709 to
9c65b9a
Compare
junrushao
approved these changes
May 21, 2022
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.
The current meta-schedule uses a PostProc
RewriteUnboundBlockto auto-bind blocks to threads. However, it's a post proc, which means there are no search opportunities, and always splits withfactor=1024.This PR adds a new search rule called
AutoBindto do a similar thing to bind threads with sampled factors. Also with a corresponding mutator.After applying this rule, we get some positive perf results (on RTX-3080):
Element-wise: from 2.76 us to 2.48 us
Conv2d Winograd: from 29.45 us to 18.96 us (ansor 22.00 us)
Resnet18: from 0.591 ms to 0.531 ms (ansor 0.565 ms)
cc @junrushao1994 @zxybazh @comaniac