-
Notifications
You must be signed in to change notification settings - Fork 137
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
QNN toolkit #874
QNN toolkit #874
Conversation
not checkin the binray files such .raw |
output_model_path: str, | ||
) -> QNNModelHandler: | ||
main_cmd = "qnn-context-binary-generator" | ||
runner = QNNSDKRunner(dev=True) |
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.
what's meaning dev=True for all cases?
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.
dev=True
means run the cmd locally. Run QNN optimization has following steps:
- convert and build model in x64 windows/linux (dev = True
- send the model to target devices(arm-windows or android) (dev=False
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.
If it is used for run locally or remotely, suggest to change the name to local_run or something else.
In my mind, dev=True means run the optimization using the local branch Olive bits.
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.
Updated with optional_local_run
where the True value is used to tell current runner can run cmd locally.
The value is set to False only if the cmd
have to be run remotely but cannot in local env.
olive/model/handler/qnn.py
Outdated
if not model_paths: | ||
raise FileNotFoundError(f"No model file found in {model_folder}") | ||
elif len(model_paths) > 1: | ||
raise RuntimeError(f"Multiple model files found in {model_folder}: {model_paths}") |
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.
should the optimization pass since the RuntimeError will be ignored? or need we raise assertionerror so the optimization will fail?
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.
Describe your changes
QNN toolkit
CI e2e test for qnn mobile net: https://github.com/microsoft/Olive/pull/874/checks?check_run_id=20488489220
Checklist before requesting a review
lintrunner -a
(Optional) Issue link