instead of checking on glibc, check on SYS_getcpu
This commit is contained in:
parent
a83e2cadc0
commit
5c0d49cde4
1 changed files with 1 additions and 1 deletions
2
ggml.c
2
ggml.c
|
@ -2322,7 +2322,6 @@ void ggml_numa_init(enum ggml_numa_strategy numa_flag) {
|
|||
// figure out which node we're on
|
||||
uint current_cpu;
|
||||
int getcpu_ret = 0;
|
||||
#if defined(__GLIBC__)
|
||||
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 28)
|
||||
getcpu_ret = getcpu(¤t_cpu, &g_state.numa.current_node);
|
||||
#else
|
||||
|
@ -2330,6 +2329,7 @@ void ggml_numa_init(enum ggml_numa_strategy numa_flag) {
|
|||
# if !defined(SYS_getcpu) && defined(SYS_get_cpu)
|
||||
# define SYS_getcpu SYS_get_cpu // some older glibc versions use this name
|
||||
# endif
|
||||
# if defined(SYS_getcpu)
|
||||
getcpu_ret = syscall(SYS_getcpu, ¤t_cpu, &g_state.numa.current_node);
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue