Skip to content

Commit eafa623

Browse files
committed
cont : log error
1 parent 2710edb commit eafa623

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/eval-callback/eval-callback.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ static void ggml_print_tensor(uint8_t * data, ggml_type type, const int64_t * ne
7979
LOG(" sum = %f\n", sum);
8080
}
8181

82+
// TODO: make this abort configurable/optional?
8283
if (std::isnan(sum)) {
84+
LOG_ERR("encountered NaN - aborting\n");
8385
exit(0);
8486
}
8587
}

0 commit comments

Comments
 (0)