-
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
[AutoScheduler] Bug fix & Custom sketch support #7260
Conversation
|
||
CONDITION_NUM = {"pass": 0, "apply": 1, "apply_and_skip_rest": 2} | ||
|
||
def __init__(self, meet_condition_func, apply_func, rule_name="CustomSketchRule"): |
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.
From your test case I think we should not provide a default rule name. Otherwise it's easy to get the rule name conflict if users call PreloadCustomSketchRule
twice.
I'm still not clear about the registration mechanism with the decorator. I agree with you that using the preload callback should be sufficient for users to specify custom rules, and it seems just a fast path without any additional functions that the preload callback doesn't have. Accordingly, should we just remove the decorator and registry to make the design simple and easy to maintain? |
I agree, decorator has been removed. |
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.
LGTM. Thanks.
Thanks @jcf94 @merrymercy |
cc @comaniac @merrymercy