use pause asm insn in busyloop to run the CPU (13600K) 10 °C cooler
Tested with a 13B model.
This commit is contained in:
parent
c65a7fbfa9
commit
458aeb10e9
1 changed files with 7 additions and 0 deletions
7
ggml.c
7
ggml.c
|
@ -11656,7 +11656,14 @@ typedef int ggml_lock_t;
|
||||||
|
|
||||||
#define ggml_lock_init(x) UNUSED(x)
|
#define ggml_lock_init(x) UNUSED(x)
|
||||||
#define ggml_lock_destroy(x) UNUSED(x)
|
#define ggml_lock_destroy(x) UNUSED(x)
|
||||||
|
#ifdef __x86_64__
|
||||||
|
static inline void ggml_lock_lock(void* x);
|
||||||
|
inline void ggml_lock_lock(void* x) {
|
||||||
|
__asm__ __volatile__("pause\n");
|
||||||
|
}
|
||||||
|
#else
|
||||||
#define ggml_lock_lock(x) UNUSED(x)
|
#define ggml_lock_lock(x) UNUSED(x)
|
||||||
|
#endif
|
||||||
#define ggml_lock_unlock(x) UNUSED(x)
|
#define ggml_lock_unlock(x) UNUSED(x)
|
||||||
|
|
||||||
#define GGML_LOCK_INITIALIZER 0
|
#define GGML_LOCK_INITIALIZER 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue