Skip to content

Commit 0ba719c

Browse files
Olivia-liupytorchbot
authored andcommitted
Fix the broken cmake commands in sdk integration tutorial (#3391)
Summary: Pull Request resolved: #3391 Reviewed By: tarun292, Jack-Khuu Differential Revision: D56692344 Pulled By: Olivia-liu fbshipit-source-id: 8d83de4a689ab7642e8cfca3e912694b254a5a12 (cherry picked from commit 130d7e8)
1 parent 6a1703e commit 0ba719c

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

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

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,24 @@ 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 \
180+
# -Bcmake-out .
181+
# cmake --build cmake-out -j9 --target install --config Release
182+
#
183+
# local example_dir=examples/sdk
184+
# local build_dir=cmake-out/${example_dir}
185+
# CMAKE_PREFIX_PATH="${PWD}/cmake-out/lib/cmake/ExecuTorch;${PWD}/cmake-out/third-party/gflags"
186+
# rm -rf ${build_dir}
187+
# cmake -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \
188+
# -DCMAKE_BUILD_TYPE=Release \
189+
# -B${build_dir} \
190+
# ${example_dir}
191+
# cmake --build ${build_dir} -j9 --config Release
192+
# ${build_dir}/sdk_example_runner --bundled_program_path="bundled_program.bp"
179193

180194
######################################################################
181195
# Creating an Inspector

0 commit comments

Comments
 (0)