Skip to content

Commit

Permalink
feat(android): use armv8.4-a for rnllama_v8fp16_va target
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Nov 10, 2023
1 parent 0fa4ee6 commit 34b557e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions android/src/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,10 @@ function(build_library target_name)

target_link_libraries(${target_name} ${LOG_LIB} android)

if (${target_name} STREQUAL "rnllama_v8fp16_va")
target_compile_options(${target_name} PRIVATE -march=armv8.2-a+fp16+dotprod)
endif ()

target_compile_options(${target_name} PRIVATE -DLM_GGML_USE_K_QUANTS -pthread)

if (${target_name} STREQUAL "rnllama_v8fp16_va")
target_compile_options(${target_name} PRIVATE -march=armv8.2-a+fp16+dotprod)
target_compile_options(${target_name} PRIVATE -march=armv8.4-a+fp16+dotprod)
endif ()

if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
Expand All @@ -49,7 +45,7 @@ function(build_library target_name)
# NOTE: If you want to debug the native code, you can uncomment if and endif
# if (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")

target_compile_options(${target_name} PRIVATE -Ofast -DNDEBUG)
target_compile_options(${target_name} PRIVATE -O3 -DNDEBUG)
target_compile_options(${target_name} PRIVATE -fvisibility=hidden -fvisibility-inlines-hidden)
target_compile_options(${target_name} PRIVATE -ffunction-sections -fdata-sections)

Expand Down

0 comments on commit 34b557e

Please sign in to comment.