You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -139,42 +135,23 @@ When executing the script, please add the flag `--dump_intermediate_outputs`. Th
139
135
Initialize a `QNNIntermediateDebugger`. Please pass initialized `QNNIntermediateDebugger` and the `args.dump_intermediate_outputs` to `build_executorch_binary` method as well.
140
136
#### Example:
141
137
```python
142
-
from executorch.examples.qualcomm.utilsimport build_executorch_binary
138
+
from executorch.backends.qualcomm.export_utilsimport build_executorch_binary
143
139
from executorch.backends.qualcomm.debugger.qnn_intermediate_debugger import QNNIntermediateDebugger
dump_intermediate_outputs=args.dump_intermediate_outputs, # Add this flag
153
-
qnn_intermediate_debugger=qnn_intermediate_debugger, # Add this flag
147
+
qnn_intermediate_debugger=qnn_intermediate_debugger, # Provide this param
154
148
)
155
149
```
156
150
157
151
### 4. Set data num to 1
158
152
It is perfectly fine for users to pass the desired amount of datasets to `build_executorch_binary`, which helps achieve better quantization results. However, after `build_executorch_binary` is called, we need to ensure that we only perform one inference during execution. Please ensure that CPU and QNN is using the same input during execution; otherwise, the debugging results might not be accurate.
159
153
160
-
### 5. Pass flag to SimpleADB
161
-
When creating `SimpleADB`, please also pass the flag `args.dump_intermediate_outputs`. This tells the runner to create files that store the intermediate output schema and binary data.
dump_intermediate_outputs=args.dump_intermediate_outputs, # Add this flag
174
-
)
175
-
```
176
-
177
-
### 6: Pull and process the results.
154
+
### 5: Pull and process the results.
178
155
After QNN execution with the runner, if the previous steps are done correctly, we should be able to get two files: `etdump.etdp` and `debug_output.bin`.
179
156
The following example pulls the files back and calls a callback function to process the results. In this callback function, we create the `Inspector`. Then we perform CPU inference to get CPU intermediate results. Now, we have both QNN and CPU intermediate results, we can start generating results to compare the accuracy. Taking the following example, we should be able to get `debug_graph.svg` as an output in the current directory.
0 commit comments