From 33dd2f8f5e517f09871975f64db974acee3376b2 Mon Sep 17 00:00:00 2001 From: Chen Fu <1316708+chenfucn@users.noreply.github.com> Date: Tue, 18 Jan 2022 08:09:27 -0800 Subject: [PATCH] fix mac compilation error (#10268) Fix Mac compilation error in new cpuinfo changes --- onnxruntime/core/common/cpuid_info.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onnxruntime/core/common/cpuid_info.cc b/onnxruntime/core/common/cpuid_info.cc index 842e260c8b..b2590ccc3d 100644 --- a/onnxruntime/core/common/cpuid_info.cc +++ b/onnxruntime/core/common/cpuid_info.cc @@ -18,7 +18,7 @@ #endif #endif -#if defined(CPUIDINFO_ARCH_ARM) && defined(CPUINFO_SUPPORTED) +#if defined(CPUIDINFO_ARCH_ARM) && defined(CPUINFO_SUPPORTED) && defined(__linux__) #include #include // N.B. Support building with older versions of asm/hwcap.h that do not define @@ -109,7 +109,7 @@ CPUIDInfo::CPUIDInfo() { #endif #if defined(CPUIDINFO_ARCH_ARM) -#ifdef CPUINFO_SUPPORTED +#ifdef HWCAP_ASIMDDP // only works on ARM linux or android, does not work on Windows if (pytorch_cpuinfo_init_) {