Skip to content

Commit 12bb0e7

Browse files
ozgecinkosvekars
andauthored
[Docathon] Fix docathon content issues (#19444)
### Summary Fixes #19258 Updated several documentation pages from the docathon issue: - Fixed empty wrapper pages for desktop Core ML, desktop MPS, and embedded Arm Ethos-U by pointing them to the correct backend overview docs. - Removed unnecessary single-entry Arm Ethos-U and Arm VGF tutorial index pages and linked directly to the Getting Started tutorials. - Fixed the empty Runtime subsection in the Arm VGF tutorial. - Expanded the Backend Dialect section in the Export IR specification with a short explanation and pointer to the detailed doc. - Clarified the API Life Cycle “How to Mark API State” table. - Fixed the `quantize_` typo in XNNPACK quantization docs. - Updated Samsung Exynos navigation after Cadence and linked the Android Samsung wrapper to the real Samsung overview page. - Updated the Tools section Model Visualization link to point to `visualize.md`. ### Test plan - Ran `git diff --check`. - Manually checked that old broken references and typos are no longer present with `rg`. - Ran a local Sphinx docs build: ```bash LC_ALL=C python -m sphinx -b html docs/source /private/tmp/executorch-docs-html -W --keep-going ``` cc @mergennachin @AlannaBurke @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
1 parent f2f0b72 commit 12bb0e7

17 files changed

Lines changed: 155 additions & 58 deletions

docs/source/android-examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
- [Working with LLMs - Android Examples](https://github.com/meta-pytorch/executorch-examples/blob/main/llm/android/LlamaDemo/README.md) - ExecuTorch Llama Android Demo App
44
- [Demo Apps](https://github.com/meta-pytorch/executorch-examples/tree/main/dl3/android/DeepLabV3Demo#executorch-android-demo-app) - DeepLab v3 model for image segmentation
5-
- {doc}`backends/arm-vgf/tutorials/arm-vgf-tutorials` — Export a simple PyTorch model for the ExecuTorch VGF backend
5+
- {doc}`backends/arm-vgf/tutorials/vgf-getting-started` — Export a simple PyTorch model for the ExecuTorch VGF backend
66

77
```{toctree}
88
:hidden:
9-
backends/arm-vgf/tutorials/arm-vgf-tutorials
9+
backends/arm-vgf/tutorials/vgf-getting-started
1010
```
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
```{include} backends-samsung-exynos.md
1+
```{include} backends/samsung/samsung-overview.md
2+
```

docs/source/api-life-cycle.md

Lines changed: 113 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -80,78 +80,149 @@ communicate state to developers.
8080
<tr>
8181
<td><strong>Language</strong>
8282
</td>
83+
<td><strong>API state</strong>
84+
</td>
8385
<td><strong>Code</strong>
8486
</td>
8587
<td><strong>Documentation</strong>
8688
</td>
8789
</tr>
90+
<tr>
91+
<td>All
92+
</td>
93+
<td>Stable
94+
</td>
95+
<td>
96+
97+
No annotation is required. APIs are considered stable if they are not marked as
98+
experimental or deprecated.
99+
100+
</td>
101+
<td>
102+
103+
No warning is required.
104+
105+
</td>
106+
</tr>
107+
<tr>
108+
<td>All
109+
</td>
110+
<td>Deleted
111+
</td>
112+
<td>
113+
114+
Remove the API from code after the deprecation period has passed.
115+
116+
</td>
117+
<td>
118+
119+
Remove references to the deleted API from documentation.
120+
121+
</td>
122+
</tr>
88123
<tr>
89124
<td>Python
90125
</td>
126+
<td>Deprecated
127+
</td>
91128
<td>
92129

93130
Use the
94131
<a href="https://github.com/pytorch/executorch/blob/main/exir/_warnings.py">executorch.exir._warnings.deprecated</a>
95132
decorator.
96133

97-
<p>
134+
</td>
135+
<td>
136+
137+
Use <code>.. warning::</code> in the docstring. Clearly point to the
138+
replacement API when one exists.
139+
140+
</td>
141+
</tr>
142+
<tr>
143+
<td>Python
144+
</td>
145+
<td>Experimental
146+
</td>
147+
<td>
148+
98149
Use the
99150
<a href="https://github.com/pytorch/executorch/blob/main/exir/_warnings.py">executorch.exir._warnings.experimental</a>
100151
decorator.
101152

102153
</td>
103154
<td>
104155

105-
Use <code>.. warning::</code> in the docstrings of deprecated and experimental
106-
APIs. See
156+
Use <code>.. warning::</code> in the docstring. State that the API is
157+
experimental and may change or be removed without notice. See
107158
<a href="https://github.com/pytorch/pytorch/blob/main/torch/nn/utils/stateless.py#L176">example
108159
usage</a>.
109160

110-
</ul>
111161
</td>
112162
</tr>
113163
<tr>
114164
<td>C++
115165
</td>
166+
<td>Deprecated
167+
</td>
116168
<td>
117169

118170
Use the <code>ET_DEPRECATED</code> annotation macro. See <a href="https://github.com/pytorch/executorch/blob/main/runtime/executor/program.h#L92">example usage</a>.
119171

120-
<p>
121-
<p>
122-
Use the <code>ET_EXPERIMENTAL</code> annotation macro.
123-
</ul>
124172
</td>
125173
<td>
126174

127175
Start Doxygen comments with <code>DEPRECATED:</code> See
128176
<a href="https://github.com/pytorch/executorch/blob/main/runtime/executor/program.h#L164">example
129177
usage</a>.
130178

131-
<p>
132-
<p>
179+
</td>
180+
</tr>
181+
<tr>
182+
<td>C++
183+
</td>
184+
<td>Experimental
185+
</td>
186+
<td>
187+
188+
Use the <code>ET_EXPERIMENTAL</code> annotation macro.
189+
190+
</td>
191+
<td>
192+
133193
Start Doxygen comments with <code>EXPERIMENTAL:</code>.
194+
134195
</td>
135196
</tr>
136197
<tr>
137198
<td>Java
138199
</td>
200+
<td>Deprecated
201+
</td>
139202
<td>
140203

141204
Use <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Deprecated.html">java.lang.Deprecated</a>.
142205

143-
<p>
144-
<p>
145-
146-
Use <a href="https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:docs/api_guidelines/annotations.md">androidx.annotation.RequiresOptIn</a>.
147-
148206
</td>
149207
<td>
150208
<p>
151209
<pre><code>/**
152210
* @deprecated Use {@link #newMethod()} instead.
153211
*/
154212
</code></pre>
213+
</td>
214+
</tr>
215+
<tr>
216+
<td>Java
217+
</td>
218+
<td>Experimental
219+
</td>
220+
<td>
221+
222+
Use <a href="https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:docs/api_guidelines/annotations.md">androidx.annotation.RequiresOptIn</a>.
223+
224+
</td>
225+
<td>
155226
<p>
156227
<pre><code>/**
157228
* Warning: This API is experimental.
@@ -161,12 +232,11 @@ Use <a href="https://cs.android.com/androidx/platform/frameworks/support/+/andro
161232
<tr>
162233
<td>Objective-C
163234
</td>
235+
<td>Deprecated
236+
</td>
164237
<td>
165238
<p>
166239
<code>__attribute__((deprecated("Use newMethod instead")));</code>
167-
<p>
168-
<p>
169-
<code>__attribute__((deprecated("This API is experimental and may change without notice.")));</code>
170240
</td>
171241
<td>
172242
<p>
@@ -175,6 +245,18 @@ Use <a href="https://cs.android.com/androidx/platform/frameworks/support/+/andro
175245
* @deprecated Use `newMethod` instead.
176246
*/
177247
</code></pre>
248+
</td>
249+
</tr>
250+
<tr>
251+
<td>Objective-C
252+
</td>
253+
<td>Experimental
254+
</td>
255+
<td>
256+
<p>
257+
<code>__attribute__((deprecated("This API is experimental and may change without notice.")));</code>
258+
</td>
259+
<td>
178260
<p>
179261
<pre><code>
180262
/**
@@ -186,17 +268,28 @@ Use <a href="https://cs.android.com/androidx/platform/frameworks/support/+/andro
186268
<tr>
187269
<td>Swift
188270
</td>
271+
<td>Deprecated
272+
</td>
189273
<td>
190274
<p>
191275
<code>@available(*, deprecated, message: "Use newMethod instead")</code>
276+
</td>
277+
<td>
192278
<p>
279+
<code>/// - Warning: Deprecated. Use `newMethod()` instead.</code>
280+
</td>
281+
</tr>
282+
<tr>
283+
<td>Swift
284+
</td>
285+
<td>Experimental
286+
</td>
287+
<td>
193288
<p>
194289
<code>@available(*, message: "This API is experimental")</code>
195290
</td>
196291
<td>
197292
<p>
198-
<code>/// - Warning: Deprecated. Use `newMethod()` instead.</code>
199-
<p>
200293
<code>/// - Warning: This API is experimental.</code>
201294
</td>
202295
</tr>

docs/source/backends-overview.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,5 @@ backends/arm-vgf/arm-vgf-overview
6565
build-run-openvino
6666
backends/nxp/nxp-overview
6767
backends-cadence
68-
backends/samsung/samsung-overview
68+
Samsung Exynos Backend <backends/samsung/samsung-overview>
69+
```

docs/source/backends/arm-ethos-u/arm-ethos-u-overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ ExecuTorch for the Ethos-U backend, you automatically install the compiler conta
209209

210210
**→{doc}`/backends/arm-ethos-u/arm-ethos-u-troubleshooting` — Troubleshooting and common issues.**
211211

212-
**→{doc}`/backends/arm-ethos-u/tutorials/arm-ethos-u-tutorials`Tutorials.**
212+
**→{doc}`/backends/arm-ethos-u/tutorials/ethos-u-getting-started`Getting started tutorial.**
213213

214214
**→{doc}`/backends/arm-ethos-u/U55_op_support` — Ethos-U55 supported operators.**
215215

@@ -224,7 +224,7 @@ ExecuTorch for the Ethos-U backend, you automatically install the compiler conta
224224
arm-ethos-u-partitioner
225225
arm-ethos-u-quantization
226226
arm-ethos-u-troubleshooting
227-
tutorials/arm-ethos-u-tutorials
227+
tutorials/ethos-u-getting-started
228228
U55_op_support
229229
U85_op_support
230230
```

docs/source/backends/arm-ethos-u/tutorials/arm-ethos-u-tutorials.md

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

docs/source/backends/arm-vgf/arm-vgf-overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ described in the rest of this guide but with a concrete end-to-end sample.
129129

130130
**→{doc}`/backends/arm-vgf/arm-vgf-troubleshooting` — Debug common issues.**
131131

132-
**→{doc}`/backends/arm-vgf/tutorials/arm-vgf-tutorials`Tutorials.**
132+
**→{doc}`/backends/arm-vgf/tutorials/vgf-getting-started`Getting started tutorial.**
133133

134134
**→{doc}`/backends/arm-vgf/VGF_op_support` — VGF supported operators.**
135135

@@ -142,6 +142,6 @@ described in the rest of this guide but with a concrete end-to-end sample.
142142
arm-vgf-partitioner
143143
arm-vgf-quantization
144144
arm-vgf-troubleshooting
145-
tutorials/arm-vgf-tutorials
145+
tutorials/vgf-getting-started
146146
VGF_op_support
147147
```

docs/source/backends/arm-vgf/tutorials/arm-vgf-tutorials.md

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

docs/source/backends/arm-vgf/tutorials/vgf-getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ To produce a pte file equivalent to the one above, run
168168
`python -m backends.arm.scripts.aot_arm_compiler --model_name=add --delegate --quantize --output=simple_example.pte --target=vgf`
169169
```
170170

171-
### Runtime:
171+
## Runtime
172172

173-
## Build executor runtime
173+
### Build executor runtime
174174

175175
After the AOT compilation flow is done, we can build the executor runner target. For this tutorial, the default runner can be used. Build it with the following configuration:
176176

@@ -200,7 +200,7 @@ The block diagram below demonstrates, at the high level, how the various build a
200200
![](arm-delegate-runtime-build.svg)
201201

202202

203-
## Deploying and running on device
203+
### Deploying and running on device
204204

205205
Since we are using the Vulkan emulation layer, we can run the executor runner with the VGF delegate on the host machine:
206206

docs/source/backends/xnnpack/xnnpack-quantization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ See [PyTorch 2 Export Post Training Quantization](https://docs.pytorch.org/ao/ma
6161

6262
The XNNPACK backend also supports quantizing models with the [torchao](https://github.com/pytorch/ao) quantize_ API. This is most commonly used for LLMs, requiring more advanced quantization. Since quantize_ is not backend aware, it is important to use a config that is compatible with CPU/XNNPACK:
6363

64-
* Quantize embeedings with `IntxWeightOnlyConfig` (with weight_dtype torch.int2, torch.int4, or torch.int8, using PerGroup or PerAxis granularity)
64+
* Quantize embeddings with `IntxWeightOnlyConfig` (with weight_dtype torch.int2, torch.int4, or torch.int8, using PerGroup or PerAxis granularity)
6565
* Quantize linear layers with 4 bit weight and 8bit dynamic activation, use `Int8DynamicActivationIntxWeightConfig` (with weight_dtype=torch.int4, using PerGroup or PerAxis granularity)
6666

6767
Below is a simple example, but a more detailed tutorial including accuracy evaluation on popular LLM benchmarks can be found in the [torchao documentation](https://docs.pytorch.org/ao/main/serving.html#mobile-deployment-with-executorch).
@@ -79,13 +79,13 @@ embedding_config = IntxWeightOnlyConfig(
7979
weight_dtype=torch.int8,
8080
granularity=PerAxis(0),
8181
)
82-
qunatize_(
82+
quantize_(
8383
eager_model,
8484
lambda m, fqn: isinstance(m, torch.nn.Embedding),
8585
)
8686

8787

88-
# Quatize linear layers with 8-bit dynamic activations and 4-bit weights
88+
# Quantize linear layers with 8-bit dynamic activations and 4-bit weights
8989
linear_config = Int8DynamicActivationIntxWeightConfig(
9090
weight_dtype=torch.int4,
9191
weight_granularity=PerGroup(32),

0 commit comments

Comments
 (0)