-
Notifications
You must be signed in to change notification settings - Fork 216
Delay pass creation until time to run #1621
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
base: main
Are you sure you want to change the base?
Conversation
50e7c70
to
8d49aed
Compare
Logic avoids instantiating a Pass unless it is to be run. To avoid instantiation, only FullPassConfig is passed around.
pass_cls: Type[Pass] = olive_config.import_pass_module(full_pass_config.type) | ||
|
||
config_dict = full_pass_config.to_json().get("config") or {} | ||
for param, param_config in pass_cls.default_config(full_pass_config.accelerator).items(): |
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.
Little bit confused here, can we use full_pass_config.config
to get pass config?
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.
But we need a dictionary here not an object of type BasePassConfig
.
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.
Delay pass creation until time to run
Logic avoids instantiating a Pass unless it is to be run. To avoid instantiation, only FullPassConfig is passed around.
Checklist before requesting a review
lintrunner -a
(Optional) Issue link