feat: cool profiler thingy

This commit is contained in:
Piotr Wilkin
2026-03-29 01:14:09 +01:00
committed by Piotr Wilkin
parent 95b8e33e16
commit 19028b55a0
21 changed files with 2020 additions and 45 deletions
+9
View File
@@ -3,6 +3,7 @@
#include "build-info.h"
#include "common.h"
#include "ggml-profiler.h"
#include "fit.h"
#include "log.h"
#include "llama.h"
@@ -1401,6 +1402,14 @@ common_init_result::common_init_result(common_params & params, bool model_only)
return;
}
if (params.profiling) {
ggml_backend_sched_t sched = llama_context_get_sched(lctx);
if (sched != nullptr) {
ggml_backend_sched_set_profiling(sched, true);
LOG_INF("%s: profiling enabled\n", __func__);
}
}
pimpl->context.reset(lctx);
set_process_priority(params.cpuparams.priority);