Skip to content

Commit

Permalink
perplexity : fix MSVC build after #5020
Browse files Browse the repository at this point in the history
  • Loading branch information
cebtenzzre committed Jan 19, 2024
1 parent 381ee19 commit e15c616
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/perplexity/perplexity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int> 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);
Expand Down

0 comments on commit e15c616

Please sign in to comment.