x5-ptq-compile
Skill1 starsChanged 3 months agoApache-2.0View on GitHub
执行已验证 X5 YAML 的 hb_mapper checker/makertbin 并验证唯一 .bin 与 BPU march;当配置和环境已就绪、需要生成 bayes-e PTQ 产物时使用。不得处理 QAT .hbm/.hbir,也不得复用非空输出目录而未确认。
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-config-authoringSkill
- x5-ptq-deploySkill
- x5-qat-adaptationSkill
- x5-qat-compileSkill
- 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 PTQ 编译
目标与边界
执行确定的 PTQ 配置并收集证据,不在编译过程中自动改 YAML、校准数据或目标 march。
输入合同
- 通过
validate_ptq_config.py --check-paths的 YAML 和报告。 - PTQ
environment.json、新 working/checker 目录和磁盘预算。 - 如需复用非空目录,必须有审批和原始产物备份。
前置检查
- 重新验证 YAML 哈希和
march: bayes-e。 - 确认 model/calibration 输入与报告一致。
- 检查输出目录为空;不把旧
.bin当成本次产物。
执行步骤
python .drobotics/platforms/x5/scripts/run_ptq.py full \
--config <x5.yaml> \
--report <run-root>/ptq-report.json脚本依次运行 checker、hb_mapper makertbin 和 hb_model_info。只有审阅并确认非空目录后才允许追加 --allow-nonempty-working-dir。
产物与完成标准
- checker 与 makertbin 返回成功,日志完整。
- working_dir 中恰有一个本次
.bin;产物哈希已记录。 hb_model_info解析到BPU march: bayes-e。- 量化 ONNX、静态性能文件和 warning 被登记;Runtime 正确性仍需后续验证。
风险与确认
模型生成和长时间编译为中风险;覆盖/复用输出为高风险。不得把文件重命名为 .bin 绕过验证。
失败与交接
- 编译/算子问题 →
x5-model-diagnostics。 - 编译后精度问题 →
x5-accuracy-diagnostics。 - 静态性能问题 →
x5-performance-diagnostics。 - 同一 YAML 最多两次;第二次失败不自动切换 fast-perf 或 O3。
按需参考
_sources/oe_mapper/source/ptq/ptq_usage/quantize_compile.rst.txt_sources/oe_mapper/source/ptq/ptq_tool/hb_model_info.rst.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.

