Arm VGF 后端环境预检与 AOT 冒烟测试
介绍 Arm VGF 后端在导出与运行前的环境预检命令,以及一个不依赖 ML SDK 的 VGF 提前 lowering 冒烟测试,帮助定位集成问题。
## 装备VGF 故障排除[#](<https://docs.pytorch.org/executorch/stable/backends/arm-vgf/arm-vgf-troubleshooting.html#arm-vgf-troubleshooting>) 本页面描述您在使用Arm VGF后端时可能遇到的常见问题以及如何调试和解决它们. ## 如何可视化 VGF 文件[#](<https://docs.pytorch.org/executorch/stable/backends/arm-vgf/arm-vgf-troubleshooting.html#how-do-you-visualize-vgf-files>) 那个... [用于模型探索器的 VGF 适配器](<https://github.com/arm/vgf-adapter-model-explorer>) 允许对VGF文件进行可视化,并可用于调试. ## 环境飞行前命令[#](<https://docs.pytorch.org/executorch/stable/backends/arm-vgf/arm-vgf-troubleshooting.html#environment-preflight-commands>) VGF后端提供了在导出或运行时间执行前可以运行的飞行前帮助器: ``` python -m executorch.backends.arm.vgf.check_env --aot python -m executorch.backends.arm.vgf.check_env --runtime python -m executorch.backends.arm.vgf.check_env --host-emulator python -m executorch.backends.arm.vgf.check_env --source-build --build-dir cmake-out ``` 使用( U) `--aot` 它检查 Python 建议,TOSA连载器,MLSDK模型转换器可用性/版本,并且可以启动转换器. Python 版本比3.12生成警告; 模式转换器版本比0.10.0,或者其兼容性不能确定的版本,失败飞行前。 使用( U) `--runtime` 当调试 Python 运行时间可用时。它检查了 ExecuTorch 运行时间后端注册是否报告可用的 VgfBackend 。 使用( U) `--host-emulator` 在基于主机的模拟器运行前,它检查运行时间可用性加上Vulkan SDK和ML模拟层环境变量. 使用( U) `--source-build --build-dir <dir>` 当调试一个源构建时, 它会检查 VGF 运行时间构建先决条件, 例如 `libvgf` 选项包括: `EXECUTORCH_BUILD_VGF` 财务报告和财务报告 `EXECUTORCH_BUILD_VULKAN`. ML SDK组件应保存在同一发布线上. 0.10升级后,将一个0.9模型转换器与ExecuTorch VGF后端混合,不是一种支持的配置. Reinstall `executorch[vgf]` 或如果飞行前报告旧的转换器,则源检查出 VGF 要求。 对于CI日志或错误报告,添加 `--json`: ``` python -m executorch.backends.arm.vgf.check_env --aot --json ``` ## 测试 VGF ahead-of-time 降低[#](<https://docs.pytorch.org/executorch/stable/backends/arm-vgf/arm-vgf-troubleshooting.html#testing-vgf-ahead-of-time-lowering>) Arm后端包括一个轻量级的VGFahead-of-time烟雾测试,检查一个小的PyTorch型号可以输出,为VGF进行分区,通过共享的TOSA管道降低,并转换为ExecuTorch程序. 测试模拟了最终的VGF `model-converter` 引用,因此它不需要ML SDK模型转换器,Vulkan运行时间,或VKML主机-模块设置. 它旨在运行更重的VGF运行时间测试之前,在Python AOT降低路径中捕捉集回归. 直接运行 : ``` pytest -q backends/arm/test/misc/test_vgf_smoke.py ``` 如果使用 Arm 后端测试包, 请运行 : ``` backends/arm/test/test_arm_backend.sh test_pytest_vgf_smoke ```
查看原始来源