Skip to content

Commit

Permalink
Move Apple runtime docs to new location
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryComer committed Feb 17, 2025
1 parent b918559 commit 2b26fc4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
22 changes: 21 additions & 1 deletion docs/source/using-executorch-android.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Using ExecuTorch on Android

Placeholder for top-level Android documentation
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
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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.
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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 <ExecuTorch/ExecuTorch.h>
Expand Down

0 comments on commit 2b26fc4

Please sign in to comment.