aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-03-11 17:40:14 +0200
committerGeorgi Gerganov <ggerganov@gmail.com>2023-03-11 17:40:14 +0200
commita9e58529ea507ac15cd2df4c39d1b9613d6acb6e (patch)
tree01834fb7781d5db37b1459a3c0ad162bb37fe008
parent7d9ed7b25fe17db3fc8848b5116d14682864ce8e (diff)
Fix un-initialized FP16 tables on x86 (#15, #2)
-rw-r--r--quantize.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/quantize.cpp b/quantize.cpp
index 0bc62db..0ae5373 100644
--- a/quantize.cpp
+++ b/quantize.cpp
@@ -296,6 +296,13 @@ int main(int argc, char ** argv) {
return 1;
}
+ // needed to initialize f16 tables
+ {
+ struct ggml_init_params params = { 0, NULL };
+ struct ggml_context * ctx = ggml_init(params);
+ ggml_free(ctx);
+ }
+
const std::string fname_inp = argv[1];
const std::string fname_out = argv[2];