[QNN EP] Enable QNN Saver for debugging issues#17747
Merged
adrianlizarraga merged 15 commits intomainfrom Oct 3, 2023
Merged
Conversation
adrianlizarraga
commented
Sep 30, 2023
HectorSVC
reviewed
Oct 2, 2023
HectorSVC
reviewed
Oct 2, 2023
adrianlizarraga
commented
Oct 2, 2023
jywu-msft
previously approved these changes
Oct 3, 2023
HectorSVC
reviewed
Oct 3, 2023
HectorSVC
reviewed
Oct 3, 2023
HectorSVC
reviewed
Oct 3, 2023
kleiti
pushed a commit
to kleiti/onnxruntime
that referenced
this pull request
Mar 22, 2024
### Description - Enables option to use the QNN Saver backend for dumping QNN API calls to file. - Adds logic to read environment variable `ORT_UNIT_TEST_ENABLE_QNN_SAVER` from QNN EP unit tests. If enabled, unit tests will use the QNN Saver backend and dump files to `./saver_output/`. ### Motivation and Context QNN Saver makes it easier to debug issues when unit tests fail. The output files generated by QNN Saver can be used to replay the exact QNN API calls that lead to a specific error condition. QNN Saver dumps QNN API calls (and weights) to disk. - saver_output/saver_output.c: C file containing all QNN API calls. - saver_output/params.bin: binary file containing all input/output/parameter tensor data provided during tensor creation, op config validation, and graph execution. Enabling the QNN Saver backend has 2 note-worthy effects: 1. All QNN API calls will succeed. 2. Inference output returns dummy data. Because the output files from QNN Saver are always overwritten, it is recommended to run individual unit tests via the `--gtest_filter` command-line option. Example (linux): ```shell $ ORT_UNIT_TEST_ENABLE_QNN_SAVER=1 ./onnxruntime_test_all --gtest_filter=QnnHTPBackendTests.Resize_DownSample_Linear_AlignCorners ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ORT_UNIT_TEST_ENABLE_QNN_SAVERfrom QNN EP unit tests. If enabled, unit tests will use the QNN Saver backend and dump files to./saver_output/.Motivation and Context
QNN Saver makes it easier to debug issues when unit tests fail. The output files generated by QNN Saver can be used to replay the exact QNN API calls that lead to a specific error condition.
QNN Saver dumps QNN API calls (and weights) to disk.
Enabling the QNN Saver backend has 2 note-worthy effects:
Because the output files from QNN Saver are always overwritten, it is recommended to run individual unit tests via the
--gtest_filtercommand-line option.Example (linux):
Example (windows):
TODO