Closed
[Bug-Report|缺陷反馈]: AdamApplyOneAssign、ApplyAdamV2 当前交付版本错误码分类及重复上报问题 #7494
陈展熹Add on  25 days agoClosed at  25 days ago
陈展熹
陈展熹Collaborators
25 days ago Create

Describe the current behavior / 问题描述

PR #12731 的问题版本 39598b26df8699fdbeaeacce6126f6a3bb56f1e9 中,AdamApplyOneAssign、ApplyAdamV2 的部分 Host/Graph 拒绝路径使用普通 OP_LOGE,上报通用 EZ9999,无法按缺失参数、shape/rank、dtype、format 等原因分类。部分校验合并 dtype 与 format,广播辅助函数和上层还存在重复报错路径。

典型位置:

  • optim/adam_apply_one_assign/op_host/adam_apply_one_assign_infershape.cpp:不可广播、状态 shape 不匹配使用普通 OP_LOGE。
  • optim/apply_adam_v2/op_host/arch35/apply_adam_v2_tiling_arch35.cpp:输出数量、dtype、合并 dtype/format 校验使用普通 OP_LOGE;广播辅助函数自行报错。
  • 同 PR 两算子的其余 tiling、InferShape、InferDataType 失败路径需要一起核对。

Environment Information / 环境信息

  • 仓库:cann/ops-nn,PR #12731,目标分支 master。
  • Linux x86_64、CANN 9.2.0、Ascend950 Host 实现。
  • 使用 SDK 上下文构造器和真实 ErrorManager 验证错误码,无需执行设备 Kernel。

Steps to reproduce the issue / 重现步骤

  1. 检出上述问题提交,分别构造缺失必需输入、非法 dtype/format、rank 超限、不可广播和状态 shape 不匹配的 Host 调用。
  2. 调用两算子的 tiling / 推导入口,读取 ErrorManager 报告和失败返回值。
  3. 检查报告是否为对应预定义错误码,并核对一次失败是否只报告一次。对空 context 单独验证安全返回。

Describe the expected behavior / 预期结果

  • 缺失必需输入使用 EZ0004;shape 使用 EZ0008/EZ0009/EZ0010;rank 使用 EZ0012;format 使用 EZ0017/EZ0018;dtype 使用 EZ0019;输入输出数量使用 EZ0022;非法模式使用对应属性错误码。
  • 内部 tiling、推导上下文错误分别使用 EZ1008、EZ1014。
  • 拆分不同原因的合并校验;每条受测失败路径只产生一条结构化错误报告。
  • 合法输入的校验、推导和 tiling 行为保持正确,空 context 安全失败。

修复提交 733d087cfcd3f24d0bf586e7b57e53ae995b610f 已替换相关通用日志宏,并移除广播辅助函数的重复上报。真实 SDK Host UT 共 11 PASS / 0 skip,覆盖分类错误码、单次上报、空 context 及原有正常场景;CANN 9.2 / Ascend950 编译打包通过。

Special notes for this issue / 备注

修复 PR:ops-nn #12731。关联历史综合记录 ops-nn #6540;本 issue 限定于上述 PR 交付版本的错误码整改与回归验证,不代表该历史记录中的其他未决项已解决。

likedislike
陈展熹陈展熹Collaborators
25 days ago Added label: bug-report
yuning_chenyuning_chenCollaborators
25 days ago Assign yourealize as responsible person
CANN-robotCANN-robotCollaborators
25 days ago Close issue
CANN-robotCANN-robotCollaborators
25 days ago Added label: resolved
陈展熹陈展熹Collaborators
16 days ago Associated pull request
陈展熹陈展熹Collaborators
10 days ago Associated pull request
陈展熹陈展熹Collaborators
10 days ago Associated pull request
陈展熹陈展熹Collaborators
10 days ago Deleted associated pull request: perf(adam_apply_one_assign): 通用合轴优化连续输入搬运