]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
set NULL to ggml_context pointer to pass assert check in in case some compiler does...
authorucag.li <redacted>
Thu, 22 Aug 2024 19:49:45 +0000 (03:49 +0800)
committerJohannes Gäßler <redacted>
Sat, 24 Aug 2024 13:01:52 +0000 (15:01 +0200)
examples/mnist/mnist-common.cpp

index cbed894ce65f75bfc8874bd2ceed8e482459e8d9..f0e90bb029e52bb1b7e95008995af9b058ded93e 100644 (file)
@@ -74,8 +74,8 @@ mnist_eval_result mnist_graph_eval(const std::string & fname, const float * imag
     fprintf(stderr, "%s: trying to load a ggml graph from %s\n", __func__, fname.c_str());
     mnist_eval_result result;
 
-    struct ggml_context * ctx_data;
-    struct ggml_context * ctx_eval;
+    struct ggml_context * ctx_data = nullptr;
+    struct ggml_context * ctx_eval = nullptr;
 
     struct ggml_cgraph * gf;
     {