Explorar el Código

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

Georgi Gerganov hace 2 años
padre
commit
a9e58529ea
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  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];