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: CONTRIBUTING.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,8 +24,8 @@ For Apple, please refer to the [iOS documentation](docs/source/using-executorch-
24
24
executorch
25
25
├── <ahref="backends">backends</a> - Backend delegate implementations for various hardware targets. Each backend uses partitioner to split the graph into subgraphs that can be executed on specific hardware, quantizer to optimize model precision, and runtime components to execute the graph on target hardware. For details refer to the <ahref="docs/source/backend-delegates-integration.md">backend documentation</a> and the <ahref="docs/source/using-executorch-export.md">Export and Lowering tutorial</a> for more information.
│ │ ├── <ahref="backends/apple/coreml">coreml</a> - CoreML backend for Apple devices. See <ahref="docs/source/backends-coreml.md">doc</a>.
28
-
│ │ └── <ahref="backends/apple/mps">mps</a> - Metal Performance Shaders backend for Apple devices. See <ahref="docs/source/backends-mps.md">doc</a>.
27
+
│ │ ├── <ahref="backends/apple/coreml">coreml</a> - CoreML backend for Apple devices. See <ahref="docs/source/backends/coreml/coreml-overview.md">doc</a>.
28
+
│ │ └── <ahref="backends/apple/mps">mps</a> - Metal Performance Shaders backend for Apple devices. See <ahref="docs/source/backends/mps/mps-overview.md">doc</a>.
29
29
│ ├── <ahref="backends/arm">arm</a> - ARM architecture backends. See <ahref="docs/source/backends-arm-ethos-u.md">doc</a>.
30
30
│ ├── <ahref="backends/cadence">cadence</a> - Cadence-specific backends. See <ahref="docs/source/backends-cadence.md">doc</a>.
31
31
│ ├── <ahref="backends/example">example</a> - Example backend implementations.
Copy file name to clipboardExpand all lines: backends/apple/coreml/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# ExecuTorch Core ML Delegate
2
2
3
3
This subtree contains the Core ML Delegate implementation for ExecuTorch.
4
-
Core ML is an optimized framework for running machine learning models on Apple devices. The delegate is the mechanism for leveraging the Core ML framework to accelerate operators when running on Apple devices. To learn how to use the CoreML delegate, see the [documentation](https://github.com/pytorch/executorch/blob/main/docs/source/backends-coreml.md).
4
+
Core ML is an optimized framework for running machine learning models on Apple devices. The delegate is the mechanism for leveraging the Core ML framework to accelerate operators when running on Apple devices. To learn how to use the CoreML delegate, see the [documentation](https://github.com/pytorch/executorch/blob/main/docs/source/backends/coreml/coreml-overview.md).
5
5
6
6
## Layout
7
7
-`compiler/` : Lowers a module to Core ML backend.
Copy file name to clipboardExpand all lines: docs/source/backends/mps/mps-overview.md
+15-48Lines changed: 15 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,55 +1,27 @@
1
1
# MPS Backend
2
2
3
-
In this tutorial we will walk you through the process of getting setup to build the MPS backend for ExecuTorch and running a simple model on it.
3
+
MPS delegate is the ExecuTorch solution to take advantage of Apple's GPU for on-device ML using the [MPS Graph](https://developer.apple.com/documentation/metalperformanceshadersgraph/mpsgraph?language=objc) framework and tuned kernels provided by [MPS](https://developer.apple.com/documentation/metalperformanceshaders?language=objc).
4
4
5
-
The MPS backend device maps machine learning computational graphs and primitives on the [MPS Graph](https://developer.apple.com/documentation/metalperformanceshadersgraph/mpsgraph?language=objc) framework and tuned kernels provided by [MPS](https://developer.apple.com/documentation/metalperformanceshaders?language=objc).
5
+
## Target Requirements
6
6
7
-
::::{grid} 2
8
-
:::{grid-item-card} What you will learn in this tutorial:
9
-
:class-card: card-prerequisites
10
-
* In this tutorial you will learn how to export [MobileNet V3](https://pytorch.org/vision/main/models/mobilenetv3.html) model to the MPS delegate.
11
-
* You will also learn how to compile and deploy the ExecuTorch runtime with the MPS delegate on macOS and iOS.
12
-
:::
13
-
:::{grid-item-card} Tutorials we recommend you complete before this:
14
-
:class-card: card-prerequisites
15
-
*[Introduction to ExecuTorch](intro-how-it-works.md)
16
-
*[Getting Started](getting-started.md)
17
-
*[Building ExecuTorch with CMake](using-executorch-building-from-source.md)
In order to be able to successfully build and run a model using the MPS backend for ExecuTorch, you'll need the following hardware and software components:
16
+
Before starting, make sure you install the Xcode Command Line Tools:
27
17
28
-
### Hardware:
29
-
- A [mac](https://www.apple.com/mac/) for tracing the model
***Step 1.*** Complete the steps in [Getting Started](getting-started.md) to set up the ExecuTorch development environment.
44
-
45
-
You will also need a local clone of the ExecuTorch repository. See [Building ExecuTorch from Source](using-executorch-building-from-source.html) for instructions. All commands in this document should be run from the executorch repository.
46
-
47
-
## Build
18
+
```bash
19
+
xcode-select --install
20
+
```
48
21
49
-
### AOT (Ahead-of-time) Components
22
+
##Using the MPS Backend
50
23
51
-
**Compiling model for MPS delegate**:
52
-
- In this step, you will generate a simple ExecuTorch program that lowers MobileNetV3 model to the MPS delegate. You'll then pass this Program (the `.pte` file) during the runtime to run it using the MPS backend.
24
+
In this step, you will generate a simple ExecuTorch program that lowers MobileNetV3 model to the MPS delegate. You'll then pass this Program (the `.pte` file) during the runtime to run it using the MPS backend.
***Step 1***. Create the ExecuTorch core and MPS delegate frameworks to link on iOS
127
99
```bash
@@ -146,8 +118,3 @@ From the same page, include the needed libraries for the MPS delegate:
146
118
-`Metal.framework`
147
119
148
120
In this tutorial, you have learned how to lower a model to the MPS delegate, build the mps_executor_runner and run a lowered model through the MPS delegate, or directly on device using the MPS delegate static library.
149
-
150
-
151
-
## Frequently encountered errors and resolution.
152
-
153
-
If you encountered any bugs or issues following this tutorial please file a bug/issue on the [ExecuTorch repository](https://github.com/pytorch/executorch/issues), with hashtag **#mps**.
Copy file name to clipboardExpand all lines: docs/source/quantization-overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ These quantizers usually support configs that allow users to specify quantizatio
29
29
Not all quantization options are supported by all backends. Consult backend-specific guides for supported quantization modes and configuration, and how to initialize the backend-specific PT2E quantizer:
Copy file name to clipboardExpand all lines: docs/source/using-executorch-export.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,8 +33,8 @@ As part of the .pte file creation process, ExecuTorch identifies portions of the
33
33
Commonly used hardware backends are listed below. For mobile, consider using XNNPACK for Android and XNNPACK or Core ML for iOS. To create a .pte file for a specific backend, pass the appropriate partitioner class to `to_edge_transform_and_lower`. See the appropriate backend documentation and the [Export and Lowering](#export-and-lowering) section below for more information.
0 commit comments