x5-qat-compile
Skill1 starsChanged 3 months agoApache-2.0View on GitHub
对 X5 Plugin 定点模型执行 trace、check_model 和 compile_model/export_hbir;当 quantized 指标已达标,需要生成 .hbm 或 .hbir 与编译报告时使用。禁止输出伪装的 .bin 或自动调用 hb_mapper makertbin。
In this repository59 other files it gives its agents.
- bsp-bootloader-buildSkill
- bsp-deb-buildSkill
- bsp-env-setupSkill
- bsp-image-buildSkill
- bsp-kernel-buildSkill
- bsp-rootfs-customSkill
- bsp-source-syncSkill
- bsp-s-seriesSkill
- hmct-workflowSkill
- horizon-routerSkill
- ucpSkill
- x5-accuracy-diagnosticsSkill
- x5-board-monitorSkill
- x5-bpu-python-apiSkill
- x5-calibration-data-prepareSkill
- x5-consistency-diagnosticsSkill
- x5-environment-installSkill
- x5-environment-probeSkill
- x5-environment-setupSkill
- x5-model-diagnosticsSkill
- x5-model-preflightSkill
- x5-performance-diagnosticsSkill
- x5-ptq-compileSkill
- x5-ptq-config-authoringSkill
- x5-ptq-deploySkill
- x5-qat-adaptationSkill
- x5-qat-deploySkill
- x5-qat-trainingSkill
- x5-routerSkill
- x5-runtime-cpp-inferSkill
- x5-runtime-deploySkill
- x5-runtime-perf-evalSkill
- rdk-accessoriesSkill
- rdk-board-delegateSkill
- rdk-board-knowledgeSkill
- rdk-camera-setupSkill
- rdk-command-manualSkill
- rdk-diagnosticSkill
- rdk-docs-referenceSkill
- rdk-ecosystemSkill
- rdk-embodied-lerobotSkill
- rdk-gpio-40pinSkill
- rdk-hardwareSkill
- rdk-headless-modeSkill
- rdk-llm-deploymentSkill
- rdk-log-forensicsSkill
- rdk-memory-auditSkill
- rdk-model-benchmarkSkill
- rdk-model-deploySkill
- rdk-model-zooSkill
- rdk-multimediaSkill
- rdk-network-remoteSkill
- rdk-peripheral-cookbookSkill
- rdk-source-mapSkill
- rdk-system-configSkill
- rdk-system-maintainSkill
- rdk-tros-setupSkill
- rdk-vision-pipelineSkill
- d-robotics-pack-installerSkill
The file
Files
X5 QAT 模型检查与编译
目标与边界
把已验证定点模型转换为 Plugin 编译产物。.hbm/.hbir 不等同于 OE Mapper .bin;Runtime 是否可加载由匹配发布包实测决定。
输入合同
- 已达标 quantized 模型、example inputs、评价指标和源码。
March.BAYES_E环境、输出.hbm或.hbir路径、编译选项。- 新输出目录和 Runtime 兼容性验证计划。
前置检查
- 模型和 example inputs 放到手册要求的设备(通常 trace 时为 CPU)。
- 再次验证 quantized 指标和模型哈希。
- 输出后缀必须与 API 合同一致:
compile_model→.hbm,export_hbir→.hbir。
执行步骤
- 用真实 example inputs
torch.jit.trace并保存可复现 TorchScript。 - 运行
check_model(script_model, [example_input]),保存完整检查日志。 - 选择一个输出路径:
compile_model(..., hbm="model.hbm")或export_hbir(...)。 - 运行源码合同检查:
python .drobotics/platforms/x5/scripts/check_qat_target.py \
--source <compile.py> --stage compile --report <compile-check.json>- 记录编译选项、产物哈希、性能估计和 warning。
产物与完成标准
- TorchScript、
check_model通过证据、compile-check.json和编译日志。 .hbm或.hbir存在、非空、哈希已登记;没有.bin伪装。- 源码证明
March.BAYES_E且无 HAT/hb_mapper makertbin。 - Runtime 兼容性未实测时收据必须标记限制。
风险与确认
生成新产物为中风险;覆盖模型或复用旧编译目录前确认。不得通过改后缀绕过 Runtime 格式检查。
失败与交接
模型检查失败交接 x5-consistency-diagnostics;目标或环境错误交接 x5-environment-probe。同一编译配置最多两次。
按需参考
_sources/plugin/source/api_reference/apis/compiler.rst.txt_sources/plugin/source/quick_start/quick_start.ipynb.txt
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

