Skip to content

Commit

Permalink
llama : disable pipeline parallelism with nkvo (#7265)
Browse files Browse the repository at this point in the history
  • Loading branch information
slaren authored May 14, 2024
1 parent efc8f76 commit 5416002
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5416002

Please sign in to comment.