mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-20 01:31:31 +02:00
feat: cool profiler thingy
This commit is contained in:
committed by
Piotr Wilkin
parent
95b8e33e16
commit
19028b55a0
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user