fix mpi build
This commit is contained in:
parent
7f95379295
commit
d41b53ca7b
1 changed files with 2 additions and 1 deletions
|
@ -3680,6 +3680,7 @@ static bool llama_eval_internal(
|
||||||
GGML_ASSERT((!tokens && embd) || (tokens && !embd)); // NOLINT
|
GGML_ASSERT((!tokens && embd) || (tokens && !embd)); // NOLINT
|
||||||
|
|
||||||
const auto & cparams = lctx.cparams;
|
const auto & cparams = lctx.cparams;
|
||||||
|
|
||||||
const int n_ctx = cparams.n_ctx;
|
const int n_ctx = cparams.n_ctx;
|
||||||
const int n_batch = cparams.n_batch;
|
const int n_batch = cparams.n_batch;
|
||||||
|
|
||||||
|
@ -6456,7 +6457,7 @@ struct llama_context * llama_new_context_with_model(
|
||||||
if (ggml_mpi_rank(ctx->ctx_mpi) > 0) {
|
if (ggml_mpi_rank(ctx->ctx_mpi) > 0) {
|
||||||
// Enter a blocking eval loop with dummy input, letting rank=0 drive the process
|
// Enter a blocking eval loop with dummy input, letting rank=0 drive the process
|
||||||
const std::vector<llama_token> tmp(cparams.n_ctx, llama_token_bos(ctx));
|
const std::vector<llama_token> tmp(cparams.n_ctx, llama_token_bos(ctx));
|
||||||
while (!llama_eval(ctx, tmp.data(), tmp.size(), 0, 0)) {};
|
while (!llama_eval(ctx, tmp.data(), tmp.size(), 0)) {};
|
||||||
llama_backend_free();
|
llama_backend_free();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue