Use yield on aarch in spin locks

This commit is contained in:
Justine Tunney 2023-05-11 02:55:41 -07:00
parent cba15bc77a
commit dbb8d66f22
No known key found for this signature in database
GPG key ID: BE714B4575D6E328

View file

@ -11628,6 +11628,8 @@ typedef int ggml_lock_t;
#define ggml_lock_destroy(x) UNUSED(x)
#if defined(__x86_64__) || (defined(_MSC_VER) && defined(_M_AMD64))
#define ggml_lock_lock(x) _mm_pause()
#elif defined(__aarch64__)
#define ggml_lock_lock(x) asm("yield")
#else
#define ggml_lock_lock(x) UNUSED(x)
#endif