You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/demo-apps/apple_ios/LLaMA/README.md
+27-3Lines changed: 27 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -33,17 +33,41 @@ First it’s important to note that currently ExecuTorch provides support across
33
33
## How to Use the App
34
34
This section will provide the main steps to use the app, along with a code snippet of the ExecuTorch API.
35
35
36
-
```{note}
36
+
### Swift Package Manager
37
+
37
38
ExecuTorch runtime is distributed as a Swift package providing some .xcframework as prebuilt binary targets.
38
39
Xcode will download and cache the package on the first run, which will take some time.
40
+
41
+
Note: If you're running into any issues related to package dependencies, quit Xcode entirely, delete the whole executorch repo, clean the caches by running the command below in terminal and clone the repo again.
42
+
43
+
```rm -rf \
44
+
~/Library/org.swift.swiftpm \
45
+
~/Library/Caches/org.swift.swiftpm \
46
+
~/Library/Caches/com.apple.dt.Xcode \
47
+
~/Library/Developer/Xcode/DerivedData
39
48
```
40
49
50
+
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.
51
+
52
+
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.
53
+
54
+
For more details integrating and Running ExecuTorch on Apple Platforms, checkout this [link](https://pytorch.org/executorch/main/apple-runtime.html).
55
+
56
+
### XCode
41
57
* Open XCode and select "Open an existing project" to open `examples/demo-apps/apple_ios/LLama`.
42
-
* Ensure that the ExecuTorch package dependencies are installed correctly.
58
+
* Ensure that the ExecuTorch package dependencies are installed correctly, then select which ExecuTorch framework should link against which target.
59
+
60
+
<palign="center">
61
+
<imgsrc="docs/screenshots/ios_demo_app_swift_pm.png"alt="iOS LLaMA App Swift PM"width="600">
@@ -78,6 +78,21 @@ The prebuilt ExecuTorch runtime, backend, and kernels are available as a Swift P
78
78
### Xcode
79
79
Open the project in Xcode.In Xcode, go to `File > Add Package Dependencies`. Paste the URL of the ExecuTorch repo into the search bar and select it. Make sure to change the branch name to the desired ExecuTorch version, e.g., “0.3.0”, or just use the “latest” branch name for the latest stable build.
80
80
81
+
Note: If you're running into any issues related to package dependencies, quit Xcode entirely, delete the whole executorch repo, clean the caches by running the command below in terminal and clone the repo again.
82
+
83
+
```rm -rf \
84
+
~/Library/org.swift.swiftpm \
85
+
~/Library/Caches/org.swift.swiftpm \
86
+
~/Library/Caches/com.apple.dt.Xcode \
87
+
~/Library/Developer/Xcode/DerivedData
88
+
```
89
+
90
+
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.
91
+
92
+
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.
93
+
94
+
For more details integrating and Running ExecuTorch on Apple Platforms, checkout this [link](https://pytorch.org/executorch/main/apple-runtime.html).
95
+
81
96
<palign="center">
82
97
<imgsrc="../screenshots/ios_demo_app_swift_pm.png"alt="iOS LLaMA App Swift PM"width="600">
@@ -78,6 +78,21 @@ The prebuilt ExecuTorch runtime, backend, and kernels are available as a Swift P
78
78
### Xcode
79
79
Open the project in Xcode.In Xcode, go to `File > Add Package Dependencies`. Paste the URL of the ExecuTorch repo into the search bar and select it. Make sure to change the branch name to the desired ExecuTorch version, e.g., “0.3.0”, or just use the “latest” branch name for the latest stable build.
80
80
81
+
Note: If you're running into any issues related to package dependencies, quit Xcode entirely, delete the whole executorch repo, clean the caches by running the command below in terminal and clone the repo again.
82
+
83
+
```rm -rf \
84
+
~/Library/org.swift.swiftpm \
85
+
~/Library/Caches/org.swift.swiftpm \
86
+
~/Library/Caches/com.apple.dt.Xcode \
87
+
~/Library/Developer/Xcode/DerivedData
88
+
```
89
+
90
+
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.
91
+
92
+
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.
93
+
94
+
For more details integrating and Running ExecuTorch on Apple Platforms, checkout this [link](https://pytorch.org/executorch/main/apple-runtime.html).
95
+
81
96
<palign="center">
82
97
<imgsrc="../screenshots/ios_demo_app_swift_pm.png"alt="iOS LLaMA App Swift PM"width="600">
0 commit comments