Procházet zdrojové kódy

Fix un-initialized FP16 tables on x86 (#15, #2)

Georgi Gerganov před 2 roky
rodič
revize
a9e58529ea
1 změnil soubory, kde provedl 7 přidání a 0 odebrání
  1. 7 0
      quantize.cpp

+ 7 - 0
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];