Skip to content

Commit ad80237

Browse files
danbevmglambda
authored andcommitted
ggml : improve inputs log sched_print_assignments (ggml/1053)
This commit attempts to improve the log message for the inputs of the splits in the sched_print_assignments function. The motivation for this change is that currently even if there are no inputs a colon is displayed at the end of the line, which can make it a little confusing when reading the output as it could be interpreted as the line below are inputs when they are in fact nodes. With this change the colon will only be printed if there actually are inputs.
1 parent 1f35e29 commit ad80237

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ggml/src/ggml-backend.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,9 +795,12 @@ static void ggml_backend_sched_print_assignments(ggml_backend_sched_t sched, str
795795
for (int i = 0; i < graph->n_nodes; i++) {
796796
if (cur_split < sched->n_splits && i == sched->splits[cur_split].i_start) {
797797
ggml_backend_t split_backend = sched->backends[sched->splits[cur_split].backend_id];
798-
GGML_LOG_DEBUG("\n## SPLIT #%d: %s # %d inputs: ", cur_split, ggml_backend_name(split_backend),
798+
GGML_LOG_DEBUG("\n## SPLIT #%d: %s # %d inputs", cur_split, ggml_backend_name(split_backend),
799799
sched->splits[cur_split].n_inputs);
800800
for (int j = 0; j < sched->splits[cur_split].n_inputs; j++) {
801+
if (j == 0) {
802+
GGML_LOG_DEBUG(": ");
803+
}
801804
GGML_LOG_DEBUG("[%s (%5.5s)] ", sched->splits[cur_split].inputs[j]->name,
802805
fmt_size(ggml_nbytes(sched->splits[cur_split].inputs[j])));
803806
}

0 commit comments

Comments
 (0)