已合并
add fusion pass: multi_add_rms_norm_dynamic_quant | dynamic_quant_update_scatter_v2 #5243
add fusion pass: multi_add_rms_norm_dynamic_quant | dynamic_quant_update_scatter_v2 #5243
已合并
liu-zihao35创建于 5月25日
liu-zihao35
5月25日

描述

将 MultiAddRmsNormDynamicQuant 和 DynamicQuantUpdateScatterV2 两个融合规则迁移至 PatternFusionPass 新框架,并修复迁移过程中发现的多个适配问题:

MultiAddRmsNormDynamicQuant:

  • IrDefOutputs 顺序与 REG_OP 对齐(y, rstd, x)
  • IrDefInputs 补全所有 Optional 输入(group_index)
  • x1 输入改用 kEsIrInputDynamic + InstanceDynamicInputNum
  • 替换图基于 subgraph_inputs.size() 精确创建 Data 节点

DynamicQuantUpdateScatterV2:

  • 注册 Identity pattern 变体适配 inplace scatter
  • Pre-Scatter 路径添加额外 Reshape 匹配 CANN 自动插入的动态 Reshape
  • GetInputShapeAndDtype 重写支持 Identity boundary node
  • GetOutputDtype 改为检查 Reshape port0(data)前驱

通用:

  • CompliantNodeBuilder 节点名 static counter 保证唯一性
  • InferShape 传播完整 TensorDesc(dtype + format + shape)

关联的Issue

#3131

测试

  • MARNDQModel1(0~4Add + 1~2DQ + has | noReshape)、DQUSV2Model:融合成功,验证新 fusion_pass 生效
  • 继承的泛化 st 用例,精度验证通过
  • 平台验证:Ascend910B、Ascend910_93

文档更新

不涉及

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 liu-zihao35 的贡献)
Lliu-zihao35
5月25日 创建了 pull request,commit 890d9ec0
CANN-robot
CANN-robot成员
5月25日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
norm ✅ 唐玮玮, 杨阳 (2/2) ✅ 唐玮玮 (1/1)
quant ✅ 唐玮玮, 杨阳 (2/2) ✅ 唐玮玮 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

liu-zihao35, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robot成员
5月25日 添加了label:cann-cla/yes
CANN-robotCANN-robot成员
5月25日 将sxb154714,chenfeng61,crystalhu,yangyang016,fanqirui,zhou-qilong,zhajianqing123,chenqi317,LinPX,liubo75,tangweiwei2,wangzitao_leo,liujie12345678,Chen_HaoWen,wangyongguang,zhang-wu设为评审人
CANN-robotCANN-robot成员
5月25日 将sxb154714,chenfeng61,crystalhu,zhou-qilong,zhajianqing123,chenqi317,LinPX,liubo75,tangweiwei2,wangzitao_leo,liujie12345678,Chen_HaoWen,wangyongguang,zhang-wu设为审查人
此处折叠了159条消息 查看更多
CANN-robotCANN-robot成员
6月5日 添加了label:approved
yangyang016成员
6月5日 评论:

/approve
/lgtm

likedislike
CANN-robotCANN-robot成员
6月5日 添加了label:lgtm
CANN-robotCANN-robot成员
6月5日 关闭了关联的issue
CANN-robotCANN-robot成员
6月5日 合入了pull request