mirror of
https://github.com/RYDE-WORK/llama.cpp.git
synced 2026-01-29 11:43:16 +08:00
use pause asm insn in busyloop to run the CPU (13600K) 10 °C cooler (#1314)
* use pause asm insn in busyloop to run the CPU (13600K) 10 °C cooler Tested with a 13B model. * use _mm_pause() in busyloop * use _mm_pause() in busyloop on x86_64 to reduce power consumption
This commit is contained in:
parent
41654efea8
commit
9f8dbc4787
4
ggml.c
4
ggml.c
@ -11663,7 +11663,11 @@ 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)
|
||||||
|
#if defined(__x86_64__) || (defined(_MSC_VER) && defined(_M_AMD64))
|
||||||
|
#define ggml_lock_lock(x) _mm_pause()
|
||||||
|
#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…
x
Reference in New Issue
Block a user