-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
1cc1563
to
6c2470d
Compare
To avoid the PR being overly huge, we decided to upstream the rest of the enhancement as a separate PR. |
There was a problem hiding this 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!
56a186d
to
a3feda7
Compare
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>
a3feda7
to
e65f18e
Compare
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>
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>
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>
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>
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>
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>
Per discussion with @Kathryn-cat:
TuneContext.initialize
, and movinginitialize_with_tune_context
as privateAPI
_initialize_with_tune_context
;ms.xxx
as the prefix (e.g.ms.database.MemoryDatabase
) to organize codebetter, instead of using multiple import statements;
ms.default_config.xxx
(e.g.schedule_rule
);tvm.meta_schedule.testing.DummyDatabase
totvm.meta_schedule.database.MemoryDatabase
given it's actually functioning;
TuneContext
, for example, havingTuneContext.generste_design_space
fromTuneContext.space_generator.generste_design_space
Next PR:
"default"
inTuneContext
as well astune_relay/tir/te
to quicklyspecify a set of target-specific rules
TuneContext.tune
to allow directly tuning without task scheduler.ScheduleFn
inTuneContext
to make it easier for users to quickly try outtemplate-driven scheduling on TIR.