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
Add event tracing and ETDumps to executor_runner (#5027)
* Add event tracing and ETDumps to executor_runner
- Enabled via EXECUTORCH_ENABLE_EVENT_TRACER
- Add flag 'etdump_path' to specify the file path for the ETDump file
- Add flag 'num_executions' for number of iterations to run
- Create and pass event tracer 'ETDumpGen'
- Save ETDump to disk
- Update docs to reflect the changes
Signed-off-by: Benjamin Klimczak <[email protected]>
Change-Id: I7e8e8b7f21453bb8d88fa2b9c2ef66c532f3ea46
* Fix comments during code review
- Raise a CMake error if event tracing is enabled without the devtools
- Re-factoring of the changes in the portable executor_runner
- Minor fix in docs
Change-Id: Ia50fef8172f678f9cbe2b33e2178780ff983f335
Signed-off-by: Benjamin Klimczak <[email protected]>
* Small fix for use of flag `FLAGS_etdump`
Change-Id: I0ebb22636cdd64aea24bcee51cba05496ed78b1f
* Another fix for case ET_EVENT_TRACER_ENABLED=OFF
Change-Id: I7d72e4d8f46ec727a60c9553851d5b71da8e91d4
Signed-off-by: Benjamin Klimczak <[email protected]>
* Revert use of FLATCCRT_LIB to flatccrt
Signed-off-by: Benjamin Klimczak <[email protected]>
Change-Id: I5e7d8ef5d66bc3d5de36ea451b31fb3bdcd42d09
* Fix linker issue when building executor_runner
- Remove explicit addition of `-DET_EVENT_TRACER_ENABLED` from
backends/qualcomm/CMakeLists.txt as setting the definition without
enabling cmake flag `EXECUTORCH_ENABLE_EVENT_TRACER` caused issues
when building the executor_runner.
- Replace deprecated namespace `torch::executor` with
`executorch::etdump` in the executor_runner.cpp.
Signed-off-by: Benjamin Klimczak <[email protected]>
Change-Id: Iadff38374e661f42e394dc69903548922ca08aea
---------
Signed-off-by: Benjamin Klimczak <[email protected]>
Copy file name to clipboardExpand all lines: docs/source/native-delegates-executorch-xnnpack-delegate.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ Since weight packing creates an extra copy of the weights inside XNNPACK, We fre
70
70
When executing the XNNPACK subgraphs, we prepare the tensor inputs and outputs and feed them to the XNNPACK runtime graph. After executing the runtime graph, the output pointers are filled with the computed tensors.
71
71
72
72
#### **Profiling**
73
-
We have enabled basic profiling for XNNPACK delegate that can be enabled with the following compiler flag `-DENABLE_XNNPACK_PROFILING`. With ExecuTorch's Developer Tools integration, you can also now use the Developer Tools to profile the model. You can follow the steps in [Using the ExecuTorch Developer Tools to Profile a Model](./tutorials/devtools-integration-tutorial) on how to profile ExecuTorch models and use Developer Tools' Inspector API to view XNNPACK's internal profiling information.
73
+
We have enabled basic profiling for the XNNPACK delegate that can be enabled with the compiler flag `-DEXECUTORCH_ENABLE_EVENT_TRACER` (add `-DENABLE_XNNPACK_PROFILING` for additional details). With ExecuTorch's Developer Tools integration, you can also now use the Developer Tools to profile the model. You can follow the steps in [Using the ExecuTorch Developer Tools to Profile a Model](./tutorials/devtools-integration-tutorial) on how to profile ExecuTorch models and use Developer Tools' Inspector API to view XNNPACK's internal profiling information. An example implementation is available in the `xnn_executor_runner` (see [tutorial here](tutorial-xnnpack-delegate-lowering.md#profiling)).
74
74
75
75
76
76
[comment]: <>(TODO: Refactor quantizer to a more official quantization doc)
Copy file name to clipboardExpand all lines: docs/source/tutorial-xnnpack-delegate-lowering.md
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -177,3 +177,6 @@ Now you should be able to find the executable built at `./cmake-out/backends/xnn
177
177
178
178
## Building and Linking with the XNNPACK Backend
179
179
You can build the XNNPACK backend [CMake target](https://github.com/pytorch/executorch/blob/main/backends/xnnpack/CMakeLists.txt#L83), and link it with your application binary such as an Android or iOS application. For more information on this you may take a look at this [resource](demo-apps-android.md) next.
180
+
181
+
## Profiling
182
+
To enable profiling in the `xnn_executor_runner` pass the flags `-DEXECUTORCH_ENABLE_EVENT_TRACER=ON` and `-DEXECUTORCH_BUILD_DEVTOOLS=ON` to the build command (add `-DENABLE_XNNPACK_PROFILING=ON` for additional details). This will enable ETDump generation when running the inference and enables command line flags for profiling (see `xnn_executor_runner --help` for details).
0 commit comments