Skip to content

Commit 2be1d0a

Browse files
committed
examples(llama2c): fix log not being the same level and compiler nits
1 parent cb215e4 commit 2be1d0a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,17 +333,17 @@ static void print_params(struct my_llama_hparams * params) {
333333
}
334334

335335
static void print_tensor_info(const struct ggml_context * ctx) {
336-
for (auto t = ggml_get_first_tensor(ctx); t != NULL; t = ggml_get_next_tensor(ctx, t)) {
336+
for (auto * t = ggml_get_first_tensor(ctx); t != NULL; t = ggml_get_next_tensor(ctx, t)) {
337337
LOG_INF("%s: Allocating ", __func__);
338338
int64_t total = 1;
339339
int i = 0;
340340
for (; i < ggml_n_dims(t); ++i) {
341-
if (i > 0) LOG("x ");
342-
LOG("[%" PRId64 "] ", t->ne[i]);
341+
if (i > 0) { LOG_INF("x "); }
342+
LOG_INF("[%" PRId64 "] ", t->ne[i]);
343343
total *= t->ne[i];
344344
}
345-
if (i > 1) LOG("= [%" PRId64 "] ", total);
346-
LOG("float space for %s\n", ggml_get_name(t));
345+
if (i > 1) { LOG_INF("= [%" PRId64 "] ", total); }
346+
LOG_INF("float space for %s\n", ggml_get_name(t));
347347
}
348348
}
349349

0 commit comments

Comments
 (0)