Pull Request has been successfully merged by CANN-robot.
(Thank you for 吴成文's contribution.)变更摘要
本 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:




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
/approveor/lgtm- Commenting
/approveimplies 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. 👍


/lgtm
/approve


Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


变更内容
foreach_minimum_list
ops_proto_math.h重复定义GatherShapes的ops_proto_nn.h)。masked_softmax_with_rel_pos_bias
b*w、blockDim、GM 偏移使用 64 位,修复大 shape 溢出;inner_precision_mode,scale 显式 float→double;验证
关联 Issue