Skip to content

Commit

Permalink
set NULL to ggml_context pointer to pass assert check in in case some…
Browse files Browse the repository at this point in the history
… compiler does not set uninitialized pointer to NULL for mnist example
  • Loading branch information
Ucag authored and JohannesGaessler committed Aug 24, 2024
1 parent 879dcb8 commit 3e214c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/mnist/mnist-common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
{
Expand Down

0 comments on commit 3e214c9

Please sign in to comment.