From ee21c0bc08fa13bf961a8333582bcb8c0ea1a87a Mon Sep 17 00:00:00 2001 From: jhen Date: Thu, 19 Oct 2023 11:01:46 +0800 Subject: [PATCH] feat(android): enable armv8.2-a+fp16+dotprod --- android/src/main/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/src/main/CMakeLists.txt b/android/src/main/CMakeLists.txt index e38f9116..0833eae7 100644 --- a/android/src/main/CMakeLists.txt +++ b/android/src/main/CMakeLists.txt @@ -34,6 +34,11 @@ include_directories(${RNLLAMA_LIB_DIR}) target_compile_options(${RNLLAMA_LIBRARY_NAME} PRIVATE -DLM_GGML_USE_K_QUANTS -pthread) +# TODO: split library +if (${ANDROID_ABI} STREQUAL "arm64-v8a") + target_compile_options(${RNLLAMA_LIBRARY_NAME} PRIVATE -march=armv8.2-a+fp16+dotprod) +endif () + if (${CMAKE_BUILD_TYPE} STREQUAL "Debug") target_compile_options(${RNLLAMA_LIBRARY_NAME} PRIVATE -DRNLLAMA_ANDROID_ENABLE_LOGGING) endif ()