spin more

This commit is contained in:
slaren 2024-06-18 20:09:51 +02:00
parent e4643ad4d4
commit 7226483b06

2
ggml.c
View file

@ -18992,7 +18992,7 @@ static void ggml_barrier(struct ggml_compute_state * state) {
// wait for other threads
//while (atomic_load(n_barrier_passed) == passed_old) {
//}
const int n_spin_before_sleep = 100;
const int n_spin_before_sleep = 100000;
while (true) {
for (int i = 0; i < n_spin_before_sleep; i++) {
if (atomic_load(n_barrier_passed) != passed_old) {