-
Notifications
You must be signed in to change notification settings - Fork 724
Write QNN context binary to file when env variable ET_QNN_DEBUG_DIR is set #6745
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6745
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 655b391 with merge base c726a9b ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D65694854 |
…torch#6745) Summary: Pull Request resolved: pytorch#6745 Differential Revision: D65694854
b8dfa7d to
15cfbfc
Compare
|
This pull request was exported from Phabricator. Differential Revision: D65694854 |
15cfbfc to
71eecb5
Compare
…torch#6745) Summary: Pull Request resolved: pytorch#6745 Differential Revision: D65694854
|
This pull request was exported from Phabricator. Differential Revision: D65694854 |
71eecb5 to
63299b7
Compare
…torch#6745) Summary: Pull Request resolved: pytorch#6745 Reviewed By: billmguo Differential Revision: D65694854
|
This pull request was exported from Phabricator. Differential Revision: D65694854 |
|
@pytorchbot label "topic: not user facing" |
|
@chiwwang mind providing some suggestion on this PR? |
|
Hi @limintang ,
The |
We frequently use tools in QNN SDK for various debug and profiling tasks, and these tools consume QNN context binary. We are working with QC to support functionalities provided by these tools programmably so we don't have to rely on tool binaries in the future, but until then, saving the context binary in model export is more convenient. qnn_preprocess.py is another place where the context binary can be written out, actually I also use this path internally for context binary saving. However, the invocation to this module is from ExecuTorch tracing, I'm not sure whether introducing a platform specific config in the platform agnostic ET module is a good idea. |
chiwwang
left a comment
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.
Hi @limintang
Thanks for the response! It makes sense for me.
Just a further question -- do you think environment variable can be a better idea than coupling profiling_level with this need?
I though adding an option to QnnExecuTorchHtpBackendOptions but realized that it's not applicable.
Then I think it would be good if we have runtime option to control this functionality, so environment variable seems a choice.
How about defining an env variable like ET_QNN_BE_DUMP_CNTX_BIN_DIR, if it is not empty, then we dump the context-binaries to the directory it points to?
Is setting env variable possible in your use-case?
73acc22 to
f5c21ee
Compare
…torch#6745) Summary: Pull Request resolved: pytorch#6745 Reviewed By: billmguo Differential Revision: D65694854
|
This pull request was exported from Phabricator. Differential Revision: D65694854 |
…torch#6745) Summary: Pull Request resolved: pytorch#6745 Reviewed By: billmguo Differential Revision: D65694854
f5c21ee to
0849df3
Compare
|
This pull request was exported from Phabricator. Differential Revision: D65694854 |
…s set (pytorch#6745) Summary: Pull Request resolved: pytorch#6745 Reviewed By: billmguo Differential Revision: D65694854
0849df3 to
a65d435
Compare
|
This pull request was exported from Phabricator. Differential Revision: D65694854 |
chiwwang
left a comment
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.
Looks good for me!
…s set (pytorch#6745) Summary: Pull Request resolved: pytorch#6745 Reviewed By: billmguo Differential Revision: D65694854
a65d435 to
e10ebd1
Compare
|
This pull request was exported from Phabricator. Differential Revision: D65694854 |
…s set (pytorch#6745) Summary: Pull Request resolved: pytorch#6745 Reviewed By: billmguo Differential Revision: D65694854
e10ebd1 to
4bb5be4
Compare
|
This pull request was exported from Phabricator. Differential Revision: D65694854 |
…s set (pytorch#6745) Summary: Pull Request resolved: pytorch#6745 Reviewed By: billmguo Differential Revision: D65694854
4bb5be4 to
655b391
Compare
|
This pull request was exported from Phabricator. Differential Revision: D65694854 |
|
Sorry a bit late on actually reading this PR... From reading the conversation, looks like it's mainly to save the qnn_context_binary file, how about we provide a cli tool to unwrap the |
It would be great if you can provide such tool, then this diff won't be necessary. |
Differential Revision: D65694854