ExecuTorch在NXP eIQ Neutron后端上的端侧推理支持

该文档介绍ExecuTorch v1.4在NXP i.MXRT700芯片上通过eIQ Neutron后端运行机器学习模型的方式,涵盖支持的卷积网络、开发环境依赖以及AoT编译与运行时集成的入口说明。

## NXP eIQ 中子后端[#](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-overview.html#nxp-eiq-neutron-backend>) 本手动页面专门介绍 NXP eIQ Neutron 后端. NXP 提供了边缘设备的加速机器学习模型推论. 要更多地了解 NXP 的机器学习加速平台,请参见 [官方的 NXP 网站](<https://www.nxp.com/applications/technologies/ai-and-machine-learning:MACHINE-LEARNING>). 为:up-to-date关于运行的状态ExecuTorch请访问中子后端 [手动页面](<https://github.com/pytorch/executorch/blob/main/backends/nxp/README.md>). ## 特征[#](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-overview.html#features>) ExecuTorch v1.4支持在选定的NXP芯片上运行机器学习模型(目前只支持) `i.MXRT700`目前得到支持的机器学习模式包括: - 基于革命的中立网络 - 全力支持MobileNetV2和CifarNet ## 目标所需资源[#](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-overview.html#target-requirements>) - 使用 NXP 的硬件 [i.MXRT700 (中文(简体) ).](<https://www.nxp.com/products/i.MX-RT700>) 芯片或评价板如MIMXRT700-EVK. ## 发展要求[#](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-overview.html#development-requirements>) - [MCUXpresso IDE (英语).](<https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE>) 或 时 间 [MCUXpresso 视觉工作室代码扩展](<https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-for-visual-studio-code:MCUXPRESSO-VSC>) - [MCUXpresso SDK 26.06 (英语).](<https://mcuxpresso.nxp.com/mcuxsdk/26.06.00/html/index.html>) - eIQ中子 SDK 版本 3.2.1, 您可以从 AIQ PyPI 下载的内容 : ``` $ pip install --index-url https://eiq.nxp.com/repository eiq-neutron-sdk==3.2.1 ``` 除了MCUXpresso IDE和SDK之外,你不用手动安装要求,而是可以使用设置脚本: ``` $ ./examples/nxp/setup.sh ``` ## 使用 NXP eIQ 后端[#](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-overview.html#using-nxp-eiq-backend>) 为了测试eIQ中子后端,用于模型准备的AoT流和用于执行的运行时间,都参考了 [开始使用 eIQ 中子 NPU ExecuTorch 后端](<https://docs.pytorch.org/executorch/stable/backends/nxp/tutorials/nxp-basic-tutorial.html>) 关于如何转换自定义的 PyTorch 模型,请看看我们 [实例 python 脚本](<https://github.com/pytorch/executorch/tree/main/examples/nxp/aot_neutron_compile.py>). ## 运行时间集成[#](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-overview.html#runtime-integration>) 使用 eIQ NSYS (eIQ 中子模拟器) 的运行时间应用程序实例 [examples/nxp/executor_runner](<https://github.com/pytorch/executorch/blob/main/examples/nxp/executor_runner/>),在教程中描述 [开始使用 eIQ 中子 NPU ExecuTorch 后端](<https://docs.pytorch.org/executorch/stable/backends/nxp/tutorials/nxp-basic-tutorial.html>) 要学习如何在 NXP 硬件上运行转换的模型, 请使用我们使用 ExecuTorch 运行时间的示例项目之一 从 MCUXpresso IDE 示例项目列表中运行。 对于更精细的教程, 请访问 [此手动页面](<https://mcuxpresso.nxp.com/mcuxsdk/latest/html/middleware/eiq/executorch/docs/nxp/topics/example_applications.html>). 如何在MCUXpresso SDK上更新 eIQ 中子运行时间,请遵循 eIQ 中子 SDK 包的指令 `docs/NeutronSDKUserGuide.md` 此处可用 https://www.nxp.com/design/design-center/software/eiq-ai-development-environment/eiq-toolkit-for-end-to-end-model-development-and-deployment:EIQ-TOOLKIT 。 ## 使用 MCUXpresso 示例[#](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-overview.html#using-the-mcuxpresso-example>) [本页](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-mcuxpresso-example.html>) 演示如何从MCUXpresso SDK中构建和运行ExecuTorch CIFARNet实例. ## 参考[#](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-overview.html#reference>) **→[分区器 API](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-partitioner.html>) - 分区选择。** **→[NXP eIQ 中子量子化](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-quantization.html>) 支持的量化计划。** **→[NXP 教学](<https://docs.pytorch.org/executorch/stable/backends/nxp/tutorials/nxp-tutorials.html>) ——训导.** **→[NXP eIQ Dim 顺序支持](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-dim-order.html>) ——Dim订单支持(渠道最后输入).** **→[NXP eIQ 中子内核选择性内核注册](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-kernel-selection.html>) ——中子固件内核选择支持.** **→[NXP eIQ 剖析支持](<https://docs.pytorch.org/executorch/stable/backends/nxp/nxp-profiling.html>) ——中子模型剖面分析.**

查看原始来源