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] Add search rule "RuleAddRfactor" #306

Merged

Conversation

MasterJH5574
Copy link
Collaborator

WIP

@MasterJH5574
Copy link
Collaborator Author

Now I'm gonna take some time to fix bugs in tir::rfactor.

@MasterJH5574 MasterJH5574 force-pushed the feature/2021-02-20/search-rule-rfactor branch 4 times, most recently from 6d2f93b to 469ed10 Compare March 4, 2021 15:21
@MasterJH5574 MasterJH5574 force-pushed the feature/2021-02-20/search-rule-rfactor branch from 469ed10 to be060f3 Compare March 5, 2021 12:11
@MasterJH5574
Copy link
Collaborator Author

I just finished my self-review. It looks to me now. @junrushao1994 Would you like to review this PR?

@MasterJH5574 MasterJH5574 requested a review from junrushao March 6, 2021 03:38
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.

Thanks for the contribution! Could notice your coding style getting much better and please keep up with the awesome progress! I am going to get a second round of review tomorrow morning

src/meta_schedule/analysis.cc Outdated Show resolved Hide resolved
src/meta_schedule/analysis.cc Outdated Show resolved Hide resolved
src/meta_schedule/analysis.cc Outdated Show resolved Hide resolved
src/meta_schedule/analysis.h Outdated Show resolved Hide resolved
src/meta_schedule/analysis.h Outdated Show resolved Hide resolved
src/meta_schedule/space/search_rule.cc Outdated Show resolved Hide resolved
src/meta_schedule/space/search_rule.cc Outdated Show resolved Hide resolved
Comment on lines 867 to 869
Array<Optional<PrimExpr>> factors = AsOptArray<tir::Var, PrimExpr>(
sch->SamplePerfectTile(ax, tile_level, max_innermost_factor));
tiled_outer_iters.push_back(sch->Split(ax, factors));
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Array<Optional<PrimExpr>> factors = AsOptArray<tir::Var, PrimExpr>(
sch->SamplePerfectTile(ax, tile_level, max_innermost_factor));
tiled_outer_iters.push_back(sch->Split(ax, factors));
Array<tir::Var> factors = sch->SamplePerfectTile(ax, tile_level, max_innermost_factor));
tiled_outer_iters.push_back(sch->Split(ax, AsOptArray<tir::Var, PrimExpr>(factors)));

@MasterJH5574 MasterJH5574 force-pushed the feature/2021-02-20/search-rule-rfactor branch from b3384e9 to a6845b4 Compare March 8, 2021 06:00
@MasterJH5574 MasterJH5574 merged commit 08f2573 into tlc-pack:main Mar 8, 2021
@MasterJH5574
Copy link
Collaborator Author

Thanks @junrushao1994 for his excellent review!

Hzfengsy pushed a commit that referenced this pull request Mar 29, 2021
* [MetaSchedule] change after refactor

* [MetaSchedule] fix typo

* [MetaSchedule] add rule "AddRfactor"

* [MetaSchedule] Move "NeedsInline"

* [MetaSchedule] Update "NeedsRfactor"

* [MetaSchedule] add reorder

* [MetaSchedule] LoopNode -> ForNode after rebasing

* [MetaSchedule] simply fix some ce after rebasing

* [MetaSchedule] little refactor

* [MetaSchedule] use `Schedule::Copy` to make copy

* fix ce after rebasing

* [MetaSchedule] use SamplePerfectTile. Successfully align!

* [MetaSchedule] rename

* [MetaSchedule] add the original schedule

* [MetaSchedule] move helper functions

* sorry...

* [MetaSchedule] optimize imports

* [MetaSchedule] refactor & document & use TVM_SREF_TO_BLOCK/FOR

* [MetaSchedule] fix comments

* [MetaSchedule] fix comments

* [MetaSchedule] fix comments

* [MetaSchedule] rebase
Hzfengsy pushed a commit that referenced this pull request May 24, 2021
* [MetaSchedule] change after refactor

* [MetaSchedule] fix typo

* [MetaSchedule] add rule "AddRfactor"

* [MetaSchedule] Move "NeedsInline"

* [MetaSchedule] Update "NeedsRfactor"

* [MetaSchedule] add reorder

* [MetaSchedule] LoopNode -> ForNode after rebasing

* [MetaSchedule] simply fix some ce after rebasing

* [MetaSchedule] little refactor

* [MetaSchedule] use `Schedule::Copy` to make copy

* fix ce after rebasing

* [MetaSchedule] use SamplePerfectTile. Successfully align!

* [MetaSchedule] rename

* [MetaSchedule] add the original schedule

* [MetaSchedule] move helper functions

* sorry...

* [MetaSchedule] optimize imports

* [MetaSchedule] refactor & document & use TVM_SREF_TO_BLOCK/FOR

* [MetaSchedule] fix comments

* [MetaSchedule] fix comments

* [MetaSchedule] fix comments

* [MetaSchedule] rebase
Hzfengsy pushed a commit that referenced this pull request Jul 5, 2021
* [MetaSchedule] change after refactor

* [MetaSchedule] fix typo

* [MetaSchedule] add rule "AddRfactor"

* [MetaSchedule] Move "NeedsInline"

* [MetaSchedule] Update "NeedsRfactor"

* [MetaSchedule] add reorder

* [MetaSchedule] LoopNode -> ForNode after rebasing

* [MetaSchedule] simply fix some ce after rebasing

* [MetaSchedule] little refactor

* [MetaSchedule] use `Schedule::Copy` to make copy

* fix ce after rebasing

* [MetaSchedule] use SamplePerfectTile. Successfully align!

* [MetaSchedule] rename

* [MetaSchedule] add the original schedule

* [MetaSchedule] move helper functions

* sorry...

* [MetaSchedule] optimize imports

* [MetaSchedule] refactor & document & use TVM_SREF_TO_BLOCK/FOR

* [MetaSchedule] fix comments

* [MetaSchedule] fix comments

* [MetaSchedule] fix comments

* [MetaSchedule] rebase
jinhongyii pushed a commit that referenced this pull request Jul 29, 2021
* [MetaSchedule] change after refactor

* [MetaSchedule] fix typo

* [MetaSchedule] add rule "AddRfactor"

* [MetaSchedule] Move "NeedsInline"

* [MetaSchedule] Update "NeedsRfactor"

* [MetaSchedule] add reorder

* [MetaSchedule] LoopNode -> ForNode after rebasing

* [MetaSchedule] simply fix some ce after rebasing

* [MetaSchedule] little refactor

* [MetaSchedule] use `Schedule::Copy` to make copy

* fix ce after rebasing

* [MetaSchedule] use SamplePerfectTile. Successfully align!

* [MetaSchedule] rename

* [MetaSchedule] add the original schedule

* [MetaSchedule] move helper functions

* sorry...

* [MetaSchedule] optimize imports

* [MetaSchedule] refactor & document & use TVM_SREF_TO_BLOCK/FOR

* [MetaSchedule] fix comments

* [MetaSchedule] fix comments

* [MetaSchedule] fix comments

* [MetaSchedule] rebase
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