Pull Request has been successfully merged by CANN-robot.
(Thank you for fazhenyao123's contribution.)变更摘要
本变更修正索引类算子中框架内部对象缺失时的错误码归因问题:原先框架上下文、CompileInfo、PlatformInfo、attrs、输出 Shape 等框架侧对象为空时被误报为用户必填参数未填(EZ0004),现按 Tiling/Prepare 与 InferShape/InferDataType 两条路径分别改用 EZ1008 与 EZ1014 上报。各改动文件均新增局部静态辅助函数(ReportMissingTilingObject 或 ReportMissingInferenceObject),统一构造包含函数名、缺失框架对象名及排查建议的 reason 字符串,先调用 OP_LOGE_WITHOUT_REPORT 打日志,再通过 REPORT_PREDEFINED_ERR_MSG 以 opName、reason 两个 Arglist 键上报;原有判空条件与 GRAPH_FAILED 返回保持不变,覆盖 IndexCheck、IndexPutWithSort、LinearIndex、LinearIndexV2 四个算子。
主要改动
- 新增统一上报辅助函数: 四个算子的 tiling/infershape 文件中各定义匿名命名空间内的
ReportMissingTilingObject或ReportMissingInferenceObject,以functionName与objectName拼接reason,固定opName/reason键值对并选择EZ1008(Tiling/Prepare 路径)或EZ1014(InferShape/InferDataType 路径)。 index_check全量替换框架对象误报:index_check_tiling.cpp将tilingContext_、compileInfo、computeNodeInfoPtr、idxInstanceInfoPtr、rawTilingData、workspaces、context、platformInfo等判空由OP_LOGE_WITH_INVALID_INPUT改为调用ReportMissingTilingObject;index_check_infershape.cpp与index_check_graph_infer.cpp的context判空改为调用ReportMissingInferenceObject。linear_index_v2细化缺失对象标识:linear_index_v2_infershape.cpp中输出 Shape 判空由原先误标的"index"改为"outputShape(index)"并使用推理侧上报;linear_index_v2_tiling.cpp的Init与TilingPrepareForLinearIndexV2中compileInfo、computeNodeInfoPtr、idxInstanceInfoPtr、platformInfo判空改用 Tiling 侧上报。linear_index与index_put_with_sort同类替换:linear_index_tiling.cpp中tilingContext、compileInfo、attrs、rawTilingData、platformInfo判空,以及index_put_with_sort_tiling.cpp中attrs、compileInfo、platformInfo判空,均改为调用各自文件内的ReportMissingTilingObject;linear_index中仍保留针对用户输入indices、shape的原有EZ0004判空不动。- 上报链路与行为保持不变: 新增
#include <string>、#include <vector>支撑reason与键值容器,日志统一经OP_LOGE_WITHOUT_REPORT输出,错误码经可见公共ErrorManager入口REPORT_PREDEFINED_ERR_MSG首报,条件判断与失败返回路径未调整。
🧩 本次 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 |
|---|---|---|
| index | ✅ 陈展熹, 陈兴宇 (2/2) | ✅ 陈兴宇 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
fazhenyao123, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


/check-pr


The following labels are not ready.
lgtm: Please wait for committers to review the code.
approved: Please wait for committers to review the code.
ci-pipeline-passed: Please wait for the CI test to be completed. You can also comment /compile to retry it!


/compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


/lgtm
/approve


您好,pr合入已准备就绪,请尽快联系committer进行检视,谢谢!
@yangyang016 @yourealize @su-yueming @chenxingyu18 @kevin_huang1234 @u010470851 @wang-xing001


/lgtm
/approve


/check-pr


The following label is not ready.
lgtm: Please wait for committers to review the code.


/lgtm


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
/approve: FelixTang7
/lgtm: FelixTang7


原 !12754 合入后的错误码排查表发现:框架上下文、CompileInfo、PlatformInfo、RuntimeAttrs、输出 Shape 等内部对象缺失,被误报为用户必填参数为空(EZ0004)。本变更按排查表 F01–F05 修正 30 处:index_check 12 处、linear_index_v2 9 处、linear_index 6 处、index_put_with_sort 3 处;index_put 没有表中明确问题。
Tiling/Prepare 路径使用 EZ1008,InferShape/InferDataType 路径使用 EZ1014。消息包含算子、函数名、缺失框架对象和排查建议;保持原判断条件及 GRAPH_FAILED 返回。实际用户输入的 EZ0004 判空保留。两个码的注册 Arglist 均为 opName, reason,通过可见公共 ErrorManager 入口首报。
关联:ops-nn #7444、原 !12754。目标 master,基准 dbad856de2c6cea62205b9f14a94558341e4142d,本次 head 734a5e1f1f79c78becd17480f1484c3eb062cf2d。
验证(A5_ci / x86_64 / CANN 9.2.0-beta.2):
按用户要求,UT、测试 CMake 和验证产物全部仅保存在本地,PR 最终差异只有 7 个生产文件。
排查表 F14 明确保留的三处分配诊断继续使用用户指定的 ACLNN_ERR_INNER_NULLPTR,本次未改动;不宣称已解决实际 allocator 的正式资源首报。通用静态审计仍有既有 include/CMake 解析及本地 reporter 控制流识别限制,候选—审计未对账为 0;四份处置检查为 0/0/1/0,linear_index 的 3 个 F14 保留项仍标为 BLOCKED。本 PR 修复 F01–F05,不宣称原任务全链路治理关闭。