Skip to content

Commit cf874ca

Browse files
committed
Update docs after moving Android ExecuTorchDemo app
1 parent 9346fbe commit cf874ca

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

docs/source/demo-apps-android.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/source/getting-started.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The following are required to install the ExecuTorch host libraries, needed to e
1414
- Windows is supported via WSL.
1515

1616
## Installation
17-
To use ExecuTorch, you will need to install both the Python package and the appropriate platform-specific runtime libraries. Pip is the recommended way to install the ExecuTorch python package.
17+
To use ExecuTorch, you will need to install both the Python package and the appropriate platform-specific runtime libraries. Pip is the recommended way to install the ExecuTorch python package.
1818

1919
This package includes the dependencies needed to export a PyTorch model, as well as Python runtime bindings for model testing and evaluation. Consider installing ExecuTorch within a virtual environment, such as one provided by [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html#creating-environments) or [venv](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-and-use-virtual-environments).
2020

@@ -72,7 +72,7 @@ Quantization can also be done at this stage to reduce model size and runtime. Qu
7272

7373
### Testing the Model
7474

75-
After successfully generating a .pte file, it is common to use the Python runtime APIs to validate the model on the development platform. This can be used to evaluate model accuracy before running on-device.
75+
After successfully generating a .pte file, it is common to use the Python runtime APIs to validate the model on the development platform. This can be used to evaluate model accuracy before running on-device.
7676

7777
For the MobileNet V2 model from torchvision used in this example, image inputs are expected as a normalized, float32 tensor with a dimensions of (batch, channels, height, width). The output See [torchvision.models.mobilenet_v2](https://pytorch.org/vision/main/models/generated/torchvision.models.mobilenet_v2.html) for more information on the input and output tensor format for this model.
7878

@@ -103,20 +103,13 @@ Quick Links:
103103
### Android
104104

105105
#### Installation
106-
ExecuTorch provides Java bindings for Android usage, which can be consumed from both Java and Kotlin.
107-
To add the library to your app, download the AAR, and add it to the gradle build rule.
106+
ExecuTorch provides Java bindings for Android usage, which can be consumed from both Java and Kotlin.
107+
To add the library to your app, add the following dependency to gradle build rule.
108108

109-
```
110-
mkdir -p app/libs
111-
curl https://ossci-android.s3.amazonaws.com/executorch/release/v0.5.0-rc3/executorch.aar -o app/libs/executorch.aar
112-
```
113-
And in gradle,
114109
```
115110
# app/build.gradle.kts
116111
dependencies {
117-
implementation(files("libs/executorch.aar"))
118-
implementation("com.facebook.soloader:soloader:0.10.5")
119-
implementation("com.facebook.fbjni:fbjni:0.5.1")
112+
implementation("org.pytorch:executorch-android:0.5.1")
120113
}
121114
```
122115

@@ -137,7 +130,7 @@ EValue[] output = model.forward(input_evalue);
137130
float[] scores = output[0].toTensor().getDataAsFloatArray();
138131
```
139132

140-
For a full example of running a model on Android, see the [ExecuTorch Android Demo App](https://github.com/pytorch/executorch/blob/main/examples/demo-apps/android/ExecuTorchDemo/app/src/main/java/com/example/executorchdemo/ClassificationActivity.java). For more information on Android development, including building from source, a full description of the Java APIs, and information on using ExecuTorch from Android native code, see [Using ExecuTorch on Android](using-executorch-android.md).
133+
For a full example of running a model on Android, see the [DeepLabV3AndroidDemo](https://github.com/pytorch-labs/executorch-examples/tree/main/dl3/android/DeepLabV3Demo). For more information on Android development, including building from source, a full description of the Java APIs, and information on using ExecuTorch from Android native code, see [Using ExecuTorch on Android](using-executorch-android.md).
141134

142135
### iOS
143136

docs/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Welcome to the ExecuTorch Documentation
3131
</div>
3232

3333
The ExecuTorch source is hosted on GitHub at
34-
https://github.com/pytorch/executorch.
34+
https://github.com/pytorch/executorch.
3535

3636
Join us on `Discord <https://discord.com/invite/Dh43CKSAdc>`__ if you have questions
3737
about ExecuTorch or would like to become a contributor!
@@ -103,7 +103,7 @@ Topics in this section will help you get started with ExecuTorch.
103103
:caption: Examples
104104
:hidden:
105105

106-
demo-apps-android.md
106+
Building an ExecuTorch Android Demo App <https://github.com/pytorch-labs/executorch-examples/tree/main/dl3/android/DeepLabV3Demo#executorch-android-demo-app>
107107
demo-apps-ios.md
108108

109109
.. toctree::

docs/source/using-executorch-android.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public class MainActivity extends Activity {
176176
```
177177
This example loads an ExecuTorch module, prepares input data, runs inference, and processes the output data.
178178

179-
Please use [ExecuTorchDemo](https://github.com/pytorch/executorch/tree/main/examples/demo-apps/android/ExecuTorchDemo)
179+
Please use [DeepLabV3AndroidDemo](https://github.com/pytorch-labs/executorch-examples/tree/main/dl3/android/DeepLabV3Demo)
180180
and [LlamaDemo](https://github.com/pytorch/executorch/tree/main/examples/demo-apps/android/LlamaDemo) for the code examples
181181
using ExecuTorch AAR package.
182182

0 commit comments

Comments
 (0)