|
@@ -2154,7 +2154,10 @@ void ggml_numa_init(enum ggml_numa_strategy numa_flag) {
|
|
|
getcpu_ret = getcpu(¤t_cpu, &g_state.numa.current_node);
|
|
getcpu_ret = getcpu(¤t_cpu, &g_state.numa.current_node);
|
|
|
#else
|
|
#else
|
|
|
// old glibc doesn't have a wrapper for this call. Fall back on direct syscall
|
|
// old glibc doesn't have a wrapper for this call. Fall back on direct syscall
|
|
|
- getcpu_ret = syscall(SYS_getcpu,¤t_cpu,&g_state.numa.current_node);
|
|
|
|
|
|
|
+# if !defined(SYS_getcpu) && defined(SYS_get_cpu)
|
|
|
|
|
+# define SYS_getcpu SYS_get_cpu // some older glibc versions use this name
|
|
|
|
|
+# endif
|
|
|
|
|
+ getcpu_ret = syscall(SYS_getcpu, ¤t_cpu, &g_state.numa.current_node);
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
if (g_state.numa.n_nodes < 1 || g_state.numa.total_cpus < 1 || getcpu_ret != 0) {
|
|
if (g_state.numa.n_nodes < 1 || g_state.numa.total_cpus < 1 || getcpu_ret != 0) {
|