Merged
fix(foreach,masked_softmax): GEIR 样例去冗余 include + MaskedSoftmax 质量加固 #14344
fix(foreach,masked_softmax): GEIR 样例去冗余 include + MaskedSoftmax 质量加固 #14344
Merged
吴成文Add on 10 days ago
吴成文
吴成文Collaborators
10 days ago

变更内容

foreach_minimum_list

  • GEIR 示例移除冗余头文件(含与 CANN ops_proto_math.h 重复定义 GatherShapes 的 ops_proto_nn.h)。

masked_softmax_with_rel_pos_bias

  • tiling 维度超过 uint32 时拒绝,避免截断;
  • BW b*w、blockDim、GM 偏移使用 64 位,修复大 shape 溢出;
  • 原有平台隔离中补充 arch35 DataCopyPad,修复 mask/bias 未搬运;
  • fallback 按 int64 读取 inner_precision_mode,scale 显式 float→double;
  • aclnn/GEIR 示例修复资源泄漏与失败路径清理;
  • 文档修正图模式链接、参数类型/格式、产品支持与已实测约束;
  • Host UT 保留维度越界用例。

验证

  • Host UT 33/33;
  • MaskedSoftmaxWithRelPosBias aclnn 示例、GEIR 示例(12 场景)通过;
  • Ascend950 定向与 L0/L2/GEIR 验证完成;
  • ascend910b、ascend310p 单算子编译通过(未上板)。

关联 Issue

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for 吴成文's contribution.)
吴成文吴成文Collaborators
10 days ago Created pull request, commit 05a5c7c1
atomgit-bot
atomgit-bot
10 days ago Comments:

变更摘要

本 PR 是对 foreach/foreach_minimum_list/examples/test_geir_foreach_minimum_list.cpp 示例的头文件清理重构,目标是去掉可由其他头文件传递包含或实际未使用的 include,同时显式引入所需算子原型头文件。改后仅保留 graph.h、ge_api.h、named_io_node_builder.h 三个原有依赖,并新增 ops_proto_math.h 与 ops_proto_nn.h,示例的构建入口与验证命令 bash build.sh --run_example foreach_minimum_list graph --soc=ascend950 保持不变。

主要改动

  • 移除可传递包含的基础头文件:删除了 types.h、tensor.h、ge_error_codes.h、gnode.h,这些内容由保留的 graph.h 传递引入,减少示例对底层数据类型头文件的直接依赖。
  • 移除未使用的头文件:删除了 ge_api_types.h、ge_ir_build.h、array_ops.h 以及相对路径引入的 ../op_graph/foreach_minimum_list_proto.h,示例不再直接引用这些未被使用的声明。
  • 显式引入算子原型头文件:新增 ops_proto_math.h 和 ops_proto_nn.h,替代原先通过 array_ops.h 等间接获得算子定义的方式,使示例依赖的算子原型来源更明确。
  • 保留核心依赖不变:graph.h、ge_api.h、named_io_node_builder.h 以及标准库头文件维持原样,示例的构图与 API 调用逻辑不受影响。

🧩 本次 Review 已使用自定义 Skill:

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

代码审查

✅ 未发现问题


🧩 本次 Review 已使用自定义 Skill:

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
10 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
10 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
*/*/README.md ✅ 陈娇, 钱泽洪, 汤平川 (3/2) ✅ 陈娇 (1/1)
*/*/docs/acl*.md ✅ 汤平川, 陈娇, 钱泽洪 (3/2) ✅ 陈娇 (1/1)
foreach ✅ 汤平川, 钱泽洪 (2/2) ✅ 汤平川, 钱泽洪 (2/1)
norm ✅ 汤平川, 钱泽洪 (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

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

likedislike
207 messages are collapsed here。 See more
qianzehong
qianzehongCollaborators
6 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
6 days ago Added label: lgtm
CANN-robotCANN-robotCollaborators
6 days ago Closed associated issue
CANN-robotCANN-robotCollaborators
6 days ago Merged pull request
CANN-robot
CANN-robotCollaborators
6 days ago Comments:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike