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
19 changes: 19 additions & 0 deletions extension/android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,25 @@ if(EXECUTORCH_BUILD_LLAMA_JNI)
endif()
endif()

if(EXECUTORCH_BUILD_GEMMA3N_JNI)
# Gemma3N runner sources compiled directly into the JNI library
target_sources(
executorch_jni
PRIVATE
jni/fb/jni_layer_gemma3n.cpp # @oss-disable
${EXECUTORCH_ROOT}/examples/models/fb/gemma3n/runner/speech_encoder.cpp # @oss-disable
${EXECUTORCH_ROOT}/examples/models/fb/gemma3n/runner/text_decoder_runner.cpp # @oss-disable
${EXECUTORCH_ROOT}/examples/models/fb/gemma3n/runner/gemma3n_runner.cpp # @oss-disable
)
target_include_directories(
executorch_jni
PRIVATE ${EXECUTORCH_ROOT}/.. # @oss-disable
)
target_compile_definitions(
executorch_jni PRIVATE ENABLE_XNNPACK_SHARED_WORKSPACE # @oss-disable
)
endif()

target_include_directories(
executorch_jni
PRIVATE
Expand Down
1 change: 1 addition & 0 deletions scripts/build_android_library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ build_android_native_library() {
-DEXECUTORCH_BUILD_EXTENSION_ASR_RUNNER="${EXECUTORCH_BUILD_EXTENSION_LLM:-ON}" \
-DEXECUTORCH_BUILD_EXTENSION_TRAINING=ON \
-DEXECUTORCH_BUILD_LLAMA_JNI="${EXECUTORCH_BUILD_EXTENSION_LLM:-ON}" \
# @oss-disable: -DEXECUTORCH_BUILD_GEMMA3N_JNI="${EXECUTORCH_BUILD_GEMMA3N_JNI:-OFF}" \
-DEXECUTORCH_BUILD_NEURON="${EXECUTORCH_BUILD_NEURON}" \
-DNEURON_BUFFER_ALLOCATOR_LIB="${NEURON_BUFFER_ALLOCATOR_LIB}" \
-DEXECUTORCH_BUILD_QNN="${EXECUTORCH_BUILD_QNN}" \
Expand Down
Loading