From b163918b46ed67db86a8346a6bd8a4c2f31b1e32 Mon Sep 17 00:00:00 2001 From: Lizonghang <870644199@qq.com> Date: Wed, 12 Feb 2025 00:17:33 +0400 Subject: [PATCH] disable prefetch in standalone mode --- src/llama.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llama.cpp b/src/llama.cpp index 9f613743..c41ebb8c 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -18108,9 +18108,9 @@ static int llama_decode_internal( timer(manage_graph_tensors); int next_gf_id = (i + 1) % gf.size(); - manage_graph_tensors(gf[next_gf_id], POSIX_MADV_WILLNEED, true); + manage_graph_tensors(gf[next_gf_id], POSIX_MADV_WILLNEED, n_world > 1); if (my_rank == 0 && (is_last_l || (next_gf_id == (int)gf.size() - 1))) { - manage_graph_tensors(gf[0], POSIX_MADV_WILLNEED, true); + manage_graph_tensors(gf[0], POSIX_MADV_WILLNEED, n_world > 1); } if (cparams.unload && n_world > 1) {