Merged
同步 CheckerL2 最新代码到 hccl_vm #6047
git_qkAdd on 24 days ago
同步 CheckerL2 最新代码到 hccl_vm #6047
Merged
git_qkAdd on 24 days ago
git_qkCollaborators
24 days ago

描述

对 test/hccl_vm/src/proxy/level2/aclrt_kernel_stub.cc 进行两项改进:

  1. clang-format 代码格式化:全文件按 .clang-format 规范(120 列宽、指针左对齐、K&R 大括号等)统一代码风格,消除格式化告警。
  2. 零大小 buffer no-op 处理:VirtualExecuteAivKernel 新增 bool& isNoop 输出参数,当 ResolveVirtualAivBufferSizes 检测到任一 buffer size=0(等同 count=0 空算子)时,提前释放资源并返回 ACL_SUCCESS,调用方(aclrtLaunchKernelWithHostArgs 和 LaunchAivKernelRaw)检查 isNoop 后跳过 task insert,避免无效任务入队。

变更类型

关联的Issue

NA

测试

已完成的测试用例和场景:

  1. 本地编译通过(bash build.sh --pkg)
  2. 代码格式化后 clang-format 检查通过

补充的UT用例:
无新增 UT,变更仅涉及测试桩代码格式化和已有逻辑的 no-op 分支保护。

文档更新

无文档更新。

合入检查

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for git_qk's contribution.)
Ggit_qkCollaborators
24 days ago Created pull request, commit 4bc32d5e
atomgit-bot
atomgit-bot
24 days ago Comments:

🤖 正在生成合并请求摘要,请稍候…

likedislike
Incorrect?
atomgit-bot
atomgit-bot
24 days ago Comments:

🤖 AI 代码检视正在进行中,请稍候…

likedislike
Incorrect?
git_qkCollaborators
24 days ago Comments:

/compile

likedislike
Ggit_qkCollaborators
24 days ago Pre merge succeeded (commit_id: e348b6b6aea9e542f8ef932d19c3d729c703acb1)
CANN-robotCANN-robotCollaborators
24 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
24 days ago Comments:

CLA Signature Pass

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

likedislike
CANN-robot
CANN-robotCollaborators
24 days ago Comments:

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
test/hccl_vm ✅ 詹海峰, 崔正 (2/2) ✅ 詹海峰, 崔正 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
24 days ago Set leabclove,Flashfuture,yanglianxiang2,whk19940509,linyf950,yanzhenghang,chenliang267,yanyefeng,chenhao_,dingweiqin_57,songmingyang,wenxuemin,LQ_OY,yangxiaoyuan,laodazhao1,yangshaohua,chenke2026,zhongqin2020,bz_lee,Innoecho,chenyia,temper7620,zhangxp1030,lilin_137,hulk1997,virtual_runtime,zheng555,ZhanPhil,ouyangxizi,one_random as approver
CANN-robotCANN-robotCollaborators
24 days ago Set whk19940509,virtual_runtime,zheng555,ZhanPhil as approver
atomgit-bot
atomgit-bot
24 days ago Comments:

⚠️ 本次变更过大(151 个可审文件、14609 行,预估需 13 轮分片审查),已超出 AI 代码评审的处理范围,本次跳过。建议拆分为更小的 PR 以获得有效评审。

likedislike
Incorrect?
CANN-robot
CANN-robotCollaborators
24 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
24 days ago Added label: ci-pipeline-running
atomgit-bot
atomgit-bot
24 days ago Comments:

⚠️ 本次变更过大(151 个可审文件、14609 行,预估需 13 轮分片审查),已超出 AI 代码评审的处理范围,本次跳过。建议拆分为更小的 PR 以获得有效评审。

likedislike
Incorrect?
Ggit_qkCollaborators
24 days ago Modify description of pull request
CANN-robotCANN-robotCollaborators
24 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
24 days ago Added label: ci-pipeline-failed
CANN-robot
CANN-robotCollaborators
24 days ago Comments:

流水线分析报告 — hcomm run#7805

流水线: https://gitcode.com/CANN/hcomm/actions/runs/dc25a584f73b4a1ba4e7c87587a7a4ed | PR#6047 | 2026-10-15 20:01:08 ~ 20:04:36 | 失败 Job 2 个

