已开启
feat: add CustomGRUV2 operator #10
feat: add CustomGRUV2 operator #10
已开启
nawenyu139创建于 8月19日
nawenyu139成员
8月19日

变更规模:+5271 行新增 / -1 行删除,共 52 个文件

背景

分支 feat/custom-gru-v2 → master,含 1 个 commit。
master 当前 tip:8037f22 feat: add Triton-Ascend interpolate operator。

Commits(各 commit 做什么)

  • ab7898e404e6abdaa7ec80d0c735aa4c22d5c135 feat: add CustomGRUV2 operator
    单提交重铸+PR 面收敛:剔除与 CustomGRUV2 无关的 triton 系搭车文件
    (axis_spectral/real_fft/_local_ai4fwi_ops/whl 冒烟/build_install_ops.sh,与 #57/#58/#59 同标准);
    ai4fwi 包 init 对齐 #57 版(all 去 triton);custom_gru_v2 全部代码逐字节不变。

变更面

52 files changed, 5271 insertions(+), 1 deletion(-)

  • M README.md
  • A ascendc/operators/custom_gru_v2/delivery/README.md
  • A ascendc/operators/custom_gru_v2/delivery/bindings.cpp
  • A ascendc/operators/custom_gru_v2/delivery/custom_gru_v2.py
  • A ascendc/operators/custom_gru_v2/op_host/custom_gruv2.cpp
  • A ascendc/operators/custom_gru_v2/op_host/custom_gruv2_tiling.h
  • A ascendc/operators/custom_gru_v2/op_kernel/custom_gruv2.cpp
  • A ascendc/operators/custom_gru_v2/testplan/README.md
  • A ascendc/operators/custom_gru_v2/testplan/conftest.py
  • A ascendc/operators/custom_gru_v2/testplan/coverage/run_coverage.py
  • A ascendc/operators/custom_gru_v2/testplan/integration/test_e2e_inference.py
  • A ascendc/operators/custom_gru_v2/testplan/integration/test_e2e_training.py
  • A ascendc/operators/custom_gru_v2/testplan/msopst/_memcheck_run.py
  • A ascendc/operators/custom_gru_v2/testplan/msopst/_prof_run.py
  • A ascendc/operators/custom_gru_v2/testplan/msopst/_racecheck_run.py
  • A ascendc/operators/custom_gru_v2/testplan/msopst/custom_gruv2_test.json
  • A ascendc/operators/custom_gru_v2/testplan/msopst/npu_reports/NPU_TEST_REPORT.md
  • A ascendc/operators/custom_gru_v2/testplan/msopst/npu_reports/raw/memcheck.log
  • A ascendc/operators/custom_gru_v2/testplan/msopst/npu_reports/raw/msopst_run.log
  • A ascendc/operators/custom_gru_v2/testplan/msopst/npu_reports/raw/msprof_run.log
  • A ascendc/operators/custom_gru_v2/testplan/msopst/npu_reports/raw/op_statistic_batch.csv
  • A ascendc/operators/custom_gru_v2/testplan/msopst/npu_reports/raw/op_statistic_single.csv
  • A ascendc/operators/custom_gru_v2/testplan/msopst/npu_reports/raw/op_summary_batch.csv
  • A ascendc/operators/custom_gru_v2/testplan/msopst/npu_reports/raw/op_summary_single.csv
  • A ascendc/operators/custom_gru_v2/testplan/msopst/npu_reports/raw/racecheck.log
  • A ascendc/operators/custom_gru_v2/testplan/msopst/npu_reports/raw/sanitizer_run.log
  • A ascendc/operators/custom_gru_v2/testplan/msopst/npu_reports/raw/st_report.json
  • A ascendc/operators/custom_gru_v2/testplan/msopst/run_prof.sh
  • A ascendc/operators/custom_gru_v2/testplan/msopst/run_sanitizer.sh
  • A ascendc/operators/custom_gru_v2/testplan/pack_submission.sh
  • A ascendc/operators/custom_gru_v2/testplan/performance/bench_backward.py
  • A ascendc/operators/custom_gru_v2/testplan/performance/bench_forward.py
  • A ascendc/operators/custom_gru_v2/testplan/pytest.ini
  • A ascendc/operators/custom_gru_v2/testplan/requirements.txt
  • A ascendc/operators/custom_gru_v2/testplan/run_all_tests.sh
  • A ascendc/operators/custom_gru_v2/testplan/test_evidence.md
  • A ascendc/operators/custom_gru_v2/testplan/test_plan.md
  • A ascendc/operators/custom_gru_v2/testplan/unit/test_backward_precision.py
  • A ascendc/operators/custom_gru_v2/testplan/unit/test_coverage_paths.py
  • A ascendc/operators/custom_gru_v2/testplan/unit/test_edge_cases.py
  • …(其余 10 个文件省略,共 50 个)

验证

  • license 头检查:bash scripts/check_license_header.sh(40 个纳管扩展变更文件)→ passed,0 缺失
  • ruff 0.14.14:30 个 .py 变更文件 → All checks passed
  • clang-format 18.1.8(--dry-run -Werror):5 个 c/cpp/h → 0 违规;trailing-whitespace 0、end-of-file 0
  • msopst/mssanitizer/msprof 历史报告随 testplan/msopst/npu_reports/ 在库(st_report.json 等)
  • 性能/精度测试证据由执行机按 SACT KB 指导书(1024-油气算子PR9-PR10-精度性能测试执行指导书-20261024.md)执行中,回传后补贴最新截图与报告
  • SCA 待流水线报告确认(本地无 openlibing)

合入

由 maintainer/owner 手动合入;两提交形态如需重铸单提交由 owner 执行(force push)。

精度与性能测试结果(SACT KB 3dc60a7,2026-10-27 真机)

CustomGRUV2 — 全部通过:UT 54/55、IT 10/11、memcheck/racecheck PASS、精度 1.19e-07、msProf 2 shapes、稳定性 10×10 一致

  • UT / IT:54/55、10/11(各 1 项跨分支预期失败)
  • 精度:PASS,max_abs_err 1.19e-07(vs PyTorch CPU fp64)
  • memcheck / racecheck:PASS
  • msProf:2 shapes 采集完成
  • 稳定性:10×10 torch.equal 一致

完整报告原文见本 PR 讨论区最新评论;原始证据(UT/IT/memcheck/msprof/bench 日志与 CSV)位于
SACT Knowledge Base 仓 oil-gas-ops/raw/(commit 3dc60a7)。

测试报告附件

本 PR 直接携带 NPU 精度 + 性能测试报告文件(点击下载查看):

2026-10-28 合入冲突刷新

master 前进至 8037f22(新增 Triton interpolate 算子)后本分支出现 README.md 冲突,冲突面仅「接口支持清单」的算子计数行。已按并集解冲突并重建为基于 8037f22 的单提交:AscendC 4→5、Triton 3→4、Composite 保持 1,表格两侧新增行(interpolate 与本 PR 算子)均保留;算子代码零改动。

likedislike
合并受阻
Nnawenyu139成员
8月19日 创建了 pull request,commit 4609d8d5
CANN-robotCANN-robot成员
8月19日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
8月19日 评论:

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

⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 2 person(s) per module)、approve (requires ≥ 1 person(s) per module)

Module Approval Details

module lgtm status approve status
sig-oil-gas-engineering ❌ (0/2)(You can also ask: 胡艺馨, 张乐乐, 李鹏, 孙浩, 张宝凌) ❌ (0/1)(You can also ask: 李一鸣, 张乐乐, 孙浩, 张宝凌, 徐澜)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

nawenyu139, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
nawenyu139成员
8月19日 评论:

已用个人绑定邮箱(slamdunk111@163.com,已签CLA)重新 squash 单一 commit 并解耦无关算子。重新触发审核。

likedislike
nawenyu139成员
8月19日 评论:

/check-cla

likedislike
此处折叠了156条消息 查看更多
Nnawenyu139成员
2 天前 预合并成功(commit_id: 33befdbedba5536b1864b8a54bc4bb05099d35aa)
CANN-robot
CANN-robot成员
2 天前 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
2 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
2 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
2 天前 添加了label:ci-pipeline-passed