Skip to content

Commit

Permalink
fix: add missing GGML_USE_CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Dec 23, 2024
1 parent c2ced44 commit a2fe767
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion android/src/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function(build_library target_name cpu_flags)

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

target_compile_options(${target_name} PRIVATE -pthread ${cpu_flags})
target_compile_options(${target_name} PRIVATE -DLM_GGML_USE_CPU -pthread ${cpu_flags})

if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
target_compile_options(${target_name} PRIVATE -DRNLLAMA_ANDROID_ENABLE_LOGGING)
Expand Down
2 changes: 1 addition & 1 deletion llama-rn.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require "json"

package = JSON.parse(File.read(File.join(__dir__, "package.json")))
base_ld_flags = "-framework Accelerate -framework Foundation -framework Metal -framework MetalKit"
base_compiler_flags = "-fno-objc-arc -DLM_GGML_USE_ACCELERATE -Wno-shorten-64-to-32"
base_compiler_flags = "-fno-objc-arc -DLM_GGML_USE_CPU -DLM_GGML_USE_ACCELERATE -Wno-shorten-64-to-32"

if ENV["RNLLAMA_DISABLE_METAL"] != "1" then
base_compiler_flags += " -DLM_GGML_USE_METAL" # -DLM_GGML_METAL_NDEBUG
Expand Down

0 comments on commit a2fe767

Please sign in to comment.