Skip to content
Snippets Groups Projects
Commit bec40d16 authored by Aleksandras Kostarevas's avatar Aleksandras Kostarevas
Browse files

Fix log assertions ggml

parent 1331b1c6
No related branches found
No related tags found
No related merge requests found
......@@ -85,13 +85,13 @@ include $(CLEAR_VARS)
# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_common_static
LOCAL_LDFLAGS += -llog
ifeq ($(FLAG_DO_PROFILE), true)
$(warning Making profiling version of native library)
LOCAL_LDFLAGS += -llog
else # FLAG_DO_PROFILE
ifeq ($(FLAG_DBG), true)
$(warning Making debug version of native library)
LOCAL_LDFLAGS += -llog
endif # FLAG_DBG
endif # FLAG_DO_PROFILE
......
......@@ -207,9 +207,6 @@
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <android/log.h>
#define GAKLOGE(fmt, ...) __android_log_print(ANDROID_LOG_ERROR, "GGML", fmt, ##__VA_ARGS__)
#define GAKLOGI(fmt, ...) __android_log_print(ANDROID_LOG_INFO, "GGML", fmt, ##__VA_ARGS__)
#define GGML_FILE_MAGIC 0x67676d6c // "ggml"
#define GGML_FILE_VERSION 1
......@@ -244,11 +241,11 @@
#define GGML_PAD(x, n) (((x) + (n) - 1) & ~((n) - 1))
#include <android/log.h>
#define GGML_ASSERT(x) \
do { \
if (!(x)) { \
GAKLOGE("GGML_ASSERT: %s:%d: %s\n", __FILE__, __LINE__, #x); \
ggml_print_backtrace(); \
__android_log_assert("", "GGML_ASSERT: ", "%s:%d: %s\n", __FILE__, __LINE__, #x); \
exit(1); \
} \
} while (0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment