From 4ba9fbb793bd752df32004ed0db1b3a6f6770b79 Mon Sep 17 00:00:00 2001 From: jathu Date: Thu, 10 Jul 2025 17:13:16 -0700 Subject: [PATCH] Remove EXECUTORCH_BUILD_LLAMA_JNI cmake flag --- .github/workflows/_android.yml | 1 + extension/android/CMakeLists.txt | 2 +- scripts/build_android_library.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_android.yml b/.github/workflows/_android.yml index 630ae2747bf..7e093a6ace5 100644 --- a/.github/workflows/_android.yml +++ b/.github/workflows/_android.yml @@ -35,6 +35,7 @@ jobs: # Build LLM Demo for Android export BUILD_AAR_DIR=aar-out + export EXECUTORCH_BUILD_EXTENSION_LLM=ON mkdir -p $BUILD_AAR_DIR bash scripts/build_android_library.sh cp ${BUILD_AAR_DIR}/executorch.aar $ARTIFACTS_DIR_NAME diff --git a/extension/android/CMakeLists.txt b/extension/android/CMakeLists.txt index e890bd653da..19e5be1b805 100644 --- a/extension/android/CMakeLists.txt +++ b/extension/android/CMakeLists.txt @@ -151,7 +151,7 @@ if(EXECUTORCH_BUILD_EXTENSION_TRAINING) target_compile_definitions(executorch_jni PUBLIC EXECUTORCH_BUILD_EXTENSION_TRAINING=1) endif() -if(EXECUTORCH_BUILD_LLAMA_JNI) +if(EXECUTORCH_BUILD_EXTENSION_LLM) target_sources(executorch_jni PRIVATE jni/jni_layer_llama.cpp jni/log.cpp) list(APPEND link_libraries llama_runner llava_runner) target_compile_definitions(executorch_jni PUBLIC EXECUTORCH_BUILD_LLAMA_JNI=1) diff --git a/scripts/build_android_library.sh b/scripts/build_android_library.sh index 465a17a840c..6b7a642aa31 100755 --- a/scripts/build_android_library.sh +++ b/scripts/build_android_library.sh @@ -55,8 +55,8 @@ build_android_native_library() { -DEXECUTORCH_BUILD_EXTENSION_TRAINING=ON \ -DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \ -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \ + -DEXECUTORCH_BUILD_EXTENSION_LLM="${EXECUTORCH_BUILD_EXTENSION_LLM:-OFF}" \ -DEXECUTORCH_BUILD_KERNELS_LLM="${EXECUTORCH_BUILD_EXTENSION_LLM:-ON}" \ - -DEXECUTORCH_BUILD_LLAMA_JNI="${EXECUTORCH_BUILD_EXTENSION_LLM:-ON}" \ -DEXECUTORCH_BUILD_NEURON="${EXECUTORCH_BUILD_NEURON}" \ -DNEURON_BUFFER_ALLOCATOR_LIB="${NEURON_BUFFER_ALLOCATOR_LIB}" \ -DEXECUTORCH_BUILD_QNN="${EXECUTORCH_BUILD_QNN}" \