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][M4a] Add ScheduleRule class & PostOrderApply space generator #9761

Conversation

zxybazh
Copy link
Member

@zxybazh zxybazh commented Dec 16, 2021

This PR is part of the stage M3c of the meta schedule project (#8473).

The architecture is re-designed by Junru and Xiyou. Here we introduce the ScheduleRule class to process tir blocks while generating new design spaces via PostOrderApply space generator. The post-order-apply space generator collects all the blocks in IRModule and apply the rules in post order. Here we also allow custmization of schedule rules using a python side class PyScheduleRule. Note that we introduced method definition check check_override to make sure certain methods are overrided so that an error will be thown upon definition of an incomplete PyClass.

Unittests are also introduced in this PR. Thanks to all co-authors for contributing!

Co-authored-by: Junru Shao <junrushao1994@gmail.com>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>

@junrushao
Copy link
Member

CC @comaniac @jcf94 @merrymercy

@junrushao
Copy link
Member

@zxybazh Let's fix the CI

@junrushao
Copy link
Member

Ping @comaniac @jcf94 for a second look :-)

@junrushao junrushao force-pushed the meta-schedule/upstream/2021-12-16/space-generators branch from 4c65a67 to 6b8e621 Compare December 18, 2021 01:09
Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

zxybazh and others added 5 commits December 18, 2021 01:13
Co-authored-by: Junru Shao <junrushao1994@gmail.com>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
@junrushao junrushao force-pushed the meta-schedule/upstream/2021-12-16/space-generators branch from 6b8e621 to f5c4df8 Compare December 18, 2021 09:13
@Hzfengsy Hzfengsy merged commit 9ee0007 into apache:main Dec 19, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
…nerator. (apache#9761)

* Add ScheduleRule class & PostOrderApply space generator.

Co-authored-by: Junru Shao <junrushao1994@gmail.com>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>

* Fix comments & docs.

* Fix for mypy.

* Retrigger CI.

* remove get_hex_address

Co-authored-by: Junru Shao <junrushao1994@gmail.com>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
…nerator. (apache#9761)

* Add ScheduleRule class & PostOrderApply space generator.

Co-authored-by: Junru Shao <junrushao1994@gmail.com>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>

* Fix comments & docs.

* Fix for mypy.

* Retrigger CI.

* remove get_hex_address

Co-authored-by: Junru Shao <junrushao1994@gmail.com>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
@junrushao junrushao changed the title [M3c][MetaScheduler] Add ScheduleRule class & PostOrderApply space generator. [M4a][MetaScheduler] Add ScheduleRule class & PostOrderApply space generator. Jan 26, 2022
@junrushao junrushao changed the title [M4a][MetaScheduler] Add ScheduleRule class & PostOrderApply space generator. [MetaScheduler] Add ScheduleRule class & PostOrderApply space generator. Jan 26, 2022
@junrushao junrushao changed the title [MetaScheduler] Add ScheduleRule class & PostOrderApply space generator. [MetaSchedule] Add ScheduleRule class & PostOrderApply space generator. Jan 26, 2022
@junrushao junrushao changed the title [MetaSchedule] Add ScheduleRule class & PostOrderApply space generator. [MetaSchedule][M4a] Add ScheduleRule class & PostOrderApply space generator. Jan 26, 2022
@junrushao junrushao changed the title [MetaSchedule][M4a] Add ScheduleRule class & PostOrderApply space generator. [MetaSchedule][M4a] Add ScheduleRule class & PostOrderApply space generator Jan 26, 2022
qsqqsqqsq-intellif pushed a commit to qsqqsqqsq-intellif/tvm that referenced this pull request Apr 29, 2022
…nerator. (apache#9761)

* Add ScheduleRule class & PostOrderApply space generator.

Co-authored-by: Junru Shao <junrushao1994@gmail.com>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>

* Fix comments & docs.

* Fix for mypy.

* Retrigger CI.

* remove get_hex_address

Co-authored-by: Junru Shao <junrushao1994@gmail.com>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
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