Closed
[Requirement|需求建议]: 补齐 Renorm、SyncBNTrainingUpdate 和 SigmoidCrossEntropyWithLogitsGradV2 图推断及单测 #8569
clinglai0517Add on  11 days agoClosed at  9 days ago
clinglai0517
clinglai0517Collaborators
11 days ago Create

Backgroud(背景信息)

Renorm、SyncBNTrainingUpdate 和 SigmoidCrossEntropyWithLogitsGradV2 的图推断接口需要补齐。前两个算子已注册 shape 推断但缺少 dtype 推断,SigmoidCrossEntropyWithLogitsGradV2 正式算子目录尚未注册 shape/dtype 推断。

Origin(信息来源)

来自仓库算子图推断接口完备性检查。

Benefit / Necessity (价值/作用)

使图构建阶段能够正确推断输出 shape 和 dtype,覆盖动态维度、未知 rank 及支持的数据类型,并通过单测防止输入索引或输出类型回归。

Design(设计方案)

  • Renorm:输出 shape/dtype 跟随输入 x。当前 RegBase 内核输出完整归一化张量,保持现有 shape 语义。
  • SyncBNTrainingUpdate:输出 shape/dtype 跟随 running_mean(输入索引 1)。
  • SigmoidCrossEntropyWithLogitsGradV2:输出 shape/dtype 跟随 predict(输入索引 0),不随 reduction 模式或可选权重改变输出 shape。
  • 新增三个算子的推断 UT,覆盖静态 shape、动态维度、未知 rank、空维度、FP16/FP32/BF16、reduction 模式及可选权重,并启用 Renorm 的推断 UT 收集。

验证:CANN 9.2.0 容器中专项编译通过,17 个推断 UT 全部通过;clang-format 18.1.8 和 git diff --check 检查通过。

likedislike
clinglai0517clinglai0517Collaborators
11 days ago Added label: requirement
clinglai0517clinglai0517Collaborators
11 days ago Associated pull request
yuning_chenyuning_chenCollaborators
11 days ago Assign clinglai0517 as responsible person
CANN-robotCANN-robotCollaborators
9 days ago Close issue
CANN-robotCANN-robotCollaborators
9 days ago changed custom state from 待办的 to 已完成
CANN-robotCANN-robotCollaborators
8 days ago Added label: resolved