已关闭
[Documentation|文档反馈]: 补充LayerNormRemoveBroadcastFusionPass融合规则资料 #5430
rk创建于  4 天前关闭于  4 天前
rk成员
4 天前 创建

Document Link(文档链接)

Issues Section(问题文档片段)

norm/layer_norm目录当前缺少LayerNormRemoveBroadcastFusionPass对应的独立融合规则资料页和融合前后拓扑配图。

Existing Issues(存在的问题)

现有代码已实现LayerNormRemoveBroadcastFusionPass,但资料未说明以下内容:

  • Ascend 950PR/Ascend 950DT场景下,融合规则会移除LayerNorm算子gamma和beta输入前的BroadcastTo,使gamma和beta直接作为LayerNorm的输入,并将begin_norm_axis和begin_params_axis统一设置为归一化维度的起始轴。
  • 规则要求gamma和beta输入前均为BroadcastTo,且两个BroadcastTo的shape输入相同。
  • 规则仅支持x、gamma和beta均为静态shape的场景。
  • gamma和beta不支持标量,且二者的shape和数据类型必须相同。
  • gamma的维数不能大于x的维数,gamma的shape必须与x从归一化轴开始的后缀shape相同。
  • begin_norm_axis换算为非负轴后必须指向归一化维度的起始轴。

需要补充上述融合行为、使用约束及融合前后拓扑图,方便开发者判断规则的匹配条件和生效结果。

likedislike
Rrk成员
4 天前 添加了label:documentation
yuning_chenyuning_chen成员
4 天前 将 wangpengbo26 设为负责人
CANN-robotCANN-robot成员
4 天前 关闭了 issue
CANN-robotCANN-robot成员
4 天前 添加了label:resolved