-
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
[RELAY] Pass infra cleanup #3336
Conversation
cc @zhiics |
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
def __init__(self, name, opt_level, required=None): | ||
self.__init_handle_by_constructor__(_transform.PassInfo, name, opt_level, | ||
required) | ||
def __init__(self, opt_level, name, required=None): |
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.
Why should we put opt_level first? I don't even think most passes should be on a standard opt-level, we end up in the current system we have where people arbitrarily assign pass numbers to passes and when passes are non-robust we just bump them to a higher pass number.
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.
We should focus on names and enabling passes by name in most cases imo.
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.
I made the change just to be consistent with the rest of the positional argument, we can debate whether it is a good idea to put name or opt_level first. I am fine either way
Followup of #3319