diff --git a/README.md b/README.md index dd1fafe715b..0629fba968d 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It supports a wide range of models including LLMs (Large Language Models), CV (C Platform Support: - Operating Systems: - iOS - - Mac + - MacOS (ARM64) - Android - Linux - Microcontrollers diff --git a/docs/source/backends-xnnpack.md b/docs/source/backends-xnnpack.md index 1fcc6d8c51b..1ff9023a1bf 100644 --- a/docs/source/backends-xnnpack.md +++ b/docs/source/backends-xnnpack.md @@ -14,7 +14,7 @@ The XNNPACK delegate is the ExecuTorch solution for CPU execution on mobile CPUs - ARM64 on Android, iOS, macOS, Linux, and Windows. - ARMv7 (with NEON) on Android. - ARMv6 (with VFPv2) on Linux. -- x86 and x86-64 (up to AVX512) on Windows, Linux, macOS, Android, and iOS simulator. +- x86 and x86-64 (up to AVX512) on Windows, Linux, and Android. ## Development Requirements diff --git a/docs/source/getting-started.md b/docs/source/getting-started.md index fbca80cf23b..6e99df32163 100644 --- a/docs/source/getting-started.md +++ b/docs/source/getting-started.md @@ -10,7 +10,7 @@ The following are required to install the ExecuTorch host libraries, needed to e - Python 3.10 - 3.12 - g++ version 7 or higher, clang++ version 5 or higher, or another C++17-compatible toolchain. -- Linux or MacOS operating system (Arm or x86). +- - Linux (x86_64 or ARM64) or macOS (ARM64). - Windows is supported via WSL. ## Installation diff --git a/docs/source/using-executorch-building-from-source.md b/docs/source/using-executorch-building-from-source.md index 668f696f040..7b21c00af9e 100644 --- a/docs/source/using-executorch-building-from-source.md +++ b/docs/source/using-executorch-building-from-source.md @@ -16,7 +16,7 @@ Linux (x86_64) - Ubuntu 20.04.6 LTS+ - RHEL 8+ -macOS (x86_64/M1/M2) +macOS (ARM64) - Big Sur (11.0)+ Windows (x86_64) diff --git a/docs/source/using-executorch-ios.md b/docs/source/using-executorch-ios.md index 1d03284ec2c..aa72d8242da 100644 --- a/docs/source/using-executorch-ios.md +++ b/docs/source/using-executorch-ios.md @@ -1,6 +1,6 @@ # Using ExecuTorch on iOS -ExecuTorch supports both iOS and macOS via Objective-C, Swift, and C++. ExecuTorch also provides backends to leverage Core ML and Metal Performance Shaders (MPS) for hardware-accelerated execution on Apple platforms. +ExecuTorch supports both iOS and macOS (ARM64) via Objective-C, Swift, and C++. ExecuTorch also provides backends to leverage Core ML and Metal Performance Shaders (MPS) for hardware-accelerated execution on Apple platforms. ## Integration diff --git a/install_requirements.py b/install_requirements.py index 6c3b4186697..6ad709f8cc6 100644 --- a/install_requirements.py +++ b/install_requirements.py @@ -58,6 +58,22 @@ def python_is_compatible(): return True +# PyTorch stopped building macOS x86_64 binaries starting with version 2.3.0 (January 2024). +def is_intel_mac_os(): + # Returns True if running on macOS with an Intel-based CPU. + if platform.system().lower() == "darwin" and platform.machine().lower() in ( + "x86", + "x86_64", + "i386", + ): + print( + "ERROR: ExecuTorch does not support Intel-based macOS platforms.", + file=sys.stderr, + ) + return True + return False + + # The pip repository that hosts nightly torch packages. TORCH_NIGHTLY_URL = "https://download.pytorch.org/whl/nightly/cpu" @@ -153,6 +169,8 @@ def main(args): if __name__ == "__main__": # Before doing anything, cd to the directory containing this script. os.chdir(os.path.dirname(os.path.abspath(__file__))) + if is_intel_mac_os(): + sys.exit(1) if not python_is_compatible(): sys.exit(1) main(sys.argv[1:])