From b9185594afbe83aab5acadaef45ba8470797f732 Mon Sep 17 00:00:00 2001 From: Gregory Comer Date: Sun, 16 Feb 2025 17:45:44 -0800 Subject: [PATCH 1/2] Temporarily remove using-executorch-ios.md --- docs/source/using-executorch-ios.md | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 docs/source/using-executorch-ios.md diff --git a/docs/source/using-executorch-ios.md b/docs/source/using-executorch-ios.md deleted file mode 100644 index 79443127e74..00000000000 --- a/docs/source/using-executorch-ios.md +++ /dev/null @@ -1,3 +0,0 @@ -# Using ExecuTorch on iOS - -Placeholder for top-level iOS documentation \ No newline at end of file From 2b26fc417c296b4ddebc1880d87490254f5e9ffb Mon Sep 17 00:00:00 2001 From: Gregory Comer Date: Sun, 16 Feb 2025 17:55:06 -0800 Subject: [PATCH 2/2] Move Apple runtime docs to new location --- docs/source/using-executorch-android.md | 22 ++++++++++++++++++- ...ple-runtime.md => using-executorch-ios.md} | 14 ++++++------ 2 files changed, 28 insertions(+), 8 deletions(-) rename docs/source/{apple-runtime.md => using-executorch-ios.md} (94%) diff --git a/docs/source/using-executorch-android.md b/docs/source/using-executorch-android.md index 0af96283f2b..cedb355810b 100644 --- a/docs/source/using-executorch-android.md +++ b/docs/source/using-executorch-android.md @@ -1,3 +1,23 @@ # Using ExecuTorch on Android -Placeholder for top-level Android documentation \ No newline at end of file +To use from Android, ExecuTorch provides Java API bindings and Android platform integration, available as a AAR file. The ExecuTorch C++ APIs can also be used from Android native. + +## Installation + +TODO Instructions on downloading the pre-built AAR. Replace with Maven/Gradle package management when available. + +### Building from Source + +TODO Instructions on re-creating and customizing the Android AAR. + +## Android Backends + +TODO Describe commonly used backends, including XNN, Vulkan, and NPUs. + +## Runtime Integration + +TODO Code sample in Java + +## Next Steps + +TODO Link to Java API reference and other relevant material \ No newline at end of file diff --git a/docs/source/apple-runtime.md b/docs/source/using-executorch-ios.md similarity index 94% rename from docs/source/apple-runtime.md rename to docs/source/using-executorch-ios.md index 4114b780607..68599065f6a 100644 --- a/docs/source/apple-runtime.md +++ b/docs/source/using-executorch-ios.md @@ -1,6 +1,8 @@ -# Integrating and Running ExecuTorch on Apple Platforms +# Using ExecuTorch on iOS -**Author:** [Anthony Shoumikhin](https://github.com/shoumikhin) +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. + +## Integration The ExecuTorch Runtime for iOS and macOS is distributed as a collection of prebuilt [.xcframework](https://developer.apple.com/documentation/xcode/creating-a-multi-platform-binary-framework-bundle) binary targets. These targets are compatible with both iOS and macOS devices and simulators and are available in both release and debug modes: @@ -17,8 +19,6 @@ Link your binary with the ExecuTorch runtime and any backends or kernels used by **Note:** To access logs, link against the Debug build of the ExecuTorch runtime, i.e., the `executorch_debug` framework. For optimal performance, always link against the Release version of the deliverables (those without the `_debug` suffix), which have all logging overhead removed. -## Integration - ### Swift Package Manager The prebuilt ExecuTorch runtime, backend, and kernels are available as a [Swift PM](https://www.swift.org/documentation/package-manager/) package. @@ -84,9 +84,9 @@ swift package resolve swift build ``` -### Local Build +### Building from Source -Another way to integrate the ExecuTorch runtime is to build the necessary components from sources locally and link against them. This route is more involved but certainly doable. +Another way to integrate the ExecuTorch runtime is to build the necessary components from sources locally and link against them. This is useful when customizing the runtime. 1. Install [Xcode](https://developer.apple.com/xcode/resources/) 15+ and Command Line Tools: @@ -195,7 +195,7 @@ import ExecuTorch ### Logging -We provide extra APIs for logging in Objective-C and Swift as a lightweight wrapper of the internal ExecuTorch machinery. To use it, just import the main framework header in Objective-C. Then use the `ExecuTorchLog` interface (or the `Log` class in Swift) to subscribe your own implementation of the `ExecuTorchLogSink` protocol (or `LogSink` in Swift) to listen to log events. +ExecuTorch provides extra APIs for logging in Objective-C and Swift as a lightweight wrapper of the internal ExecuTorch machinery. To use it, just import the main framework header in Objective-C. Then use the `ExecuTorchLog` interface (or the `Log` class in Swift) to subscribe your own implementation of the `ExecuTorchLogSink` protocol (or `LogSink` in Swift) to listen to log events. ```objectivec #import