ET][Docs] Update setup_et and examples/README.md to use `executor_runner`
Summary: As title
Reviewed By: mergennachin, kimishpatel, dbort
Differential Revision: D47890317
fbshipit-source-id: feb9e2d654686262bd71071d2165432fd31012d9
diff --git a/docs/website/docs/tutorials/00_setting_up_executorch.md b/docs/website/docs/tutorials/00_setting_up_executorch.md
index ae5a611..11879da 100644
--- a/docs/website/docs/tutorials/00_setting_up_executorch.md
+++ b/docs/website/docs/tutorials/00_setting_up_executorch.md
@@ -61,14 +61,6 @@
>>> open("add.ff", "wb").write(exir.capture(m, m.get_random_inputs()).to_edge().to_executorch().buffer)
```
-If exporting mobilenet v2/v3, run `install_requirements.sh`.
-
-```bash
-bash examples/install_requirements.sh
-
-python3 -m examples.export.export_example --model_name="mv2"
-```
-
## Runtime Setup
**Step 1: Install buck2**
@@ -85,10 +77,10 @@
**Step 2: Build a binary**
-`size_test_all_ops` is a binary including all the operators and backends
+`executor_runner` is an example wrapper around executorch runtime which includes all the operators and backends
```bash
-/tmp/buck2 build //test:size_test_all_ops --show-output
+/tmp/buck2 build //examples/executor_runner:executor_runner --show-output
```
The `--show-output` flag will print the path to the executable if you want to run it directly.
@@ -102,14 +94,19 @@
```bash
# add.ff is the program generated from export_example.py during AOT Setup Step 3
-/tmp/buck2 run //test:size_test_all_ops -- add.ff
+/tmp/buck2 run //examples/executor_runner:executor_runner -- --model_path add.ff
# To run a delegated model
-/tmp/buck2 run //test:size_test_all_ops -- composite_model.ff
+/tmp/buck2 run //examples/executor_runner:executor_runner -- --model_path composite_model.ff
```
or execute the binary directly from the `--show-output` path shown when building.
```bash
-./buck-out/.../size_test_all_ops add.ff
+./buck-out/.../executor_runner --model_path add.ff
```
+
+## More examples
+
+The `executorch/examples` directory contains useful scripts with a guide to lower and run
+popular models like MobileNetv2 on Executorch.
diff --git a/examples/README.md b/examples/README.md
index 846d3a4..f9ce98b 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -1,9 +1,59 @@
+# Examples
+
+This dir contains scripts and other helper utilities to illustrate an end-to-end workflow to run a torch.nn.module on the Executorch runtime.
+It also includes a list of modules, from a simple `Add` to a full model like `MobileNetv2` and `MobileNetv3`, with more to come.
+
+
+## Directory structure
+```bash
+examples
+├── executor_runner # This is an example C++ wrapper around the ET runtime
+├── export # Python helper scripts to illustrate export workflow
+├── models # Contains a set of simple to PyTorch models
+└── README.md # This file
+```
+
+## Using the examples
+
+We will walk through an example model to generate a binary file from a python torch.nn.module
+from the `models` dir using scripts from the `export` dir. Then we will run on these binary
+model files on the Executorch (ET) runtime. For that we will use `executor_runner`. It is a simple
+wrapper for the Executorch runtime to serve as an example. Although simple, it is capable of loading
+and executing previously exported binary file(s).
+
+
+1. Following the setup guide in [Setting up ExecuTorch from GitHub](/docs/website/docs/tutorials/00_setting_up_executorch.md)
+you should be able to get the basic development environment for Executorch working.
+
+2. Using the script `export/export_example.py` generate a model binary file by selecting a
+model name from the list of available models in the `models` dir.
+
+
+```bash
+cd executorch # To the top level dir
+
+bash examples/install_requirements.sh
+
+python3 -m examples.export.export_example --model_name="mv2" # for MobileNetv2
+
+# This should generate ./mv2.ff file, if successful.
+```
+
+3. Once we have the model binary (ff) file, then let's run it with Executorch runtime using the `executor_runner`.
+
+```bash
+buck2 run examples/executor_runner:executor_runner -- --model_path mv2.ff
+```
+
+For MobileNetv3, change the model name and the corrosponding binary filename from "mv2" to "mv3".
+
## Dependencies
Various models listed in this directory have dependencies on some other packages, e.g. torchvision, torchaudio.
In order to make sure model's listed in examples are importable, e.g. via
-```
+
+```python
from executorch.examples.models.mobilenet_v3d import MV3Model
m = MV3Model.get_model()
```
-we need to have appropriate packages installed. You should install these deps via install_requirements.sh
+we need to have appropriate packages installed. You should install these deps via install_requirements.sh.