-
Notifications
You must be signed in to change notification settings - Fork 731
Support optrace #6535
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
Support optrace #6535
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -770,6 +770,7 @@ def generate_qnn_executorch_compiler_spec( | |
| online_prepare: bool = False, | ||
| dump_intermediate_outputs: bool = False, | ||
| profile: bool = False, | ||
| optrace: bool = False, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. However, before this change kProfileDetailed is the only supported profile level. It might be better to make this change in a separate diff. |
||
| shared_buffer: bool = False, | ||
| is_from_context_binary: bool = False, | ||
| ) -> List[CompileSpec]: | ||
|
|
@@ -831,7 +832,11 @@ def generate_qnn_executorch_compiler_spec( | |
| if saver: | ||
| qnn_executorch_options.library_path = "libQnnSaver.so" | ||
|
|
||
| if profile: | ||
| if optrace: | ||
| qnn_executorch_options.profile_level = ( | ||
| QnnExecuTorchProfileLevel.kProfileOptrace | ||
| ) | ||
| elif profile: | ||
| qnn_executorch_options.profile_level = ( | ||
| QnnExecuTorchProfileLevel.kProfileDetailed | ||
| ) | ||
|
|
||
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.
Do you want to fixed profile_level?
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.
maybe we should add the level to
QnnExecuTorchProfileLevel. Maybe typo? I sawkProfileOptrace = 3there.@shewu-quic , how about the linting profile level? Should we reserve a number for that?
Uh oh!
There was an error while loading. Please reload this page.
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.
Not typo. Optrace requires profiling level to be QNN_PROFILE_LEVEL_DETAILED (2), same as kProfileDetailed. I considered adding an additional config for optrace, but it requires signature change of many functions, so I chose to add a new profiling level kProfileOptrace in the schema, but the profiling level passed to QNN compiler for which is the same as kProfileDetailed.
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 to remove the hardcoded value of QNN profile level.