File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -15858,7 +15858,11 @@ struct llama_context * llama_new_context_with_model(
15858
15858
ctx->buf_compute_meta.resize(ggml_tensor_overhead()*LLAMA_MAX_NODES + ggml_graph_overhead_custom(LLAMA_MAX_NODES, false));
15859
15859
15860
15860
// enabling pipeline parallelism in the scheduler increases memory usage, so it is only done when necessary
15861
- bool pipeline_parallel = llama_get_device_count() > 1 && model->n_gpu_layers > (int)model->hparams.n_layer && model->split_mode == LLAMA_SPLIT_MODE_LAYER;
15861
+ bool pipeline_parallel =
15862
+ llama_get_device_count() > 1 &&
15863
+ model->n_gpu_layers > (int)model->hparams.n_layer &&
15864
+ model->split_mode == LLAMA_SPLIT_MODE_LAYER &&
15865
+ params.offload_kqv;
15862
15866
#ifndef GGML_USE_CUDA
15863
15867
// pipeline parallelism requires support for async compute and events
15864
15868
// currently this is only implemented in the CUDA backend
You can’t perform that action at this time.
0 commit comments