定界结论: 代码问题x2(共 2 个根因)

根因 #1(代码问题 / 代码检查错误)

  • 根因: pre-commit OAT 合规检查拦截 — 本 PR 新增的 test/hccl_vm/ 下 42 个文件 license header 缺失或误用
  • 处置: 通知 PR 提交者修复
    • 为 42 个 License Header Invalid 文件补齐仓库标准 license header(其中 src/plugin/light_performance/main.py 为 GPLStyleLicense、src/device_arm/level2/proxy/dlopen_stub.cc 为 InvalidLicense, 需替换为仓库标准头)
    • 参考链接: 本地执行 pre-commit 指导
  • 影响 Job: CodeCheck_precommit

根因 #2(代码问题 / 代码检查错误)

  • 根因: staticcheck md_check 告警
  • 处置: 通知 PR 提交者修复
    • 修复以下 staticcheck 拦截项:
      • [StaticCheck_tag_closed] test/hccl_vm/test/test_en.md:40 Html 标签匹配失败:<ModuleData>
      • [StaticCheck_tag_closed] test/hccl_vm/test/test.md:40 Html 标签匹配失败:<ModuleData>
      • [StaticCheck_link_validity] test/hccl_vm/docs/simulator_runner_data_model_en.md:1871 本地路径链接无法访问(sim::X)
      • [StaticCheck_link_validity] test/hccl_vm/docs/simulator_runner_data_model.md:1871 本地路径链接无法访问(sim::X)
      • 报告: https://ascend-ci.obs.cn-north-4.myhuaweicloud.com/CANN/hcomm/ci/package/6047/StaticCheck.csv
  • 影响 Job: CodeCheck_staticcheck

排除项: 无编译/测试类失败; 两个失败 Job 日志中无平台内部错误、网络或环境异常信号, 均为确定性检查拦截。

失败根因分析

根因 #1: 代码问题 / 代码检查错误 — pre-commit OAT 合规检查: 42 个新增文件 License Header Invalid
  • 判据: precommit 格式不合规(OAT Compliance Check Failed)
  • 定位步骤: 3_precommit.log
  • 影响 Job: CodeCheck_precommit (37s)
  • 根因证据(日志原文):
OAT Compliance Check (Python Edition)....................................Failed
OAT: Compliance issues found. Commit blocked.
OAT Scan Result Summary
Files Checked: 175
License Header Invalid Total Count: 42
Name:	License Header Invalid	Content:	NoLicenseHeader	File: .../cann/hcomm/test/hccl_vm/asset/cluster_model/config/cluster/ascend950_cluster_16_server_normal.yaml
Name:	License Header Invalid	Content:	GPLStyleLicense	File: .../cann/hcomm/test/hccl_vm/src/plugin/light_performance/main.py
Name:	License Header Invalid	Content:	InvalidLicense	File: .../cann/hcomm/test/hccl_vm/src/device_arm/level2/proxy/dlopen_stub.cc
::error::precommit.py 异常退出: exit code=1, signal=null
  • 说明: 本 PR 共 534 个变更文件(新增 test/hccl_vm/ 框架), OAT 扫描确认 42 个 license header 不合规(40 个 NoLicenseHeader、1 个 GPLStyleLicense、1 个 InvalidLicense), 全部位于 test/hccl_vm/ 新增路径下, 属确定性合规拦截, 重新触发不会恢复。
根因 #2: 代码问题 / 代码检查错误 — staticcheck md_check 4 项拦截
  • 判据: 静态检查有告警
  • 定位步骤: 3_staticcheck.log
  • 影响 Job: CodeCheck_staticcheck (2m23s)
  • 根因证据(日志原文):
