From f0fd4aef90e9f15790519e68f693b4f5e14597e6 Mon Sep 17 00:00:00 2001 From: Chen Lai Date: Mon, 7 Oct 2024 11:02:55 -0700 Subject: [PATCH] Improve the qcomm aot part docs (#5868) Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/5868 the schema file copy is an actual AOT step. It's a workaround but it has been here a while, probably easier to have it as part of the build script instead of manually doing it everytime Reviewed By: kirklandsign Differential Revision: D63878765 fbshipit-source-id: 7fc4b848b72e2859364e21cbea3dd1b433d6cd8e (cherry picked from commit 478a9b6d42d519fdcd58dde664047fa19aafb487) --- backends/qualcomm/scripts/build.sh | 2 ++ docs/source/build-run-qualcomm-ai-engine-direct-backend.md | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backends/qualcomm/scripts/build.sh b/backends/qualcomm/scripts/build.sh index 4cb2f50bbd2..ed77a873516 100755 --- a/backends/qualcomm/scripts/build.sh +++ b/backends/qualcomm/scripts/build.sh @@ -135,6 +135,8 @@ if [ "$BUILD_X86_64" = true ]; then rm -f $PRJ_ROOT/backends/qualcomm/python/* cp -fv $BUILD_ROOT/backends/qualcomm/Py* "$PRJ_ROOT/backends/qualcomm/python" + cp -fv "$PRJ_ROOT/schema/program.fbs" "$PRJ_ROOT/exir/_serialize/program.fbs" + cp -fv "$PRJ_ROOT/schema/scalar_type.fbs" "$PRJ_ROOT/exir/_serialize/scalar_type.fbs" EXAMPLE_ROOT=examples/qualcomm CMAKE_PREFIX_PATH="${BUILD_ROOT}/lib/cmake/ExecuTorch;${BUILD_ROOT}/third-party/gflags;" diff --git a/docs/source/build-run-qualcomm-ai-engine-direct-backend.md b/docs/source/build-run-qualcomm-ai-engine-direct-backend.md index 94a936b2e7a..5e43a63c760 100644 --- a/docs/source/build-run-qualcomm-ai-engine-direct-backend.md +++ b/docs/source/build-run-qualcomm-ai-engine-direct-backend.md @@ -147,6 +147,10 @@ cmake --build $PWD --target "PyQnnManagerAdaptor" "PyQnnWrapperAdaptor" -j$(npro # The filename might vary depending on your Python and host version. cp -f backends/qualcomm/PyQnnManagerAdaptor.cpython-310-x86_64-linux-gnu.so $EXECUTORCH_ROOT/backends/qualcomm/python cp -f backends/qualcomm/PyQnnWrapperAdaptor.cpython-310-x86_64-linux-gnu.so $EXECUTORCH_ROOT/backends/qualcomm/python + +# Workaround for fbs files in exir/_serialize +cp $EXECUTORCH_ROOT/schema/program.fbs $EXECUTORCH_ROOT/exir/_serialize/program.fbs +cp $EXECUTORCH_ROOT/schema/scalar_type.fbs $EXECUTORCH_ROOT/exir/_serialize/scalar_type.fbs ``` ### Runtime: @@ -205,9 +209,6 @@ We use deeplab-v3-resnet101 as an example in this tutorial. Run below commands t ```bash cd $EXECUTORCH_ROOT -# Workaround for fbs files in exir/_serialize -cp schema/program.fbs exir/_serialize/program.fbs -cp schema/scalar_type.fbs exir/_serialize/scalar_type.fbs python -m examples.qualcomm.scripts.deeplab_v3 -b build-android -m SM8550 --compile_only --download ```