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