| perf(lint): Optimize JSONL logging with buffered writes and summary events Co-authored-by: xuzhenghao8<xuzhenghao8@huawei.com> # message auto-generated for no-merge-commit merge: !3996 merge master into master perf(lint): Optimize JSONL logging with buffered writes and summary events Created-by: xuzhenghao8 Commit-by: xuzhenghao8 Merged-by: cann-robot Description: # lint_events.jsonl 日志系统优化与测试修复 ## 提交记录 | Commit | 描述 | |--------|------| | 067762c7 | 日志系统优化:缓冲写入、invocation_id、SKIP 过滤、汇总事件 | | 0162a1e4 | 测试修复:修复 4 个 phase gate 测试,删除 1 个过时测试,新增 report_metrics.py | | 4cab95b6 | 汇总事件增加 effort_stats 字段(按 E1/E2/E3 分组统计) | | 62b6c9b8 | report_metrics.py 重写:中文输出、CLI 参数、容错、docstring | ## 核心改动 ### 1. 日志写入优化 - **缓冲合并**:N 次文件 I/O → 1 次,try/finally 保证异常落盘 - **invocation_id**:8 字符 hex id,关联同批次事件 - **SKIP 过滤**:默认不写 SKIP 事件,PYPTO_OP_LINT_LOG_SKIP=1 开启 - **汇总事件**:run_check_summary 包含 pass/fail/warn/skip 统计、S0/S1 列表、耗时 ### 2. 修复成本统计 run_check_summary 新增 effort_stats 字段,按 E1/E2/E3 分组统计 FAIL/WARN 规则: json { "effort_stats": { "E1": {"fails": ["OL01", "OL07"], "warns": ["OL23"]}, "E2": {"fails": ["OL09"], "warns": []} } } ### 3. 报告生成工具 logs/report_metrics.py 解析 JSONL 生成统计摘要: bash # 默认输出到 logs/summary_latest.{json,md} python3 report_metrics.py # 指定参数 python3 report_metrics.py --input /path/to/events.jsonl --op-dir /path/to/op --since 1700000000 输出内容:概览、S0/S1 失败、修复成本分布、每次调用明细、按算子统计(全中文)。 ### 4. 测试修复 - 修复 4 个 phase gate 测试(添加 _write_memory_md helper) - 删除 1 个验证已废弃 sidecar 机制的过时测试 - 新增 8 个测试覆盖 report_metrics 新功能 ## 改动文件 | 文件 | 改动 | |------|------| | core.py | _run_checks 返回 tuple[list[Finding], str],Finding 新增 fix_effort | | observability.py | 缓冲写入、汇总事件、effort_stats、gate 事件增强、SKIP 过滤 | | cli.py | 7 处调用点解包适配 | | hooks.py | 2 处调用点解包适配 + invocation_id 传递 | | rules.json | 55 条规则新增 fix_effort 字段 | | tests/helpers.py | 1 处调用点解包适配 | | tests/test_hook_integration.py | 修复 4 个测试,删除 1 个过时测试 | | tests/test_metrics_observability.py | 新增 8 个测试,更新 1 个测试断言 | | logs/report_metrics.py | 新增日志汇总脚本(中文输出、CLI 参数、容错) | See merge request: cann/pypto!3996 | 4 months ago |
| fix(docs): Move the document into the zh folder Co-authored-by: lyz0328<liyanzhen@huawei.com> # message auto-generated for no-merge-commit merge: !3361 merge master into master fix(docs): Move the document into the zh folder Created-by: lyz0328 Commit-by: lyz0328 Merged-by: cann-robot Description: Move the document into the zh folder to prepare for internationalization. Related Issue: #1827 See merge request: cann/pypto!3361 | 5 months ago |
| docs(agents): Merge pypto-op-optimization skill into pypto-op-perf-tune Co-authored-by: pan-boyi<panboyi@huawei.com> # message auto-generated for no-merge-commit merge: !3812 merge translate into master docs(agents): Merge pypto-op-optimization skill into pypto-op-perf-tune Created-by: pan-boyi Commit-by: pan-boyi Merged-by: cann-robot Description: 1. 将 pypto-op-optimization skill 翻译为中文并整体并入 pypto-op-perf-tune,删除原 skill: - 配置先验检索 + 搜索空间 → perf-tune SKILL.md「主动学习原则」 - 算法级 7 项检查清单 → perf-tune SKILL.md 新增步骤 4.3(编排器外,由 optimizer agent 控制) - 受约束搜索 + 配置级→算法级排序 → pypto-op-optimizer agent 2. pypto-op-optimizer agent 全文翻译为中文,移除 pipeline stage 表述(agent 不感知 stage) 3. 同步更新 .agents/README.md、AGENTS.md 索引;全仓无残留引用 See merge request: cann/pypto!3812 | 5 months ago |
| feat(build): Support multi py3 pypto_impl whl Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !4012 merge master into master feat(build): Support multi py3 pypto_impl whl Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: feat(build): Support multi py3 pypto_impl whl See merge request: cann/pypto!4012 | 4 months ago |
| fix(docs): Fix the format issue Co-authored-by: lyz0328<liyanzhen@huawei.com> # message auto-generated for no-merge-commit merge: !4043 merge master into master fix(docs): Fix the format issue Created-by: lyz0328 Commit-by: lyz0328 Merged-by: cann-robot Description: Fix the format issue Related Issue: #1692 See merge request: cann/pypto!4043 | 4 months ago |
| fix(docs): Add error description for the sigmoid implementation of the GELU activation function. Co-authored-by: wuyi2026<wuyi55@huawei.com> # message auto-generated for no-merge-commit merge: !3760 merge master into master fix(docs): Add error description for the sigmoid implementation of the GELU activation function. Created-by: wuyi2026 Commit-by: wuyi2026 Merged-by: cann-robot Description: Add error description for the sigmoid implementation of the GELU activation function. See merge request: cann/pypto!3760 | 5 months ago |
| fix(pass): Merge InferWriteConflict into InferMemoryConflict | 4 months ago |
| fix(operator): Fix SFA bf16 pref Co-authored-by: congqiannan<congqiannan@huawei.com> # message auto-generated for no-merge-commit merge: !4038 merge master into master fix(operator): Fix SFA bf16 pref Created-by: congqiannan Commit-by: congqiannan Merged-by: cann-robot Description: fix(operator): Fix SFA bf16 pref See merge request: cann/pypto!4038 | 4 months ago |
| feat(exp2): Support DT_INT8 and DT_UINT8 data types Co-authored-by: gguuaanngg<zhangguangjun2@huawei.com> # message auto-generated for no-merge-commit merge: !4032 merge feat/exp2-int8-uint8-support into master feat(exp2): Support DT_INT8 and DT_UINT8 data types Created-by: gguuaanngg Commit-by: gguuaanngg Merged-by: cann-robot Description: This PR adds support for DT_INT8 and DT_UINT8 data types in the exp2 operation. Changes: - Add DT_INT8 and DT_UINT8 support in exp2 operation - Cast int8/uint8 to fp32 before computing 2^x - Update API documentation with new supported types - Add test cases for int8 and uint8 inputs See merge request: cann/pypto!4032 | 4 months ago |
| feat(tools): Adapt aicore error locator for Pypto_Test framework, quick modes, and argparse migration Co-authored-by: chengding888<chengding1@hisilicon.com> # message auto-generated for no-merge-commit merge: !3594 merge master into master feat(tools): Adapt aicore error locator for Pypto_Test framework, quick modes, and argparse migration Created-by: chengding888 Commit-by: chengding888 Merged-by: cann-robot Description: 1、新增 --use-pypto-test-framework 参数 2、适配框架 trace 日志路径及 program.json 递归搜索 3、替换 find_cce_file 为 grep 确定性查找 4、新增 --cce-file/--cce-line 快捷模式及 quick-a/quick-b 子 skill 5、修复 print_final_result None 处理、大括号注释、tile_fwk_config 时序等问题 6、修复安装流程及全部 codecheck 违规 7、更新 machine.md 文档(Agent/一键/手动模式) See merge request: cann/pypto!3594 | 5 months ago |
| refactor(all): Remove trailing whitespace Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2188 merge pre-commit into master refactor(all): Remove trailing whitespace Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Introduce pre-commit tools, and remove trailing white space with default plugin Related Issue: #1017 See merge request: cann/pypto!2188 | 7 months ago |
| feat(dfx): Update compiler monitor api doc for tracking compilation progress and detecting timeout. Co-authored-by: z00521416<zhangyongtao7@hisilicon.com> # message auto-generated for no-merge-commit merge: !1511 merge master into master feat(dfx): Update compiler monitor api doc for tracking compilation progress and detecting timeout. Created-by: z00521416 Commit-by: z00521416 Merged-by: cann-robot Description: 1. Update compiler monitor api doc for tracking compilation progress and detecting timeout. 2. Migrate PNG files to LFS. See merge request: cann/pypto!1511 | 8 months ago |
| feat(gcov): Support gcov of python scene Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !3250 merge master into master feat(gcov): Support gcov of python scene Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: 为 Python 前端用例增加 gcov 覆盖率统计能力。 主要修改: - 新增 gen_coverage_config.py 在 CMake POST_BUILD 阶段生成覆盖率配置 - setup.py 写入 build_dir 标记文件供 build_ci.py 定位配置文件 - build_ci.py 新增 py_generate_coverage 函数生成覆盖率报告 - 修复 CMake VERBATIM 问题,处理生成器表达式展开后的分号分隔路径(同时修复 C++ 覆盖率场景) See merge request: cann/pypto!3250 | 5 months ago |
| refactor(all): Remove trailing whitespace Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2188 merge pre-commit into master refactor(all): Remove trailing whitespace Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Introduce pre-commit tools, and remove trailing white space with default plugin Related Issue: #1017 See merge request: cann/pypto!2188 | 7 months ago |
| docs(agents): Merge pypto-op-optimization skill into pypto-op-perf-tune Co-authored-by: pan-boyi<panboyi@huawei.com> # message auto-generated for no-merge-commit merge: !3812 merge translate into master docs(agents): Merge pypto-op-optimization skill into pypto-op-perf-tune Created-by: pan-boyi Commit-by: pan-boyi Merged-by: cann-robot Description: 1. 将 pypto-op-optimization skill 翻译为中文并整体并入 pypto-op-perf-tune,删除原 skill: - 配置先验检索 + 搜索空间 → perf-tune SKILL.md「主动学习原则」 - 算法级 7 项检查清单 → perf-tune SKILL.md 新增步骤 4.3(编排器外,由 optimizer agent 控制) - 受约束搜索 + 配置级→算法级排序 → pypto-op-optimizer agent 2. pypto-op-optimizer agent 全文翻译为中文,移除 pipeline stage 表述(agent 不感知 stage) 3. 同步更新 .agents/README.md、AGENTS.md 索引;全仓无残留引用 See merge request: cann/pypto!3812 | 5 months ago |
| feat(codegen): Support KirinX90 LiteNPU Co-authored-by: zyingshu<zhangyingshu1@h-partners.com> # message auto-generated for no-merge-commit merge: !3691 merge 0528_master into master feat(codegen): Support KirinX90 LiteNPU Created-by: zyingshu Commit-by: zyingshu Merged-by: cann-robot Description: Related Issue: [[Requirement|需求建议]: pyPTO支持端侧kirinX90](https://gitcode.com/cann/pypto/issues/2027) Support KirinX90 LiteNPU See merge request: cann/pypto!3691 | 5 months ago |
| refactor(all): Remove trailing whitespace Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2188 merge pre-commit into master refactor(all): Remove trailing whitespace Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Introduce pre-commit tools, and remove trailing white space with default plugin Related Issue: #1017 See merge request: cann/pypto!2188 | 7 months ago |
| Initial commit | 10 months ago |
| feat(build): Support multi py3 pypto_impl whl Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !4012 merge master into master feat(build): Support multi py3 pypto_impl whl Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: feat(build): Support multi py3 pypto_impl whl See merge request: cann/pypto!4012 | 4 months ago |
| feat(interface): Support getinputdata for all integral types Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2224 merge refactor/deadcode into master feat(interface): Support getinputdata for all integral types Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: 1. startArgsSymbolHandlerList of devProg does not used any more 2. Support getinputdata for all integral types Related Issue: [#408](https://gitcode.com/cann/pypto/issues/408) See merge request: cann/pypto!2224 | 7 months ago |
| fix(docs): Move the document into the zh folder Co-authored-by: lyz0328<liyanzhen@huawei.com> # message auto-generated for no-merge-commit merge: !3361 merge master into master fix(docs): Move the document into the zh folder Created-by: lyz0328 Commit-by: lyz0328 Merged-by: cann-robot Description: Move the document into the zh folder to prepare for internationalization. Related Issue: #1827 See merge request: cann/pypto!3361 | 5 months ago |
| refactor(all): Remove trailing whitespace Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2188 merge pre-commit into master refactor(all): Remove trailing whitespace Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Introduce pre-commit tools, and remove trailing white space with default plugin Related Issue: #1017 See merge request: cann/pypto!2188 | 7 months ago |
| fix(interpreter): Fix tile_fwk_calculator compiler error in g++ 13.3.0 Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !1453 merge interpreter into master fix(interpreter): Fix tile_fwk_calculator compiler error in g++ 13.3.0 Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: Fix tile_fwk_calculator compiler error in g++ 13.3.0 See merge request: cann/pypto!1453 | 8 months ago |
| feat(gcov): Support gcov of python scene Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !3250 merge master into master feat(gcov): Support gcov of python scene Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: 为 Python 前端用例增加 gcov 覆盖率统计能力。 主要修改: - 新增 gen_coverage_config.py 在 CMake POST_BUILD 阶段生成覆盖率配置 - setup.py 写入 build_dir 标记文件供 build_ci.py 定位配置文件 - build_ci.py 新增 py_generate_coverage 函数生成覆盖率报告 - 修复 CMake VERBATIM 问题,处理生成器表达式展开后的分号分隔路径(同时修复 C++ 覆盖率场景) See merge request: cann/pypto!3250 | 5 months ago |
| feat(build): Support multi py3 pypto_impl whl Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !4012 merge master into master feat(build): Support multi py3 pypto_impl whl Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: feat(build): Support multi py3 pypto_impl whl See merge request: cann/pypto!4012 | 4 months ago |
| feat(machine): Modify file ownership Co-authored-by: W4termy<wangmingyang21@huawei.com> # message auto-generated for no-merge-commit merge: !3820 merge class into master feat(machine): Modify file ownership Created-by: W4termy Commit-by: W4termy Merged-by: cann-robot Description: hccl相关文件移出machine责任田 See merge request: cann/pypto!3820 | 5 months ago |
| feat(distributed): Case for distributed python st Co-authored-by: luozhonglin222<luozhonglin1@huawei.com> # message auto-generated for no-merge-commit merge: !1477 merge master into master feat(distributed): Case for distributed python st Created-by: luozhonglin222 Commit-by: luozhonglin222 Merged-by: cann-robot Description: 1.支持通信python用例看护,当前只支持单卡python ST用例,多卡ST用例需要适配 See merge request: cann/pypto!1477 | 7 months ago |
| feat(python): Bump version of pybind11 to 3.0.1 Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2448 merge feat/pybind11 into master feat(python): Bump version of pybind11 to 3.0.1 Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Bump version of pybind11 to 3.0.1 Related Issue: #1200 See merge request: cann/pypto!2448 | 6 months ago |
| feat(operator): Add operator of deepseekV4 Co-authored-by: sunhaoxuan2024<sunhaoxuan3@h-partners.com> # message auto-generated for no-merge-commit merge: !2793 merge deepseekv4 into master feat(operator): Add operator of deepseekV4 Created-by: sunhaoxuan2024 Commit-by: sunhaoxuan2024 Merged-by: cann-robot Description: 新增deepseek_v4 算子 See merge request: cann/pypto!2793 | 6 months ago |
| feat(build): Support multi py3 pypto_impl whl Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !4012 merge master into master feat(build): Support multi py3 pypto_impl whl Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: feat(build): Support multi py3 pypto_impl whl See merge request: cann/pypto!4012 | 4 months ago |