]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
Fix un-initialized FP16 tables on x86 (#15, #2)
authorGeorgi Gerganov <redacted>
Sat, 11 Mar 2023 15:40:14 +0000 (17:40 +0200)
committerGeorgi Gerganov <redacted>
Sat, 11 Mar 2023 15:40:14 +0000 (17:40 +0200)
quantize.cpp

index 0bc62db98f1726142c3831ea76c4dd35c7f54829..0ae537339ecf3a48ee408057d98c5470ca9a7db3 100644 (file)
@@ -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];