Skip to content

Commit 295b2aa

Browse files
cmodi-metafacebook-github-bot
authored andcommitted
Modify build script for MediaTek Neuron (#6292)
Summary: For `build_android_llm_demo.sh`: 1. Modify how NEURON_BUFFER_ALLOCATOR_LIB is used. In MTK env setup, NEURON_BUFFER_ALLOCATOR_LIB will point exactly to the libneuron_buffer_allocator.so file. 2. Include a new variable for NEURON_USDK_ADAPTER_LIB which we should expect which will point exactly to the libneuronusdk_adapter.mtk.so Pull Request resolved: #6292 Reviewed By: kirklandsign Differential Revision: D64479597 Pulled By: cmodi-meta fbshipit-source-id: 22536fa88787a86772df8448d56e1924d7c748f1
1 parent 50aa517 commit 295b2aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build/build_android_llm_demo.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ build_android_native_library() {
8989
fi
9090

9191
# Copy MTK related so library
92-
if [ -n "$NEURON_BUFFER_ALLOCATOR_LIB" ] && [ "$ANDROID_ABI" == "arm64-v8a" ]; then
92+
if [ -n "$NEURON_BUFFER_ALLOCATOR_LIB" ] && [ -n "$NEURON_USDK_ADAPTER_LIB" ] && [ "$ANDROID_ABI" == "arm64-v8a" ]; then
9393
cp "${CMAKE_OUT}"/backends/mediatek/libneuron_backend.so ${BUILD_AAR_DIR}/jni/${ANDROID_ABI}/
94-
cp "$NEURON_BUFFER_ALLOCATOR_LIB"/libneuron_buffer_allocator.so ${BUILD_AAR_DIR}/jni/${ANDROID_ABI}/
95-
cp "$NEURON_BUFFER_ALLOCATOR_LIB"/libneuronusdk_adapter.mtk.so ${BUILD_AAR_DIR}/jni/${ANDROID_ABI}/
94+
cp "${NEURON_BUFFER_ALLOCATOR_LIB}" ${BUILD_AAR_DIR}/jni/${ANDROID_ABI}/
95+
cp "${NEURON_USDK_ADAPTER_LIB}" ${BUILD_AAR_DIR}/jni/${ANDROID_ABI}/
9696
fi
9797
}
9898

0 commit comments

Comments
 (0)