diff --git a/examples/common.cpp b/examples/common.cpp index 23d69e7d5..7aa77587b 100644 --- a/examples/common.cpp +++ b/examples/common.cpp @@ -520,8 +520,9 @@ void console_init(console_state & con_st) { if (con_st.tty != nullptr) { con_st.out = con_st.tty; } -#endif + setlocale(LC_ALL, ""); +#endif } void console_cleanup(console_state & con_st) { diff --git a/ggml.c b/ggml.c index 27ac31008..275372aa9 100644 --- a/ggml.c +++ b/ggml.c @@ -11890,7 +11890,11 @@ typedef int ggml_lock_t; #define ggml_lock_init(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) +#endif #define ggml_lock_unlock(x) UNUSED(x) #define GGML_LOCK_INITIALIZER 0