exit md_check status: 1
[ERROR]: md_check result: NO PASS!!!
[ERROR]: Discovered 1 warnings, Please download the report!
::error::run-staticcheck.sh failed: exit code=1, signal=null
  • 拦截项明细(来自 StaticCheck 报告, 文件均为本 PR 新增):
    • [StaticCheck_tag_closed] test/hccl_vm/test/test_en.md:40 Html 标签匹配失败:<ModuleData>
    • [StaticCheck_tag_closed] test/hccl_vm/test/test.md:40 Html 标签匹配失败:<ModuleData>
    • [StaticCheck_link_validity] test/hccl_vm/docs/simulator_runner_data_model_en.md:1871 本地路径链接无法访问(sim::X)
    • [StaticCheck_link_validity] test/hccl_vm/docs/simulator_runner_data_model.md:1871 本地路径链接无法访问(sim::X)
    • 报告: https://ascend-ci.obs.cn-north-4.myhuaweicloud.com/CANN/hcomm/ci/package/6047/StaticCheck.csv
结构化定界摘要
[
  {
    "repo": "hcomm",
    "run_number": 7805,
    "Failed_Type": "代码问题",
    "Failed_Sub_Type": "代码检查错误",
    "Failed_Reason": "pre-commit OAT 合规检查拦截: PR 新增 test/hccl_vm/ 下 42 个文件 License Header Invalid(40 个 NoLicenseHeader, main.py 为 GPLStyleLicense, dlopen_stub.cc 为 InvalidLicense), Commit blocked",
    "evidence": "OAT: Compliance issues found. Commit blocked. / License Header Invalid Total Count: 42",
    "suggestion": "为 42 个新增文件补齐仓库标准 license header(GPLStyleLicense/InvalidLicense 两处替换为标准头)后重新触发",
    "jobs": "CodeCheck_precommit"
  },
  {
    "repo": "hcomm",
    "run_number": 7805,
    "Failed_Type": "代码问题",
    "Failed_Sub_Type": "代码检查错误",
    "Failed_Reason": "staticcheck md_check 未通过: test.md/test_en.md:40 Html 标签匹配失败(ModuleData 标签未闭合), simulator_runner_data_model.md/_en.md:1871 本地路径链接无法访问(sim::X)",
    "evidence": "[ERROR]: md_check result: NO PASS!!! / [ERROR]: Discovered 1 warnings, Please download the report!",
    "suggestion": "修复 4 个 md 拦截项(标签闭合与本地链接)后重新触发",
    "jobs": "CodeCheck_staticcheck"
  }
]

由门禁失败定界分析自动生成 | repo: hcomm | run: dc25a584f73b4a1ba4e7c87587a7a4ed | PR#6047

likedislike
Ggit_qkCollaborators
24 days ago Pre merge succeeded (commit_id: 946993bb81f9a6f18a8614efc6a1a20ed420fc9e)
Ggit_qkCollaborators
24 days ago Pushed 1 commits:58c29a42-fix: OAT合规及文档格式修正 (test/hccl_vm)
Ggit_qkCollaborators
24 days ago Pre merge succeeded (commit_id: 4d275ddb8075bb1dcdaf35d854633ac1cadb8d64)
CANN-robotCANN-robotCollaborators
24 days ago Removed label: cann-cla/yes
CANN-robotCANN-robotCollaborators
24 days ago Added label: stat/needs-squash
CANN-robotCANN-robotCollaborators
24 days ago Added label: cann-cla/yes
git_qkCollaborators
24 days ago Comments:

/compile

likedislike
Ggit_qkCollaborators
24 days ago Pre merge succeeded (commit_id: cf4a053db7b371129c756c5e9d509c351256c94d)
CANN-robot
CANN-robotCollaborators
24 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
24 days ago Removed label: ci-pipeline-failed
CANN-robotCANN-robotCollaborators
24 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
24 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
24 days ago Added label: ci-pipeline-passed
CANN-robot
CANN-robotCollaborators
24 days ago Comments:

/ai review force

likedislike
atomgit-bot
atomgit-bot
24 days ago Comments:

🤖 AI 代码检视正在进行中,请稍候…

likedislike
Incorrect?
atomgit-bot
atomgit-bot
24 days ago Comments:

⚠️ 本次变更过大(127 个可审文件、14687 行,预估需 13 轮分片审查),已超出 AI 代码评审的处理范围,本次跳过。建议拆分为更小的 PR 以获得有效评审。

likedislike
Incorrect?
ZhanPhilCollaborators
24 days ago Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
24 days ago Added label: approved
zheng555Collaborators
24 days ago Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
24 days ago Added label: lgtm
CANN-robotCANN-robotCollaborators
24 days ago Merged pull request