-
Notifications
You must be signed in to change notification settings - Fork 216
Auto Optimizer #1801
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?
Auto Optimizer #1801
Conversation
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.
Let's quickly make these changes.
c280226
to
6dc0579
Compare
4b48cf0
to
a2ab5b8
Compare
7e093d2
to
393a904
Compare
"use_model_builder": true, | ||
"train_data_config": "wikitext2_train", | ||
"calibration_data_config": "transformer_token_dummy_data", | ||
"accelerator": { "accelerator_type": "cpu", "execution_provider": "CPUExecutionProvider" }, |
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.
Can we just use the accelerator
from the system
?
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.
Olive config can have multiple system defined especially for cases where passes can use a separate host. That would make choosing the accelerator ambiguous.
return False | ||
|
||
if accelerator_spec.execution_provider == "QNNExecutionProvider": | ||
logger.info("QNNExecutionProvider doesn't support optimized model.") |
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.
Since peephole optimizations are EP independent, why do we need this check?
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.
This is carry forward from current auto-opt cli implementation.
Lines 320 to 322 in 59bfe00
# qnn ep might not supported optimized model | |
# will re-enable it if needed in the future | |
passes_to_remove.update(["transformer_optimizer", "peephole_optimizer"]) |
0a7a890
to
3d7aaee
Compare
Redo auto-optimizer logic to simplify and use search engine.
Auto Optimizer
Redo auto-optimizer logic to simplify and use search engine.
Also, update the auto-opt CLI command to use AutoOptimizer.
Checklist before requesting a review
lintrunner -a
(Optional) Issue link