Skip to content

Commit

Permalink
Fix the broken cmake commands in sdk integration tutorial (#3391)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #3391

Reviewed By: tarun292, Jack-Khuu

Differential Revision: D56692344

Pulled By: Olivia-liu

fbshipit-source-id: 8d83de4a689ab7642e8cfca3e912694b254a5a12
  • Loading branch information
Olivia-liu authored and facebook-github-bot committed Apr 29, 2024
1 parent 7fa91fd commit 130d7e8
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions docs/source/tutorials_source/sdk-integration-tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,24 @@ def forward(self, x):
# 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``::
#
# cd executorch
# rm -rf cmake-out && mkdir cmake-out && cd cmake-out && cmake -DEXECUTORCH_BUILD_SDK=1 -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=1 ..
# cd ..
# cmake --build cmake-out -j8 -t sdk_example_runner
# ./cmake-out/examples/sdk/sdk_example_runner --bundled_program_path <bundled_program>
# rm -rf cmake-out
# cmake -DCMAKE_INSTALL_PREFIX=cmake-out \
# -DCMAKE_BUILD_TYPE=Release \
# -DEXECUTORCH_BUILD_SDK=ON \
# -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \
# -Bcmake-out .
# cmake --build cmake-out -j9 --target install --config Release
#
# local example_dir=examples/sdk
# local build_dir=cmake-out/${example_dir}
# CMAKE_PREFIX_PATH="${PWD}/cmake-out/lib/cmake/ExecuTorch;${PWD}/cmake-out/third-party/gflags"
# rm -rf ${build_dir}
# cmake -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \
# -DCMAKE_BUILD_TYPE=Release \
# -B${build_dir} \
# ${example_dir}
# cmake --build ${build_dir} -j9 --config Release
# ${build_dir}/sdk_example_runner --bundled_program_path="bundled_program.bp"

######################################################################
# Creating an Inspector
Expand Down

0 comments on commit 130d7e8

Please sign in to comment.