Skip to content

[MetaSchedule] AutoBind rule and MutateThreadBinding#11177

Merged
junrushao merged 1 commit intoapache:mainfrom
Hzfengsy:meta-schedule-thread-bind
May 21, 2022
Merged

[MetaSchedule] AutoBind rule and MutateThreadBinding#11177
junrushao merged 1 commit intoapache:mainfrom
Hzfengsy:meta-schedule-thread-bind

Conversation

@Hzfengsy
Copy link
Copy Markdown
Member

The current meta-schedule uses a PostProc RewriteUnboundBlock to auto-bind blocks to threads. However, it's a post proc, which means there are no search opportunities, and always splits with factor=1024.

This PR adds a new search rule called AutoBind to 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

@github-actions github-actions Bot requested review from comaniac and junrushao April 29, 2022 02:25
Comment thread src/meta_schedule/utils.cc Outdated
Comment thread src/meta_schedule/utils.h Outdated
Comment thread src/meta_schedule/utils.cc Outdated
@github-actions github-actions Bot requested a review from zxybazh April 29, 2022 06:16
@Hzfengsy Hzfengsy force-pushed the meta-schedule-thread-bind branch from b46fceb to 44029b3 Compare April 29, 2022 06:17
Comment thread src/meta_schedule/postproc/rewrite_unbound_block.cc Outdated
@junrushao junrushao force-pushed the meta-schedule-thread-bind branch 6 times, most recently from 121c17e to 9b26709 Compare May 20, 2022 23:06
@junrushao junrushao force-pushed the meta-schedule-thread-bind branch from 9b26709 to 9c65b9a Compare May 20, 2022 23:29
@junrushao junrushao merged commit bbc6ba3 into apache:main May 21, 2022
@Hzfengsy Hzfengsy deleted the meta-schedule-thread-bind branch June 17, 2025 13:16
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