Skip to content

Commit f89c312

Browse files
Olivia-liufacebook-github-bot
authored andcommitted
SDK tutorial doc update (#3238)
Summary: Pull Request resolved: #3238 fix some links, remove outdated commands Reviewed By: GregoryComer Differential Revision: D56453800 fbshipit-source-id: 8bd86a593f8c5b9342e61ab2d129473d315b57a8
1 parent 3b0f271 commit f89c312

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

docs/source/tutorials_source/sdk-integration-tutorial.py

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# This tutorial will show a full end-to-end flow of how to utilize the SDK.
2121
# Specifically, it will:
2222
#
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>`__).
2424
# 2. Create an Inspector class consuming these artifacts.
2525
# 3. Utilize the Inspector class to analyze the model.
2626

@@ -42,7 +42,7 @@
4242
#
4343
# ``executorch.sdk.generate_etrecord`` takes in an output file path (str), the
4444
# 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.
4646
#
4747
# In this tutorial, an example model (shown below) is used to demonstrate.
4848

@@ -113,9 +113,9 @@ def forward(self, x):
113113
######################################################################
114114
#
115115
# .. 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
119119
# lose debug data in the process.
120120
#
121121

@@ -169,21 +169,10 @@ def forward(self, x):
169169
f.write(serialized_bundled_program)
170170

171171
######################################################################
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``::
184173
#
185174
# 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 ..
187176
# cd ..
188177
# cmake --build cmake-out -j8 -t sdk_example_runner
189178
# ./cmake-out/examples/sdk/sdk_example_runner --bundled_program_path <bundled_program>
@@ -308,6 +297,6 @@ def forward(self, x):
308297
# ^^^^^^^^^^^^^^^
309298
#
310299
# - `ExecuTorch SDK <../sdk-overview.html>`__
311-
# - `ETRecord <../sdk-etrecord>`__
300+
# - `ETRecord <../sdk-etrecord.html>`__
312301
# - `ETDump <../sdk-etdump.html>`__
313302
# - `Inspector <../sdk-inspector.html>`__

0 commit comments

Comments
 (0)