|
20 | 20 | # This tutorial will show a full end-to-end flow of how to utilize the SDK.
|
21 | 21 | # Specifically, it will:
|
22 | 22 | #
|
23 |
| -# 1. Generate the artifacts consumed by the SDK (`ETRecord <../sdk-etrecord>`__, `ETDump <../sdk-etdump.html>`__). |
| 23 | +# 1. Generate the artifacts consumed by the SDK (`ETRecord <../sdk-etrecord.html>`__, `ETDump <../sdk-etdump.html>`__). |
24 | 24 | # 2. Create an Inspector class consuming these artifacts.
|
25 | 25 | # 3. Utilize the Inspector class to analyze the model.
|
26 | 26 |
|
|
42 | 42 | #
|
43 | 43 | # ``executorch.sdk.generate_etrecord`` takes in an output file path (str), the
|
44 | 44 | # edge dialect model (``EdgeProgramManager``), the ExecuTorch dialect model
|
45 |
| -# (``ExecutorchProgramManager``), and an optional dictionary of additional models |
| 45 | +# (``ExecutorchProgramManager``), and an optional dictionary of additional models. |
46 | 46 | #
|
47 | 47 | # In this tutorial, an example model (shown below) is used to demonstrate.
|
48 | 48 |
|
@@ -113,9 +113,9 @@ def forward(self, x):
|
113 | 113 | ######################################################################
|
114 | 114 | #
|
115 | 115 | # .. warning::
|
116 |
| -# Users should do a deepcopy of the output of to_edge() and pass in the |
117 |
| -# deepcopy to the generate_etrecord API. This is needed because the |
118 |
| -# subsequent call, to_executorch(), does an in-place mutation and will |
| 116 | +# Users should do a deepcopy of the output of ``to_edge()`` and pass in the |
| 117 | +# deepcopy to the ``generate_etrecord`` API. This is needed because the |
| 118 | +# subsequent call, ``to_executorch()``, does an in-place mutation and will |
119 | 119 | # lose debug data in the process.
|
120 | 120 | #
|
121 | 121 |
|
@@ -169,21 +169,10 @@ def forward(self, x):
|
169 | 169 | f.write(serialized_bundled_program)
|
170 | 170 |
|
171 | 171 | ######################################################################
|
172 |
| -# We provide 2 ways of executing the Bundled Model to generate the ``ETDump``: |
173 |
| -# |
174 |
| -# **Option 1:** |
175 |
| -# |
176 |
| -# Use Buck (follow `these instructions <../getting-started-setup.html#building-a-runtime>`__ to set up buck):: |
177 |
| -# |
178 |
| -# cd executorch |
179 |
| -# buck2 run -c executorch.event_tracer_enabled=true examples/sdk/sdk_example_runner:sdk_example_runner -- --bundled_program_path <bundled_program> |
180 |
| -# |
181 |
| -# **Option 2:** |
182 |
| -# |
183 |
| -# Use CMake (follow `these instructions <../runtime-build-and-cross-compilation.html#configure-the-cmake-build>`__ to set up cmake):: |
| 172 | +# Use CMake (follow `these instructions <../runtime-build-and-cross-compilation.html#configure-the-cmake-build>`__ to set up cmake) to execute the Bundled Program to generate the ``ETDump``:: |
184 | 173 | #
|
185 | 174 | # cd executorch
|
186 |
| -# rm -rf cmake-out && mkdir cmake-out && cd cmake-out && cmake -DBUCK2=buck2 -DEXECUTORCH_BUILD_SDK=1 -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=1 .. |
| 175 | +# rm -rf cmake-out && mkdir cmake-out && cd cmake-out && cmake -DEXECUTORCH_BUILD_SDK=1 -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=1 .. |
187 | 176 | # cd ..
|
188 | 177 | # cmake --build cmake-out -j8 -t sdk_example_runner
|
189 | 178 | # ./cmake-out/examples/sdk/sdk_example_runner --bundled_program_path <bundled_program>
|
@@ -308,6 +297,6 @@ def forward(self, x):
|
308 | 297 | # ^^^^^^^^^^^^^^^
|
309 | 298 | #
|
310 | 299 | # - `ExecuTorch SDK <../sdk-overview.html>`__
|
311 |
| -# - `ETRecord <../sdk-etrecord>`__ |
| 300 | +# - `ETRecord <../sdk-etrecord.html>`__ |
312 | 301 | # - `ETDump <../sdk-etdump.html>`__
|
313 | 302 | # - `Inspector <../sdk-inspector.html>`__
|
0 commit comments