Skip to content

Commit ef12069

Browse files
committed
fix: Fix INT_MAX to use numeric_limits for better compiler compat
Branch: Mamba2SSD Signed-off-by: Gabe Goodhart <[email protected]>
1 parent 1ceb15e commit ef12069

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/eval-callback/eval-callback.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <sstream>
1010
#include <vector>
1111
#include <numeric>
12+
#include <limits>
1213

1314
// verbosity flag set via the params.verbosity CLI flag. This is used for two
1415
// things:
@@ -165,7 +166,7 @@ static bool ggml_debug(struct ggml_tensor * t, bool ask, void * user_data) {
165166
}
166167

167168
if (!ggml_is_quantized(t->type)) {
168-
const int print_width = verbosity > 1 ? INT_MAX : 3;
169+
const int print_width = verbosity > 1 ? std::numeric_limits<int>::max() : 3;
169170
uint8_t * data = is_host ? (uint8_t *) t->data : cb_data->data.data();
170171
ggml_print_tensor(data, t->type, t->ne, t->nb, print_width);
171172
}

0 commit comments

Comments
 (0)