-
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] Enable Clone Function for Task-Level Classes #12796
[MetaSchedule] Enable Clone Function for Task-Level Classes #12796
Conversation
Could you please explain a bit about why we need Cloning a function or a module makes sense to me. But I'm not sure why we need to clone a rule or a mutator. Could you please also add more information to the PR description? Thanks |
This is used for enhancing UX of the tuning. Considering the current tvm/tests/python/integration/test_meta_schedule_auto_tensorize.py Lines 174 to 175 in 370abe6
where users have to provide a lambda function, has become a bit confusing and inconvenient, we want to make it possible for users to directly provide a single object, and our system takes care of cloning |
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.
Overall LGTM! BTW, please address my comments in a separate PR
…2796) This PR introduces a clone function for each of the task-level MetaSchedule classes for convenient class deep copying. - [x] ScheduleRule - [x] Postproc - [x] Mutator - [x] SpaceGenerator - [x] SearchStrategy - [x] TuneContext
This PR introduces a clone function for each of the task-level MetaSchedule classes for convenient class deep copying.
Th reason we want to introduce the clone function is for convenient generation of tasks, i.e., instead of creating a class generation lambda function in tuning api we can supply some example classes, i.e.,
ScheduleRule
and clone them. In most cases the tasks share the same type of the classes except IRModule, yet we allow customization of the classes.cc @Hzfengsy @junrushao1994