已合并
docs: add InplaceAddLayerNormFusionPass doc #9666
docs: add InplaceAddLayerNormFusionPass doc #9666
已合并
rk创建于 7 天前
rk成员
7 天前

描述

为现有InplaceAddLayerNormFusionPass融合规则补充独立资料页。该规则在推理场景下,将图中的AddLayerNorm算子替换为InplaceAddLayerNorm算子,使层归一化结果和加法结果分别原地写回x1和x2。

资料同步说明规则的使用约束:

  • AddLayerNorm算子的bias为可选输入,支持带bias和不带bias的场景。
  • x1和x2必须满足原地写回安全要求:除当前AddLayerNorm算子外不能被其他节点消费,且不能来自连续内存排布的多输出节点。
  • 静态shape场景下,x1占用的内存大小必须大于等于L2缓存容量的1/8,且小于等于L2缓存容量的2倍。
  • 动态shape场景下,x1的最后一维必须为5120。
  • AddLayerNorm算子的x1、x2和gamma输入的数据类型必须相同。

同时新增融合前后拓扑对比图,展示AddLayerNorm算子替换为InplaceAddLayerNorm算子前后的图结构。

关联的Issue

测试

  • 本次仅新增文档和配图,不涉及代码逻辑变更,未执行代码测试。
  • 已检查Markdown格式、PNG图片文件格式、图片尺寸及图片引用路径。

文档更新

  • 新增norm/inplace_add_layer_norm/docs/InplaceAddLayerNormFusionPass.md,说明融合模式和使用约束。
  • 新增docs/zh/figures/InplaceAddLayerNormFusionPass_1.png,展示融合前后的图结构。

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 rk 的贡献)
Rrk成员
7 天前 创建了 pull request,commit 15b8f3cb
atomgit-bot
atomgit-bot
7 天前 评论:

变更摘要

本 PR 为文档类改动,旨在为 InplaceAddLayerNormFusionPass 新增文档说明。改动为纯新增内容(共 33 行新增、0 行删除,涉及 2 个文件),不包含代码逻辑变更。

主要改动

  • 新增 InplaceAddLayerNormFusionPass 文档: 在文档中补充了 InplaceAddLayerNormFusionPass 的相关说明,便于使用者理解该融合 Pass 的用途。
  • 文档-only 变更: 整个改动仅涉及文档内容的添加(33 行新增、0 行删除),不修改任何代码行为。
likedislike
不准确?
atomgit-bot
atomgit-bot
7 天前 评论:

🤖 本次改动均为数据 / 生成 / 二进制文件(如测试用例、锁文件、媒体资源),没有可审查的代码逻辑,已跳过 AI 代码审查。

likedislike
不准确?
CANN-robotCANN-robot成员
7 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
7 天前 评论:

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.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

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

Module Approval Details

module lgtm status approve status
docs 杨露, 唐玮玮 (2/2) 杨露 (1/1)
norm 钱泽洪, 唐玮玮 (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

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

likedislike
CANN-robotCANN-robot成员
7 天前 将zengjuan,chaotang233,kevin_huang1234,crystalhu,yangyang016,fanqirui,gitee-duhuiping,wangrui_,renruhai,su-yueming,zhajianqing123,chenqi317,wang-xing001,liubo75,tangweiwei2,gitcode-chenjiao,chenxingyu18,liujie12345678,pingchuantang,Chen_HaoWen,qianzehong,fengying555682,caiwenwen,yanglu-1设为评审人
CANN-robotCANN-robot成员
7 天前 将kevin_huang1234,gitee-duhuiping,wangrui_,renruhai,su-yueming,zhajianqing123,wang-xing001,gitcode-chenjiao,chenxingyu18,liujie12345678,pingchuantang,Chen_HaoWen,qianzehong,fengying555682,caiwenwen,yanglu-1设为审查人
yuning_chen
yuning_chen成员
7 天前 评论:

您好,pr合入已准备就绪,请尽快联系committer进行检视,谢谢!

likedislike
Rrk成员
7 天前 修改了pull request 的描述
Rrk成员
7 天前 update merge request[project id: 7665709, iid: 9666, commit_id: 318fe500b462c822ba102a12567d1734ddab2afc] virtual merging success
Rrk成员
7 天前 强制推送  10 个提交:a20c797e-9 commits from branch masteree4ee308-docs: add InplaceAddLayerNormFusionPass documentation
Rrk成员
7 天前 update merge request[project id: 7665709, iid: 9666, commit_id: 3cc5246fffb7f5c1b59bee4af5e1fa64eee59325] virtual merging success
CANN-robotCANN-robot成员
7 天前 删除了label:cann-cla/yes
CANN-robotCANN-robot成员
7 天前 添加了label:cann-cla/yes
lwx1255555
7 天前 评论:

/lgtm

likedislike
CANN-robot
CANN-robot成员
7 天前 评论:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
lwx1255555

likedislike
rk成员
7 天前 评论:

compile

likedislike
Rrk成员
7 天前 update merge request[project id: 7665709, iid: 9666, commit_id: 26d211f05b3265f93a263882672d761eedf099be] virtual merging success
CANN-robotCANN-robot成员
7 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
7 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
7 天前 添加了label:ci-pipeline-passed
yuning_chen
yuning_chen成员
6 天前 评论:

您好,pr合入已准备就绪,请尽快联系committer进行检视,谢谢!

likedislike
qianzehong成员
6 天前 评论:

/approve

likedislike
CANN-robot
CANN-robot成员
6 天前 评论:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
lwx1255555

likedislike
yanglu-1成员
6 天前 评论:

/lgtm
/approve

likedislike
CANN-robot
CANN-robot成员
6 天前 评论:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
lwx1255555

likedislike
CANN-robotCANN-robot成员
6 天前 添加了label:approved
CANN-robot
CANN-robot成员
6 天前 评论:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
lwx1255555

likedislike
tangweiwei2成员
6 天前 评论:

/lgtm
/approve

likedislike
CANN-robot
CANN-robot成员
6 天前 评论:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
lwx1255555

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