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
{{ message }}
Repository navigation
Commit c0d948a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/source/etdump.md
+88-5Lines changed: 88 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,28 @@ ETDump (ExecuTorch Dump) is one of the core components of the ExecuTorch Develop
7
7
8
8
Generating an ETDump is a relatively straightforward process. Users can follow the steps detailed below to integrate it into their application that uses ExecuTorch.
9
9
10
+
### Build Configuration
11
+
12
+
To enable ETDump support, you need to configure your CMake build with the following options:
13
+
14
+
**Required CMake options:**
15
+
```cmake
16
+
-DEXECUTORCH_BUILD_DEVTOOLS=ON # Builds the devtools library including ETDump
17
+
-DEXECUTORCH_ENABLE_EVENT_TRACER=ON # Enables event tracing in the runtime
18
+
```
19
+
20
+
**Required CMake targets to link:**
21
+
```cmake
22
+
target_link_libraries(your_binary
23
+
etdump # ETDump library
24
+
# ... other ExecuTorch libraries
25
+
)
26
+
```
27
+
28
+
The `EXECUTORCH_ENABLE_EVENT_TRACER=ON` option automatically sets the `ET_EVENT_TRACER_ENABLED` preprocessor flag for the ExecuTorch runtime and all operator libraries.
4.***Compile*** your binary using CMake with the `ET_EVENT_TRACER_ENABLED` pre-processor flag to enable events to be traced and logged into ETDump inside the ExecuTorch runtime. This flag needs to be added to the ExecuTorch library and any operator library that you are compiling into your binary. For reference, you can take a look at `examples/sdk/CMakeLists.txt`. The lines of interest are:
59
+
### Using the Module API (C++)
60
+
61
+
For applications using the higher-level [Module API](extension-module.md), ETDump integration is simpler. Create an `ETDumpGen` instance and pass it to the `Module` constructor:
### Make sure ET_EVENT_TRACER_ENABLED flag is enabled or ETDump will be empty.
124
+
**Note:** The Python Runtime API requires ExecuTorch to be built with event tracing enabled (`EXECUTORCH_ENABLE_EVENT_TRACER=ON`).
125
+
126
+
### Troubleshooting: Empty ETDump
44
127
45
-
If the binary is not compiled with the `ET_EVENT_TRACER_ENABLED` preprocessor flag, no trace events will be recorded and the ETDump will be empty.
128
+
If the binary is not compiled with the `ET_EVENT_TRACER_ENABLED` preprocessor flag (either by setting `EXECUTORCH_ENABLE_EVENT_TRACER=ON` in CMake or manually adding `-DET_EVENT_TRACER_ENABLED`), no trace events will be recorded and the ETDump will be empty.
0 commit comments