Closed
[Bug-Report|缺陷反馈]: moeGatingTopK算子输出不规范问题修复 #5181
CPZhouAdd on  Sep 10Closed at  Sep 10
CPZhou
CPZhouCollaborators
Sep 10 Create

Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.

Describe the current behavior / 问题描述 (Mandatory / 必填)

1.moeGatingTopK算子输入k=-1, 输出outOut的dtpe不正确时(fp16),报错错误码为561000,不符合预期
2.moeGatingTopK算子输出y的最后一维不等于k时,报错打印的日志中,shape额外多了一层中括号

Environment Information / 环境信息 (Mandatory / 必填)

昇腾硬件型号:Ascend950

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

按照描述构造用例调用aclnnMoeGatingTopKV2即可复现

Describe the expected behavior / 预期结果 (Mandatory / 必填)

1.输入k=-1,报错错误码应该为 561002
2.输出dtype不正确,报错错误码应该为161002
3.输出y的最后一维不等于k时,错误日志中的shape应该为正确的shape,没有额外的中括号

场景1报错错误码不正确
image.png

场景2报错shape不正确
image.png

Special notes for this issue/备注 (Optional / 选填)

likedislike
CPZhouCPZhouCollaborators
Sep 10 Added label: bug-report
CPZhouCPZhouCollaborators
Sep 10 Assign ZhouChuping as responsible person
游震
游震Collaborators
Sep 10 Comments:

/assign @ZhouChuping

likedislike
CANN-robotCANN-robotCollaborators
Sep 10 Close issue
CANN-robotCANN-robotCollaborators
Sep 10 Added label: resolved
周云飞
周云飞Collaborators
Oct 14 Comments:

错误码与日志说明

关联 ops-transformer !11692 已合入 master。当前非空、非零元素 outOut 只接受 FLOAT32,类型错误在 ACLNN CheckParams 中返回 ACLNN_ERR_PARAM_INVALID(161002),不再按输入支持的 FP16/BF16 类型列表放行。

k 等属性错误与 dtype 检查走不同层次。当前文档对 k 超范围等情形列的是 ACLNN_ERR_INNER_NULLPTR(561103),与 L0 创建结果失败后 ACLNN 的空结果检查一致,并非原预期的 561002;不能直接把 host tiling 的内部失败状态当作公开返回码。

双括号由另一条原生关联 opbase !835 处理,该 PR 已合入 opbase master,将 EZ0009 公共日志模板的 incorrect shape [%s] 改成 incorrect shape %s,避免对已经带括号的 shape 字符串再套一层。这个改动在公共日志层,实际使用还取决于配套 opbase,而不是张量 shape 发生了变化。

源码依据:固定提交中的相关处理。

本次核验依据关联 diff 与源码,未复跑原场景;具体安装包是否包含变更需按其源码版本区分。

likedislike