Skip to content

Commit f4f6d62

Browse files
NXP backend: Update documentation for ExecuTorch v1.2 release (pytorch#18227)
### Summary Documentation update for ExecuTorch v1.2
1 parent 444ffae commit f4f6d62

3 files changed

Lines changed: 22 additions & 8 deletions

File tree

docs/source/backends/nxp/nxp-overview.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ For up-to-date status about running ExecuTorch on Neutron backend please visit t
1111
## Features
1212

1313

14-
ExecuTorch v1.0 supports running machine learning models on selected NXP chips (for now only `i.MXRT700`).
14+
ExecuTorch v1.2 supports running machine learning models on selected NXP chips (for now only `i.MXRT700`).
1515
Among currently supported machine learning models are:
1616
- Convolution-based neutral networks
1717
- Full support for MobileNetV2 and CifarNet
@@ -24,10 +24,10 @@ Among currently supported machine learning models are:
2424

2525
- [MCUXpresso IDE](https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE) or [MCUXpresso Visual Studio Code extension](https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-for-visual-studio-code:MCUXPRESSO-VSC)
2626
- [MCUXpresso SDK 25.12](https://mcuxpresso.nxp.com/mcuxsdk/25.12.00/html/index.html)
27-
- eIQ Neutron Converter for MCUXPresso SDK 25.12, what you can download from eIQ PyPI:
27+
- eIQ Neutron SDK version 3.0.0, what you can download from eIQ PyPI:
2828

2929
```commandline
30-
$ pip install --index-url https://eiq.nxp.com/repository eiq_neutron_sdk
30+
$ pip install --index-url https://eiq.nxp.com/repository eiq_neutron_sdk==3.0.0
3131
```
3232

3333
Instead of manually installing requirements, except MCUXpresso IDE and SDK, you can use the setup script:
@@ -49,6 +49,9 @@ An example runtime application using the eIQ NSYS (eIQ Neutron Simulator) is ava
4949
To learn how to run the converted model on the NXP hardware, use one of our example projects on using ExecuTorch runtime from MCUXpresso IDE example projects list.
5050
For more finegrained tutorial, visit [this manual page](https://mcuxpresso.nxp.com/mcuxsdk/latest/html/middleware/eiq/executorch/docs/nxp/topics/example_applications.html).
5151

52+
For guideline how to update the eIQ Neutron Runtime on MCUXpresso SDK, follow the instructions from the eIQ Neutron SDK package `docs/NeutronSDKUserGuide.md` available
53+
here https://www.nxp.com/design/design-center/software/eiq-ai-development-environment/eiq-toolkit-for-end-to-end-model-development-and-deployment:EIQ-TOOLKIT.
54+
5255
## Reference
5356

5457
**→{doc}`nxp-partitioner` — Partitioner options.**

docs/source/backends/nxp/nxp-partitioner.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ The Neutron partitioner API allows for configuration of the model delegation to
66

77
It has the following arguments:
88

9-
* `compile_spec` - list of key-value pairs defining compilation:
10-
* `custom_delegation_options` - custom options for specifying node delegation.
9+
* `compile_spec` - list of key-value pairs defining compilation,
10+
* `neutron_target_spec` - NeutronTargetSpec instance, initialized by SoC id, e.g. "imxrt700",
11+
* `custom_delegation_options` - custom options for specifying node delegation,
12+
* `preserve_ops` - list of aten operators to not be decomposed by ExecuTorch.
1113

1214
--------------------
1315
Compile Spec Options
@@ -18,12 +20,15 @@ Following fields can be set:
1820
* `config` - NXP platform defining the Neutron NPU configuration, e.g. "imxrt700".
1921
* `extra_flags` - Extra flags for the Neutron compiler.
2022
* `operators_not_to_delegate` - List of operators that will not be delegated.
23+
* `use_neutron_for_format_conversion` - If True, let the eIQ Neutron NPU to handle conversion between channel-first (NCHW) and channel-last (NHWC) data formats. That is the Neutron backend will insert `Transpose` ops to ensure that the IO matches the executorch partition, which will be delegated to Neutron.
24+
* `fetch_constants_to_sram`: If True, the Neutron Converter will insert microinstructions to prefetch weights from FLASH to SRAM. This should be used when the whole model does not fit into SRAM on Neutron-C devices, like i.MX RT700
25+
* `dump_kernel_selection_code`: Whether Neutron converter dumps kernel selection code, which is used by the selective kernel registration, see :doc:`Neutron Firmware Kernel Selection support <nxp-kernel-selection.md>`.
2126

2227
-------------------------
2328
Custom Delegation Options
2429
-------------------------
2530
By default the Neutron backend is defensive, what means it does not delegate operators which cannot be decided statically during partitioning. But as the model author you typically have insight into the model and so you can allow opportunistic delegation for some cases. For list of options, see
26-
`CustomDelegationOptions <https://github.com/pytorch/executorch/blob/release/1.0/backends/nxp/backend/custom_delegation_options.py#L11>`_
31+
`CustomDelegationOptions <https://github.com/pytorch/executorch/blob/release/1.2/backends/nxp/backend/custom_delegation_options.py#L11>`_
2732

2833
================
2934
Operator Support
@@ -32,7 +37,7 @@ Operator Support
3237
Operators are the building blocks of the ML model. See `IRs <https://docs.pytorch.org/docs/stable/torch.compiler_ir.html>`_ for more information on the PyTorch operator set.
3338

3439
This section lists the Edge operators supported by the Neutron backend.
35-
For detailed constraints of the operators see the conditions in the ``is_supported_*`` functions in the `Node converters <https://github.com/pytorch/executorch/blob/release/1.0/backends/nxp/neutron_partitioner.py#L192>`_
40+
For detailed constraints of the operators see the conditions in the ``is_supported_*`` functions in the `Node converters <https://github.com/pytorch/executorch/blob/release/1.2/backends/nxp/neutron_partitioner.py#L202>`_
3641

3742

3843
.. csv-table:: Operator Support

docs/source/backends/nxp/op-support.csv

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ aten.clamp.default,int8,static int8,"Bounds = (-1, 1) or (0, 1) or (0, 6) or (0,
1010
aten.clone.default,int8,static int8,
1111
aten.constant_pad_nd.default,int8,static int8,"H or W padding only"
1212
aten.convolution.default,int8,static int8,"1D or 2D convolution, constant weights, groups=1 or groups=channels_count (depthwise)"
13+
aten.dim_order_ops._clone_dim_order.default,,, "See aten.clone.default"
1314
aten.div.Tensor,int8,static int8,"divisor - static tensor or scalar value, one dimension must satisfy %8 = 0 or scalar division (all dims = 1)"
1415
aten.hardtanh.default,int8,static int8,"supported ranges: <0,6>, <-1, 1>, <0,1>, <0,inf>"
1516
aten.leaky_relu.default,int8,static int8,
@@ -20,10 +21,15 @@ aten.mean.dim,int8,static int8,"4D tensor only, dims = [-1,-2] or [-2,-1]"
2021
aten.mul.Tensor, int8, static int8, "tensor-size % 8 = 0"
2122
aten.mm.default,int8,static int8,"2D tensor only"
2223
aten.neg.default,int8,static int8,
24+
aten.permute_copy.default,int8, static int8, "Only specific transpositions supported, see backends/nxp/backend/ir/converter/node_converters/ops_converters/permute_copy_converter.py"
25+
aten.prelu.default, int8, static int8, "rank = 4, channels % 8 = 0, flat input size / channels <= 4096"
2326
aten.relu.default,int8,static int8,
2427
aten.sigmoid.default,int8,static int8,
2528
aten.slice_copy.Tensor, int8, static int8
26-
aten.softmax.default, int8, static int8, "rank > 1, channels % 8 = 0, channels < 2048, flat input size / channels <= 4096, flat input size <= 524288"
29+
aten._softmax.default, int8, static int8, "rank > 1, channels % 8 = 0, channels < 2048, flat input size / channels <= 4096, flat input size <= 524288"
30+
aten.split.default,N/A, N/A, "transforming split -> getitem to slice, see aten.slice_copy.Tensor"
31+
aten.split.Tensor,N/A, N/A, "transforming split -> getitem to slice, see aten.slice_copy.Tensor"
32+
aten.split_with_sizes.default,N/A, N/A, "transforming split -> getitem to slice, see aten.slice_copy.Tensor"
2733
aten.squeeze.default,int8,static int8,
2834
aten.squeeze.dim,int8,static int8,
2935
aten.squeeze.dims,int8,static int8,

0 commit comments

Comments
 (0)