fix: 脚手架强制生成 pyrt(默认 runtime 改为 both)
100/30/400Tai模型部署工程的一体化交付 skill: 工程框架结构生成 / 源工程迁移 / 模型导出 / 算子审计 / TOML 编译 / Windows 仿真 / 上板执行准备。
100Tai
30Tai
400Tai
BY
ZG
WL
\92.168.35.7\public\fpai_kb
\92.168.35.7\public\fpai_kb\icraft_v3.38\public\modelzoo\400Tai_pure
Fpai-user-connector
输入请求(完整模板见 references/customer-prompt-template.md 与 skill_user_QA_checklist.md):
references/customer-prompt-template.md
skill_user_QA_checklist.md
请使用这个 skill进行模型部署: <Fpai-user-one-model 路径> Python 源工程:<Python 工程绝对路径> 权重:<权重绝对路径> 本次 icraft compile 后端:100Tai/30Tai/400Tai 本次 icraft compile 精度:int8/bf16/fp16/tf32/fp32 运行方式:Windows 仿真 / 上板执行
<model>/<model>_icraft/ 1_scripts/ # 0_infer.py / 1_save.py / 2_save_infer.py weights/ # 源权重存放位置 2_compile/ config/{BY,ZG,WL,customop}/ fmodel/ # 1_save.py的导出权重 qtset/ # 量化校准集 logs/ # operator_stats.md / operator_audit.md 3_deploy/ BYZG/ # BY/ZG 运行时(CMakeLists.txt / src / modelzoo_utils/ pyrt) WL/ # WL 运行时(CMakeLists.txt / src / modelzoo_utils/ pyrt) cfg/ # 运行时配置文件 imodel/ # 编译网络的产物 io/ # 输入输出 names/ # 类别名 metrics/ # 耗时分析脚本
build_win
build_arm
1_scripts
requirements.txt
uv
.venv
0_infer.py
1_save.py
2_save_infer.py
2_compile/fmodel
network
inspect_model_ops.py --inventory-only
icraft compile
modelzoo_utils
src
pyrt
imodel.dir
dataset.dir
dataset.list
.exe
Fpai-dev-model-download
verify_model.py
weights_gate.py
PASS/REVIEW/BLOCK
0_infer
scripts/check_input_data.py --qtset/--test-input
icore
cores=1
cluster
cores=4
scripts/configure_byzg_hardop.py
SKILL.md
model-deploy-400tai-user-guide.md
agents/openai.yaml
scripts/
references/
scaffold_icraft_modelzoo.py
inspect_reference_branches.py
generate_python_requirements.py
finalize_onnx_for_icraft.py
ir_version=8
inspect_model_ops.py
check_input_data.py
sync_modelzoo_utils.py
configure_byzg_hardop.py
set_wl_toml_cores.py
[generate].cores
set_yaml_run_backend.py
imodel.run_backend
apply_customop_fp32.py
init_cpp_migration_artifacts.py
breakthrough_hint.py
gen_experience_index.py
mdz_cases/
backend_profile.py
audit_common.py
audit_report.py
path-intake-guide.md
project-scaffold-guide.md
icraft-project-400tai-adaptation-guide.md
400tai-delivery-workflow.md
export-and-toml-compile-guide.md
path-resolution-guide.md
index-model-family.md
python-env-check-guide.md
python-runtime-to-cpp-porting-guide.md
customop-quantize-handoff.md
operator-support-audit-guide.md
input-data-guide.md
runtime-build-mode-guide.md
runtime-cross-compile-guide.md
vendor-docker-image-notes.md
model-adaptation-experience.md
mdz_cases/README.md
400tai-customer-input-examples.md
customer-prompt-template.md
后端差异(精度集合、modelzoo_utils 路径、core 模式、DetPost pass、算子支持口径、运行时分组)不硬编码,统一从 profile 读取:
--backend-profiles
$FPAI_BACKEND_PROFILES
%FPAI_KB%\backend_profiles
<opencode>\shared\backend_profiles
scripts/backend_profile.py
modelzoo-accuracy-analysis
模型部署
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
Fpai-user-one-model
100/30/400Tai模型部署工程的一体化交付 skill: 工程框架结构生成 / 源工程迁移 / 模型导出 / 算子审计 / TOML 编译 / Windows 仿真 / 上板执行准备。
100Tai/30Tai/400Tai内部归一到BY/ZG/WL;后端一经选定只生成、编译该后端。\92.168.35.7\public\fpai_kb(产品/应用/TOML/runtime API/算子清单/编译教程),客户无需提供。\92.168.35.7\public\fpai_kb\icraft_v3.38\public\modelzoo\400Tai_pure(多目标库,先清点 BY/ZG/WL 分支,不先进入 WL)。Fpai-user-connector;本 skill 不独立做上传/SSH/板端执行。快速使用
输入请求(完整模板见
references/customer-prompt-template.md与skill_user_QA_checklist.md):标准目录结构
build_win/build_arm在读取编译配置前新建,编译程序的产物生成在该目录下。交付阶段
1_scripts:生成最小requirements.txt→uv.venv或客户自装 →0_infer.py/1_save.py/2_save_infer.py,源模型代码原样复制进部署工程,看图验收。2_compile/fmodel存在且与 TOMLnetwork一致,ONNX 契约 opset 17 / IR 8。inspect_model_ops.py --inventory-only出统计表,后端明确后再对照 BUYI/ZG330 审计。icraft compile:编译前交互确认后端、精度、若选择400Tai后端需要询问 core 模式。modelzoo_utils从版本化 KB 同步或指定本地路径同步,模型逻辑写入src/pyrt。imodel.dir/dataset.dir/dataset.list可解析。.exe,或上板执行 ARM64 ELF。关键门禁
Fpai-dev-model-download的verify_model.py+weights_gate.py,输出PASS/REVIEW/BLOCK;BLOCK 必须停止并请客户重新下载/换源/确认。0_infer前、编译前):scripts/check_input_data.py --qtset/--test-input,禁止用随机输入(尤其 GAN)或跨域校准集。0_infer.py与2_save_infer.py输出结果必须对齐;每次改1_save.py后都要重跑两者再对比。icraft compile前重新询问后端/精度;WL 额外问 core 模式(icore→cores=1,cluster→cores=4)。scripts/configure_byzg_hardop.py,非检测模型与 WL 均不启用。文件
SKILL.md— skill 指令(流程、门禁、硬约束、验收清单)。model-deploy-400tai-user-guide.md— 面向客户的 400TAI 交付指南(10 阶段与验收标准)。skill_user_QA_checklist.md— 客户问答清单(agent 会问什么、客户准备什么、最短请求示例)。agents/openai.yaml— skill 展示名与默认提示词。scripts/— 确定性脚本(见下)。references/— 分阶段指南与经验案例库。脚本
scaffold_icraft_modelzoo.pyinspect_reference_branches.pygenerate_python_requirements.pyrequirements.txtfinalize_onnx_for_icraft.pyir_version=8并校验 opset 17inspect_model_ops.pycheck_input_data.pysync_modelzoo_utils.pymodelzoo_utilsconfigure_byzg_hardop.pyset_wl_toml_cores.py[generate].cores(icore/cluster)set_yaml_run_backend.pyimodel.run_backend(host 仿真)apply_customop_fp32.pyinit_cpp_migration_artifacts.pybreakthrough_hint.pygen_experience_index.pymdz_cases/生成案例库索引backend_profile.pyaudit_common.py/audit_report.py参考文档(references/)
path-intake-guide.md、project-scaffold-guide.md、icraft-project-400tai-adaptation-guide.md、400tai-delivery-workflow.md、export-and-toml-compile-guide.md、path-resolution-guide.md、index-model-family.md。python-env-check-guide.md、python-runtime-to-cpp-porting-guide.md、customop-quantize-handoff.md。operator-support-audit-guide.md、input-data-guide.md。runtime-build-mode-guide.md、runtime-cross-compile-guide.md、vendor-docker-image-notes.md。model-adaptation-experience.md(跨模型共性规律)+mdz_cases/(按模型案例,索引mdz_cases/README.md,现覆盖 gan/ocr/video 8 个模型)。400tai-customer-input-examples.md、customer-prompt-template.md。共享 backend profile
后端差异(精度集合、
modelzoo_utils路径、core 模式、DetPost pass、算子支持口径、运行时分组)不硬编码,统一从 profile 读取:--backend-profiles>$FPAI_BACKEND_PROFILES>%FPAI_KB%\backend_profiles><opencode>\shared\backend_profiles。scripts/backend_profile.py;未找到时回退内置默认(BY/ZG/WL 现有值),行为与先前一致。限制
references/做纯文档推理,不能执行依赖版本化modelzoo_utils的编译/构建。Fpai-user-connector负责;精度不达标时转modelzoo-accuracy-analysis。