Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/demo-apps/android/LlamaDemo/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ cmake examples/models/llama2 \
-DANDROID_ABI="$ANDROID_ABI" \
-DCMAKE_INSTALL_PREFIX="${CMAKE_OUT}" \
-DEXECUTORCH_USE_TIKTOKEN="${EXECUTORCH_USE_TIKTOKEN}" \
-DEXECUTORCH_BUILD_CUSTOM=ON \
-DEXECUTORCH_BUILD_OPTIMIZED=ON \
-DEXECUTORCH_BUILD_XNNPACK=ON \
-DCMAKE_BUILD_TYPE=Release \
-B"${CMAKE_OUT}"/examples/models/llama2

Expand Down
4 changes: 3 additions & 1 deletion extension/android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ if(EXECUTORCH_BUILD_LLAMA_JNI)
set_property(TARGET custom_ops PROPERTY IMPORTED_LOCATION ${CUSTOM_OPS_PATH})
target_link_options_shared_lib(custom_ops)

target_link_options_shared_lib(quantized_ops_lib)

if(TARGET pthreadpool)
set(LLAMA_JNI_SRCS jni/jni_layer_llama.cpp ../../backends/xnnpack/threadpool/cpuinfo_utils.cpp)
else()
Expand All @@ -83,7 +85,7 @@ if(EXECUTORCH_BUILD_LLAMA_JNI)
endif()
target_include_directories(executorch_llama_jni PRIVATE ${_common_include_directories})
target_link_libraries(executorch_llama_jni ${link_libraries} llama_runner
custom_ops cpublas eigen_blas)
custom_ops cpublas eigen_blas quantized_kernels quantized_ops_lib)
target_compile_options(executorch_llama_jni PUBLIC ${_common_compile_options})
if(EXECUTORCH_USE_TIKTOKEN)
set(ABSL_ENABLE_INSTALL ON)
Expand Down