From 6ea692d9747f8a041672e88fcd7d329953256328 Mon Sep 17 00:00:00 2001 From: Zonghang Li Date: Thu, 12 Dec 2024 15:52:27 +0400 Subject: [PATCH] use small tensors for test on cpu --- common/profiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/profiler.cpp b/common/profiler.cpp index 829c8f58..e27d498b 100644 --- a/common/profiler.cpp +++ b/common/profiler.cpp @@ -101,7 +101,7 @@ uint32_t device_cpu_cores() { static float device_flops(struct llama_model * model, enum ggml_type src0t, enum ggml_type src1t, enum profiler_backend_type btype, int n_threads) { int n_repeat = 1; int n_embd = std::min(llama_n_embd(model), 4096); - // if (btype == PROFILER_BACKEND_TYPE_CPU) n_embd /= 8; // simulate small tensor calculation on cpu + if (btype == PROFILER_BACKEND_TYPE_CPU) n_embd /= 8; // simulate small tensor calculation on cpu std::vector matrix_A(n_embd * n_embd, 1.0f); std::vector matrix_B(n_embd * n_embd, 1.0f / n_embd);