Skip to content

LLM inference in C/C++

C++ ggml

tests: synchronize save-load-state generation (#26056)

helanfxzd67c0b410711
diff --git a/tests/test-save-load-state.cpp b/tests/test-save-load-state.cpp
index 6e93ce6fb8..bbb025617f 100644
--- a/tests/test-save-load-state.cpp
+++ b/tests/test-save-load-state.cpp
@@ -44,6 +44,8 @@ static llama_tokens generate_tokens(llama_context * ctx, llama_sampler * smpl, i
n_past++;
}
+ llama_synchronize(ctx);
+
return result;
}