summaryrefslogtreecommitdiff
path: root/ggml.h
diff options
context:
space:
mode:
authorJared Van Bortel <jared@nomic.ai>2024-03-23 18:48:02 -0400
committerGitHub <noreply@github.com>2024-03-23 18:48:02 -0400
commit94d1b3b4119209efcdd08df0dceaecbd1fe7f85c (patch)
tree2238dd7ef96c0dd0a0576437585e8667f81e665a /ggml.h
parent95562175f83a49755ff6fd3bad09409417c8e6f9 (diff)
use _wfopen instead of fopen on Windows (#6248)
also fix missing #defines before windows.h, and BPE LF token on MSVC
Diffstat (limited to 'ggml.h')
-rw-r--r--ggml.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/ggml.h b/ggml.h
index c937d4a5..0a5af720 100644
--- a/ggml.h
+++ b/ggml.h
@@ -214,9 +214,10 @@
# define GGML_ATTRIBUTE_FORMAT(...) __attribute__((format(printf, __VA_ARGS__)))
#endif
-#include <stdint.h>
-#include <stddef.h>
#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
#define GGML_FILE_MAGIC 0x67676d6c // "ggml"
#define GGML_FILE_VERSION 1
@@ -708,6 +709,9 @@ extern "C" {
GGML_API void ggml_print_backtrace(void);
+ // accepts a UTF-8 path, even on Windows
+ GGML_API FILE * ggml_fopen(const char * fname, const char * mode);
+
GGML_API void ggml_numa_init(enum ggml_numa_strategy numa); // call once for better performance on NUMA systems
GGML_API bool ggml_is_numa(void); // true if init detected that system has >1 NUMA node