Adding in the calls to mm_pause
This commit is contained in:
parent
3024fd6b26
commit
5978b6ebf0
1 changed files with 8 additions and 0 deletions
8
ggml.c
8
ggml.c
|
@ -19578,6 +19578,10 @@ static void ggml_graph_compute_thread_sync_node(int * node_n, struct ggml_comput
|
|||
|
||||
* node_n = atomic_load(&state->shared->node_n);
|
||||
if (* node_n != last_node_n) break;
|
||||
#if defined(__SSE3__)
|
||||
//Tell the processor we're spinning. It's a processor hint for spinlocks.
|
||||
_mm_pause();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19592,6 +19596,10 @@ static void ggml_graph_compute_thread_sync_task(int * task_phase, struct ggml_co
|
|||
|
||||
* task_phase = atomic_load(&state->shared->node_task);
|
||||
if (* task_phase != last_task_phase) break;
|
||||
#if defined(__SSE3__)
|
||||
//Tell the processor we're spinning. It's a processor hint for spinlocks.
|
||||
_mm_pause();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue