Spaces:
Running
Running
whisper.android : add GGML_USE_CPU compile definition (#2945)
Browse filesThis commit add GGML_USE_CPU to built target library to enable CPU
backend.
The motivation for this that without the compile definition the CPU
backend is not enabled and the app will crash when trying to use it.
examples/whisper.android/lib/src/main/jni/whisper/CMakeLists.txt
CHANGED
|
@@ -44,6 +44,8 @@ function(build_library target_name)
|
|
| 44 |
${SOURCE_FILES}
|
| 45 |
)
|
| 46 |
|
|
|
|
|
|
|
| 47 |
if (${target_name} STREQUAL "whisper_v8fp16_va")
|
| 48 |
target_compile_options(${target_name} PRIVATE -march=armv8.2-a+fp16)
|
| 49 |
set(GGML_COMPILE_OPTIONS -march=armv8.2-a+fp16)
|
|
|
|
| 44 |
${SOURCE_FILES}
|
| 45 |
)
|
| 46 |
|
| 47 |
+
target_compile_definitions(${target_name} PUBLIC GGML_USE_CPU)
|
| 48 |
+
|
| 49 |
if (${target_name} STREQUAL "whisper_v8fp16_va")
|
| 50 |
target_compile_options(${target_name} PRIVATE -march=armv8.2-a+fp16)
|
| 51 |
set(GGML_COMPILE_OPTIONS -march=armv8.2-a+fp16)
|