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] Developer Ergonomics Enhancement #11622

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

junrushao
Copy link
Member

@junrushao junrushao commented Jun 8, 2022

Per discussion with @Kathryn-cat:

  • Encourage using TuneContext.initialize, and moving initialize_with_tune_context as private
    API _initialize_with_tune_context;
  • Encourage using ms.xxx as the prefix (e.g. ms.database.MemoryDatabase) to organize code
    better, instead of using multiple import statements;
  • Encourage using ms.default_config.xxx (e.g. schedule_rule);
  • Move tvm.meta_schedule.testing.DummyDatabase to tvm.meta_schedule.database.MemoryDatabase
    given it's actually functioning;
  • Delegate class members' methods in TuneContext, for example, having
    TuneContext.generste_design_space from TuneContext.space_generator.generste_design_space

Next PR:

  • Allow using a string "default" in TuneContext as well as tune_relay/tir/te to quickly
    specify a set of target-specific rules
  • Add TuneContext.tune to allow directly tuning without task scheduler.
  • Enhance detection of ScheduleFn in TuneContext to make it easier for users to quickly try out
    template-driven scheduling on TIR.

@junrushao junrushao force-pushed the feature/2022-06-07/ms-ux branch from 1cc1563 to 6c2470d Compare June 9, 2022 07:08
@junrushao junrushao marked this pull request as ready for review June 9, 2022 07:08
@junrushao
Copy link
Member Author

To avoid the PR being overly huge, we decided to upstream the rest of the enhancement as a separate PR.

Copy link
Member

@zxybazh zxybazh left a comment

Choose a reason for hiding this comment

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

The changes makes a lot of sense to me and generally making it easier to access each function in the task. Generally looks good to me. A couple nits as mentioned in Kathryn's comments could further simplify the functions. It looks to me that SendtoBuilder and SendtoRunner could be further put into TuneContext level but let's leave that to the next PR. Thanks for the changes!

@junrushao junrushao force-pushed the feature/2022-06-07/ms-ux branch 2 times, most recently from 56a186d to a3feda7 Compare June 10, 2022 00:46
Per discussion with @Kathryn-cat

- [x] Move `initialize_with_tune_context` as private API `_initialize_with_tune_context`, and
encourage using `TuneContext.initialize`
- [x] Instead of using bunch of import statements, encourage using `ms.xxx` as the prefix
(e.g. `ms.database.MemoryDatabase`) to organize things better
- [x] Move `DefaultLLVM`, `DefaultCUDA` to a separate file and make them more discoverable
- [x] Move `DummyDatabase` to `tvm.meta_schedule.database.MemoryDatabase` given it's actually useful
- [x] Delegate class members' methods in `TuneContext`, for example, having
`TuneContext.generste_design_space` from `TuneContext.space_generator.generste_design_space`

Next PR:
- Allow using a string `"default"` in `TuneContext` as well as `tune_relay/tir/te` to quickly
specify a set of target-specific rules
- Add `TuneContext.tune` to allow directly tuning without task scheduler.
- Enhance detection of `ScheduleFn` in `TuneContext` to make it easier for users to quickly try out
template-driven scheduling on TIR.

Co-Authored-By: Kathryn (Jinqi) Chen <65606304+Kathryn-cat@users.noreply.github.com>
@junrushao junrushao force-pushed the feature/2022-06-07/ms-ux branch from a3feda7 to e65f18e Compare June 10, 2022 01:49
@junrushao junrushao merged commit 6fca5c6 into apache:main Jun 10, 2022
Kathryn-cat added a commit to Kathryn-cat/tvm that referenced this pull request Jun 10, 2022
Per discussion with @Kathryn-cat

