fix: add warm-up in profiling to prevent init delay
This commit is contained in:
+4
-1
@@ -439,7 +439,7 @@ float device_inp_embd_delay(struct llama_model * model, enum ggml_type src0t, in
|
||||
}
|
||||
|
||||
// warm-up
|
||||
// ggml_backend_graph_compute(backend, gf);
|
||||
ggml_backend_graph_compute(backend, gf);
|
||||
|
||||
const int64_t t_start = ggml_time_us();
|
||||
ggml_backend_graph_compute(backend, gf);
|
||||
@@ -1288,6 +1288,9 @@ static float device_mem_copy(struct llama_model * model, enum profiler_backend_t
|
||||
ggml_backend_cpu_set_n_threads(backend, n_threads);
|
||||
}
|
||||
|
||||
// warm-up
|
||||
ggml_backend_graph_compute(backend, gf);
|
||||
|
||||
const int64_t t_start = ggml_time_us();
|
||||
ggml_backend_graph_compute(backend, gf);
|
||||
const int64_t t_end = ggml_time_us();
|
||||
|
||||
Reference in New Issue
Block a user