From e15c61635f57d661c53c82a4ce83144c2d76badf Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Fri, 19 Jan 2024 16:38:29 -0500 Subject: [PATCH] perplexity : fix MSVC build after #5020 --- examples/perplexity/perplexity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/perplexity/perplexity.cpp b/examples/perplexity/perplexity.cpp index b07320190..b86a688e1 100644 --- a/examples/perplexity/perplexity.cpp +++ b/examples/perplexity/perplexity.cpp @@ -469,7 +469,7 @@ static void compute_logprobs(const float * batch_logits, int n_vocab, std::vecto size_t max_threads = std::min((eval_pairs.size() + k_token_chunk - 1)/k_token_chunk, workers.size()); std::atomic counter(0); - auto compute = [&counter, &eval_pairs, &eval_results, batch_logits, n_vocab] () { + auto compute = [&counter, &eval_pairs, &eval_results, batch_logits, n_vocab, k_token_chunk] () { float local_logprobs[k_token_chunk]; while (true) { size_t first = counter.fetch_add(k_token_chunk, std::memory_order_relaxed);