Closed
[Bug-Report|缺陷反馈]: ApplyRotaryPosEmb / RotaryPositionEmbedding 算子存在报错日志不合理双重中括号及缺少非法dtype校验问题 #5160
高逸凡Add on Sep 9Closed at Sep 10
Sep 9 Assign yifangao as responsible person
Sep 10 Close issue
Sep 10 Added label: resolved
周云飞
Oct 14 Comments:
Oct 14 Comments:
dtype 校验
关联 PR !11636 已合入 master。当前 aclnnRotaryPositionEmbedding 的共同处理函数在 Ascend950(DAV_3510)分支进入计算前检查 x/cos/sin/存在的 rotate/out:只允许 FLOAT16、FLOAT、BF16,并要求它们与 x 类型一致。非法 INT32 或不一致类型返回 ACLNN_ERR_PARAM_INVALID(161002),不必等到 binary 选择阶段才失败。
这一检查限定于进入共同处理函数的 950 路径;接口对空输出有提前返回,也不能把它写成所有芯片和所有空张量场景的统一入口拦截。
日志显示
所列双括号是 shape 字符串与日志模板的括号约定问题,并不表示 Tensor 实际多了一维。可行的调整方向是让已有括号的 shape 字符串只打印一次,同时保留原来的形状合法性判断。上述直接关联 PR 的实际变更是 dtype 校验,没有修改三个接口全部 shape 日志模板,因此这里不把这条 PR 的合入扩展为双括号问题已全部闭合。
源码依据:固定提交中的相关处理。
本次核验依据关联 diff 与源码,未复跑原场景;具体安装包是否包含变更需按其源码版本区分。


Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
Describe the current behavior / 问题描述 (Mandatory / 必填)
aclnnApplyRotaryPosEmb / aclnnApplyRotaryPosEmbV2 / aclnnRotaryPositionEmbedding 报错日志shape中双重中括号不合理;
aclnnRotaryPositionEmbedding未对非法dtype校验拦截
Environment Information / 环境信息 (Mandatory / 必填)
任意
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
使用不合法shape/dtype触发报错日志
Describe the expected behavior / 预期结果 (Mandatory / 必填)
报错日志中不存在不合理[[...]],非法dtype可在aclnn层拦截
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
接口 含格式瑕疵的唯一报错数 瑕疵类型 示例报错
aclnnApplyRotaryPosEmb 6 双层中括号[[..]]×6 Invalid_Argument_Tensor_Shape(EZ0009): Parameter cos of ApplyRotaryPosEmb has incorrect shape [[2, 4, 16]]. Reason: T…
aclnnApplyRotaryPosEmbV2 6 双层中括号[[..]]×6 Invalid_Argument_Tensor_Shape(EZ0009): Parameter cos of ApplyRotaryPosEmb has incorrect shape [[2, 4, 16]]. Reason: T…
aclnnRotaryPositionEmbedding 1 双层中括号[[..]]×1 AclNN_Parameter_Error(EZ1001): Input tensor's shape[[2, 4, 16]] should be same with output's shape[[1, 1, 1, 1, 1, 1,…
接口 涉及场景数 目标参数分布 代表场景ID 代表场景描述 报错为什么不满足要求 报错日志(代表)
aclnnRotaryPositionEmbedding 5 cos×2, x×1, sin×1, cos+x×1 2 x dtype=ACL_INT32 not in supported list [BF16,FLOAT16,FLOAT] 报错为"Cannot find binary for op"——参数校验阶段未拦截非法参数,落到二进制选择阶段失败。应返回161001/161002并说明违规参数,判定为CANN Bug需提单 Execution_Error(EZ1009): Failed to execute operator aclnnRotaryPositionEmbedding_11_RotaryPositionEmbedding. Reason: The dtype or format of the actual input or output parameter of the operator is inconsistent with that defined in the operator prototype OpDef. ⏎ TraceBack (most recent call last): ⏎ Cannot find binary for op RotaryPositionEmbedding. ⏎ Kernel GetWorkspace failed. opType: 4 ⏎ RotaryPositionEmbedding ADD_TO_LAUNCHER_LIST_AICORE failed.
Special notes for this issue/备注 (Optional / 选填)