Skip to content

Commit

Permalink
Fix Android LlamaDemo setup.sh (pytorch#5274)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: pytorch#5274

Reviewed By: shoumikhin

Differential Revision: D62514059

Pulled By: kirklandsign

fbshipit-source-id: 9e19c88d2926ab6a13dee8daffdbb58eaa4a85aa
  • Loading branch information
kirklandsign authored and facebook-github-bot committed Sep 11, 2024
1 parent d80f78f commit 6ac1365
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions examples/demo-apps/android/LlamaDemo/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,13 @@ else
fi
cmake --build "${CMAKE_OUT}" -j "${CMAKE_JOBS}" --target install --config Release

cmake examples/models/llama2 \
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \
-DANDROID_ABI="$ANDROID_ABI" \
-DANDROID_PLATFORM=android-23 \
-DCMAKE_INSTALL_PREFIX="${CMAKE_OUT}" \
-DEXECUTORCH_BUILD_KERNELS_CUSTOM=ON \
-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \
-DEXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL=ON \
-DEXECUTORCH_BUILD_XNNPACK=ON \
-DCMAKE_BUILD_TYPE=Release \
-B"${CMAKE_OUT}"/examples/models/llama2

cmake --build "${CMAKE_OUT}"/examples/models/llama2 -j "${CMAKE_JOBS}" --config Release

cmake extension/android \
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
-DANDROID_ABI="${ANDROID_ABI}" \
-DANDROID_PLATFORM=android-23 \
-DCMAKE_INSTALL_PREFIX="${CMAKE_OUT}" \
-DEXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL=ON \
-DEXECUTORCH_BUILD_KERNELS_CUSTOM=ON \
-DEXECUTORCH_BUILD_LLAMA_JNI=ON \
-DCMAKE_BUILD_TYPE=Release \
-B"${CMAKE_OUT}"/extension/android
Expand Down

0 comments on commit 6ac1365

Please sign in to comment.