Pull Request has been successfully merged by CANN-robot.
(Thank you for 张田荣's contribution.)变更摘要
本 PR 主要聚焦 examples 运行结果的精度显示与收集:新增公共指标模块 examples/common/metrics.py,为各示例的 verify_result.py 提供统一的 verify_metrics.json 写入能力;扩展 examples/common/run_case.py,在用例结果输出中增加 accuracy(精度)、tol accuracy 与 max_abs_diff 等指标显示,并在结果 CSV 中新增 accuracy、metrics_json 两列。同时按 PR 描述更新 QUICKSTART.md 文档(补充未联网/离线编译内容),并更新 include/tensor_api 子模块指针。
主要改动
-
新增公共指标模块
examples/common/metrics.py:提供write_metrics_json(将各输出项的max_abs_diff、error_ratio、ratio_tol、elements、status写入./output/verify_metrics.json)以及parse_stdout_metrics(缺少 JSON 文件时回退解析 verify stdout,支持[verify] name:、[INFO] group N:等块结构)。 -
各示例 verify 脚本接入指标写入:
batch_mat_mul、mat_mul、grouped_matmul、quant_batch_matmul(verify_result_cube.py/verify_result_mx.py)、quant_matmul_activation_quant、transpose_batch_mat_mul、weight_quant_batch_matmul_mx等verify_result.py均调用write_metrics_json记录精度指标与总体状态(pass/fail);其中grouped_matmul按 group 逐个收集指标,quant_matmul_activation_quant通过_COLLECTED_METRICS汇总多个输出项。 -
examples/common/run_case.py结果展示与输出增强:用例执行后通过_load_metrics读取verify_metrics.json(缺失或解析失败时回退parse_stdout_metrics),将error_ratio换算为 accuracy 百分比,在 PASS/FAIL 输出中打印accuracy、tol accuracy 与max_abs_diff,并新增_extract_accuracy、_format_metrics_json辅助函数,在结果 CSV 中增加accuracy、metrics_json两列。 -
文档与子模块更新:按 PR 描述在
QUICKSTART.md相关章节补充未联网(离线)编译内容;同时include/tensor_api子模块指针由d63c30cb...更新至ad3d3bf0...。


Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/ops-tensor | ✅ 商晓波, 陈康 (2/2) | ✅ 商晓波 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
zhangtianrong, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


/lgtm
/approve


/lgtm


描述
1、examples输出结果表格增加精度结果显示
2、QUICKSTART.md相关章节增加未联网编译内容
关联的Issue
https://gitcode.com/cann/ops-tensor/issues/189
测试
文档更新
QUICKSTART.md
类型标签