From a46f12c50865ecc617b6c0a329e50d525855d8ff Mon Sep 17 00:00:00 2001 From: Max Ren Date: Mon, 14 Aug 2023 10:51:20 -0700 Subject: [PATCH] Update ExecuTorch cpuinfo generate-wrapper script (#58) Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/58 Current there is an error with cpuinfo build in executorch updating the following line in the generate-wrapper script and regenerating seems to fix Reviewed By: larryliu0820 Differential Revision: D48277357 fbshipit-source-id: ac85bb80e8a1f971f3860f1428cd044b5d8e98dd --- backends/xnnpack/third-party/cpuinfo-wrappers/arm/mach/init.c | 4 ++-- backends/xnnpack/third-party/generate-cpuinfo-wrappers.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/xnnpack/third-party/cpuinfo-wrappers/arm/mach/init.c b/backends/xnnpack/third-party/cpuinfo-wrappers/arm/mach/init.c index 47a71a6ba72..6316d8efd4f 100644 --- a/backends/xnnpack/third-party/cpuinfo-wrappers/arm/mach/init.c +++ b/backends/xnnpack/third-party/cpuinfo-wrappers/arm/mach/init.c @@ -4,6 +4,6 @@ #include #endif /* __APPLE__ */ -#if (defined(__arm__) || defined(__aarch64__)) && defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE +#if (defined(__arm__) || defined(__aarch64__)) && defined(TARGET_OS_MAC) && TARGET_OS_MAC #include -#endif /* (defined(__arm__) || defined(__aarch64__)) && defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE */ +#endif /* (defined(__arm__) || defined(__aarch64__)) && defined(TARGET_OS_MAC) && TARGET_OS_MAC */ diff --git a/backends/xnnpack/third-party/generate-cpuinfo-wrappers.py b/backends/xnnpack/third-party/generate-cpuinfo-wrappers.py index 4d5f2a1dce4..a04ef9e1dcf 100644 --- a/backends/xnnpack/third-party/generate-cpuinfo-wrappers.py +++ b/backends/xnnpack/third-party/generate-cpuinfo-wrappers.py @@ -63,7 +63,7 @@ "(defined(__arm__) || defined(__aarch64__)) && defined(__ANDROID__)": [ "arm/android/properties.c", ], - "(defined(__arm__) || defined(__aarch64__)) && defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE": [ + "(defined(__arm__) || defined(__aarch64__)) && defined(TARGET_OS_MAC) && TARGET_OS_MAC": [ "arm/mach/init.c", ],}