- [x] Move `initialize_with_tune_context` as private API `_initialize_with_tune_context`, and
encourage using `TuneContext.initialize`
- [x] Instead of using bunch of import statements, encourage using `ms.xxx` as the prefix
(e.g. `ms.database.MemoryDatabase`) to organize things better
- [x] Move `DefaultLLVM`, `DefaultCUDA` to a separate file and make them more discoverable
- [x] Move `DummyDatabase` to `tvm.meta_schedule.database.MemoryDatabase` given it's actually useful
- [x] Delegate class members' methods in `TuneContext`, for example, having
`TuneContext.generste_design_space` from `TuneContext.space_generator.generste_design_space`

Next PR:
- Allow using a string `"default"` in `TuneContext` as well as `tune_relay/tir/te` to quickly
specify a set of target-specific rules
- Add `TuneContext.tune` to allow directly tuning without task scheduler.
- Enhance detection of `ScheduleFn` in `TuneContext` to make it easier for users to quickly try out
template-driven scheduling on TIR.

Co-Authored-By: Kathryn (Jinqi) Chen <65606304+Kathryn-cat@users.noreply.github.com>
junrushao added a commit to junrushao/tvm that referenced this pull request Jun 15, 2022
Follow-up of apache#11622, per discussion with @Kathryn-cat

- [x] Allow using a string `"default"` in `TuneContext` to quickly specify a set of target-specific
rules
- [x] Enhance detection of `ScheduleFn` in `TuneContext` to make it easier for users to quickly try
out template-driven scheduling on TIR.

Next PR:
- Add `TuneContext.tune` to allow directly tuning without task scheduler.

Co-Authored-By: Kathryn (Jinqi) Chen <65606304+Kathryn-cat@users.noreply.github.com>
junrushao added a commit to junrushao/tvm that referenced this pull request Jun 15, 2022
Follow-up of apache#11622, per discussion with @Kathryn-cat

- [x] Allow using a string `"default"` in `TuneContext` to quickly specify a set of target-specific
rules
- [x] Enhance detection of `ScheduleFn` in `TuneContext` to make it easier for users to quickly try
out template-driven scheduling on TIR.

Next PR:
- Add `TuneContext.tune` to allow directly tuning without task scheduler.

Co-Authored-By: Kathryn (Jinqi) Chen <65606304+Kathryn-cat@users.noreply.github.com>
junrushao added a commit to junrushao/tvm that referenced this pull request Jun 15, 2022
Follow-up of apache#11622, per discussion with @Kathryn-cat

- [x] Allow using a string `"default"` in `TuneContext` to quickly specify a set of target-specific
rules
- [x] Enhance detection of `ScheduleFn` in `TuneContext` to make it easier for users to quickly try
out template-driven scheduling on TIR.

Next PR:
- Add `TuneContext.tune` to allow directly tuning without task scheduler.

Co-Authored-By: Kathryn (Jinqi) Chen <65606304+Kathryn-cat@users.noreply.github.com>
junrushao added a commit to junrushao/tvm that referenced this pull request Jun 15, 2022
Follow-up of apache#11622, per discussion with @Kathryn-cat

- [x] Allow using a string `"default"` in `TuneContext` to quickly specify a set of target-specific
rules
- [x] Enhance detection of `ScheduleFn` in `TuneContext` to make it easier for users to quickly try
out template-driven scheduling on TIR.

Next PR:
- Add `TuneContext.tune` to allow directly tuning without task scheduler.

Co-Authored-By: Kathryn (Jinqi) Chen <65606304+Kathryn-cat@users.noreply.github.com>
junrushao added a commit that referenced this pull request Jun 15, 2022
Follow-up of #11622, per discussion with @Kathryn-cat

- [x] Allow using a string `"default"` in `TuneContext` to quickly specify a set of target-specific
rules
- [x] Enhance detection of `ScheduleFn` in `TuneContext` to make it easier for users to quickly try
out template-driven scheduling on TIR.

Next PR:
- Add `TuneContext.tune` to allow directly tuning without task scheduler.

Co-Authored-By: Kathryn (Jinqi) Chen <65606304+Kathryn-cat@users.noreply.github.com>
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.

3 participants