Closed
[Bug-Report|缺陷反馈]: FusedMulApplyKerasMomentum arch35 输入校验、空Tensor与精度问题修复 #8534
zhang-wenbo-beatAdd on  11 days agoClosed at  10 days ago
zhang-wenbo-beat
zhang-wenbo-beatCollaborators
11 days ago Create

Describe the current behavior / 问题描述

FusedMulApplyKerasMomentum 在 ascend950/arch35 上存在以下问题:

  1. lr、momentum、x2 未校验 shape [1],空标量或非标量输入可进入 Kernel 并被越界/错误读取。
  2. var、accum、x1 仅做广播兼容校验,未强制 shape 全等,in-place 写回存在越界或输入未更新风险。
  3. 前导零维空 Tensor(如 [0]、[0,4])Tiling 成功后 Kernel 除以 a_i=0。
  4. workspace 固定 16 MiB,与本算子无跨核规约不符;TilingPrepare 未校验 ubSize==0。
  5. FP16 回转舍入与 TF/GPU 语义不一致,FP32 乘加未使用 FMA。
  6. README 参数角色、约束与调用说明与实现不一致,英文文档未同步。

Environment Information / 环境信息

  • 昇腾硬件型号:Ascend 950PR
  • CANN 版本:9.2.0
  • Python 版本:3.10
  • 算子:FusedMulApplyKerasMomentum(arch35 / DAV_3510)

Steps to reproduce the issue / 重现步骤

  1. 通过 GE IR 构造 FusedMulApplyKerasMomentum,lr、momentum、x2 传入 shape [0] 或非 [1]。
  2. 构造 var=[4,3]、accum=[1,3]、x1=[4,3]。
  3. 构造前导零维空 Tensor(如 [0]、[0,4])。
  4. 执行 Tiling/Kernel,观察输入读取、写回与除零行为。
    静态检查报告:validation-runs/fmakm-static-20261028-142504。

Describe the expected behavior / 预期结果

  • 非法标量 shape、非全等 tensor shape 在 Tiling 阶段明确拒绝。
  • 空 Tensor 生成空执行计划,不执行除零。
  • workspace 置 0,ubSize==0 明确失败。
  • FP16 计算全程 FP32,输出按 RINT 回转;FP32 乘加使用 FMA。
  • README 中英文与实现一致。

Special notes for this issue/备注

本 Issue 用于替换 MR 原关联的外部性能追踪单,便于在本仓跟踪修复。

likedislike
zhang-wenbo-beatzhang-wenbo-beatCollaborators
11 days ago Added label: bug-report
yuning_chenyuning_chenCollaborators
11 days ago Assign zhang-wenbo-beat as responsible person
yuning_chen
yuning_chenCollaborators
11 days ago Comments:

您好,该问题已收到,当前问题 @zhang-wenbo-beat 正在处理中

likedislike
CANN-robotCANN-robotCollaborators
10 days ago Close issue
CANN-robotCANN-robotCollaborators
10 days ago changed custom state from 待办的 to 已完成
CANN-robotCANN-robotCollaborators
10 days ago Added label: resolved