Skip to content

Commit 930abb5

Browse files
authored
Revise ExecuTorch documentation for Apple runtime (pytorch#15293)
1 parent 5d71c9b commit 930abb5

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed
-194 Bytes
Loading

docs/source/using-executorch-ios.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ The ExecuTorch Runtime for iOS and macOS (ARM64) is distributed as a collection
1818

1919
Link your binary with the ExecuTorch runtime and any backends or kernels used by the exported ML model. It is recommended to link the core runtime to the components that use ExecuTorch directly, and link kernels and backends against the main app target.
2020

21-
**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.
21+
**Note:** You may need to add some extra linker flags for the build settings of the components that links against ExecuTorch backends or kernels to let them register properly at the app startup. See the [Linkage](#Linkage) section for more details.
22+
23+
**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. See the [Logging](#Logging) section for more details.
2224

2325
### Swift Package Manager
2426

2527
The prebuilt ExecuTorch runtime, backend, and kernels are available as a [Swift PM](https://www.swift.org/documentation/package-manager/) package.
2628

2729
#### Xcode
2830

29-
In Xcode, go to `File > Add Package Dependencies`. Paste the URL of the [ExecuTorch repo](https://github.com/pytorch/executorch) into the search bar and select it. Make sure to change the branch name to the desired ExecuTorch version in format "swiftpm-<version>", (e.g. "swiftpm-0.7.0"), or a branch name in format "swiftpm-<version>.<year_month_date>" (e.g. "swiftpm-0.8.0-20250801") for a [nightly build](https://ossci-ios.s3.amazonaws.com/list.html) on a specific date.
31+
In Xcode, go to `File > Add Package Dependencies`. Paste the URL of the [ExecuTorch repo](https://github.com/pytorch/executorch) into the search bar and select it. Make sure to change the branch name to the desired ExecuTorch version in format "swiftpm-<version>", (e.g. "swiftpm-1.0.0"), or a branch name in format "swiftpm-<version>.<year_month_date>" (e.g. "swiftpm-1.1.0-20251101") for a [nightly build](https://ossci-ios.s3.amazonaws.com/list.html) on a specific date.
3032

3133
![](_static/img/swiftpm_xcode1.png)
3234

@@ -59,7 +61,7 @@ let package = Package(
5961
],
6062
dependencies: [
6163
// Use "swiftpm-<version>.<year_month_day>" branch name for a nightly build.
62-
.package(url: "https://github.com/pytorch/executorch.git", branch: "swiftpm-0.7.0")
64+
.package(url: "https://github.com/pytorch/executorch.git", branch: "swiftpm-1.0.0")
6365
],
6466
targets: [
6567
.target(
@@ -70,6 +72,10 @@ let package = Package(
7072
.product(name: "kernels_optimized", package: "executorch"),
7173
// Add other backends and kernels as needed.
7274
]),
75+
linkerSettings: [
76+
// Force load all symbols from static libraries to trigger backends and kernels registration
77+
.unsafeFlags(["-Wl,-all_load"])
78+
]
7379
]
7480
)
7581
```

0 commit comments

Comments
 (0)