Skip to content

Commit 0daf51e

Browse files
authored
Fix the broken cmake commands in sdk integration tutorial
1 parent fac1ae6 commit 0daf51e

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

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

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,23 @@ def forward(self, x):
172172
# 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``::
173173
#
174174
# cd executorch
175-
# rm -rf cmake-out && mkdir cmake-out && cd cmake-out && cmake -DEXECUTORCH_BUILD_SDK=1 -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=1 ..
176-
# cd ..
177-
# cmake --build cmake-out -j8 -t sdk_example_runner
178-
# ./cmake-out/examples/sdk/sdk_example_runner --bundled_program_path <bundled_program>
175+
# rm -rf cmake-out
176+
# cmake -DCMAKE_INSTALL_PREFIX=cmake-out \
177+
# -DCMAKE_BUILD_TYPE=Release \
178+
# -DEXECUTORCH_BUILD_SDK=ON \
179+
# -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \-Bcmake-out .
180+
# cmake --build cmake-out -j9 --target install --config Release
181+
#
182+
# local example_dir=examples/sdk
183+
# local build_dir=cmake-out/${example_dir}
184+
# CMAKE_PREFIX_PATH="${PWD}/cmake-out/lib/cmake/ExecuTorch;${PWD}/cmake-out/third-party/gflags"
185+
# rm -rf ${build_dir}
186+
# cmake -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \
187+
# -DCMAKE_BUILD_TYPE=Release \
188+
# -B${build_dir} \
189+
# ${example_dir}
190+
# cmake --build ${build_dir} -j9 --config Release
191+
# ${build_dir}/sdk_example_runner --bundled_program_path="bundled_program.bp"
179192

180193
######################################################################
181194
# Creating an Inspector

0 commit comments

Comments
 (0)