summaryrefslogtreecommitdiff
path: root/llama.cpp
diff options
context:
space:
mode:
authorslaren <slarengh@gmail.com>2024-05-14 09:33:42 +0200
committerGitHub <noreply@github.com>2024-05-14 17:33:42 +1000
commit541600201e6480f54ae09e58d16b154d4b4b331d (patch)
tree770c54fdcc1d65bca168b485486d3097928c5060 /llama.cpp
parentefc8f767c8c8c749a245dd96ad4e2f37c164b54c (diff)
llama : disable pipeline parallelism with nkvo (#7265)
Diffstat (limited to 'llama.cpp')
-rw-r--r--llama.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llama.cpp b/llama.cpp
index 01a35dfb..ad35e4a2 100644
--- a/llama.cpp
+++ b/llama.cpp
@@ -15849,7 +15849,11 @@ struct llama_context * llama_new_context_with_model(
ctx->buf_compute_meta.resize(ggml_tensor_overhead()*LLAMA_MAX_NODES + ggml_graph_overhead_custom(LLAMA_MAX_NODES, false));
// enabling pipeline parallelism in the scheduler increases memory usage, so it is only done when necessary
- bool pipeline_parallel = llama_get_device_count() > 1 && model->n_gpu_layers > (int)model->hparams.n_layer && model->split_mode == LLAMA_SPLIT_MODE_LAYER;
+ bool pipeline_parallel =
+ llama_get_device_count() > 1 &&
+ model->n_gpu_layers > (int)model->hparams.n_layer &&
+ model->split_mode == LLAMA_SPLIT_MODE_LAYER &&
+ params.offload_kqv;
#ifndef GGML_USE_CUDA
// pipeline parallelism requires support for async compute and events
// currently this is only implemented in the CUDA backend