whisper.android : try to fix build

This commit is contained in:
Georgi Gerganov 2023-09-11 15:19:21 +03:00
parent 2770d46ef5
commit 4845b9ed09
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
2 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@ set(WHISPER_LIB_DIR ${CMAKE_SOURCE_DIR}/../../../../../../../)
set(
SOURCE_FILES
${WHISPER_LIB_DIR}/ggml.c
${WHISPER_LIB_DIR}/ggml-alloc.c
${WHISPER_LIB_DIR}/whisper.cpp
${CMAKE_SOURCE_DIR}/jni.c
)
@ -20,7 +21,7 @@ function(build_library target_name)
SHARED
${SOURCE_FILES}
)
target_link_libraries(${target_name} ${LOG_LIB} android)
if (${target_name} STREQUAL "whisper_v8fp16_va")

View File

@ -2843,6 +2843,7 @@ struct whisper_state * whisper_init_state(whisper_context * ctx) {
ggml_cgraph * gf = whisper_build_graph_decoder(*ctx, *state, state->decoders[0], NULL, n_tokens, n_past);
const size_t alloc_size = ggml_allocr_alloc_graph(alloc, gf) + tensor_alignment;
ggml_allocr_free(alloc);
log("%s: compute buffer (decode) = %7.2f MB\n", __func__, (meta.size() + alloc_size) / 1024.0 / 1024.0);