已关闭
[Requirement|需求建议]: MatMulToMatmulV3FusionPass图融合 #3804
jgx创建于  7月3日关闭于  7月6日
jgx
jgx成员
7月3日 创建

Thanks for sending an requirement! Please fill in the following template to help quickly solve your problem.

Backgroud(背景信息)

图融合开源,将MatMulToMatmulV3FusionPass图融合迁移到ops-nn仓,保持原图融合逻辑,优先级不变,使用es框架。

Origin(信息来源)

Ascend950PR

Benefit / Necessity (价值/作用)

图融合开源需求,将MatMulToMatmulV3FusionPass图融合迁移到ops-nn仓。实现950中图模式Matmul,Matmulv2->Matmulv3;BatchMatMul,BatchMatMulv2->BatchMatMulv3的转换

Design(设计方案)

MeetRequirements() 入口
│
├── GetCapturedTensor 失败? ──→ return false (NOT fuse) 【分支A0: 获取节点失败】
│
├── GetPlatformInfo 失败? ──→ return false (NOT fuse) 【分支B0: 获取平台信息失败】
│
├── 获取 coreNum, intrinsic 支持标志
│ (supportL0c2Out, supportOut2L1Nd2Nz, supportL0c2Ub, supportFixPipeL0c2Ub, supportL12btBf16)
│
├── haveBias = matchedNode.GetInputsSize() > 2
│
├── !supportL12btBf16?
│ ├── YES (不支持 L12Bt BF16):
│
│
├── !CheckInputDtype? (x1,x2 dtype 不在 {FP16,FP32,BF16,INT8})
│ ├── YES ──→ return false (NOT fuse) 【分支G: dtype不支持】
│ └── NO ──→ 继续融合
│
└── return true (FUSE → 将调用 Replacement) 【融合通过】

likedislike
jgxjgx成员
7月3日 添加了label:requirement
jgx
jgx成员
7月3日 评论:

/assign

likedislike
CANN-robotCANN-robot成员
7月3日 将 jgx12 设为负责人
CANN-robotCANN-robot成员
7月6日 关闭了 issue
CANN-robotCANN-robot成员
7月6日 添加了label:resolved
jgxjgx成员
7月7日 修改标题为 “[Requirement|需求建议]: MatMulToMatmulV3FusionPass图融合”,原标题为“[Requirement|需求建议]: BatchMatMulToBatchMatmulV3FusionPass和MatMulToMatmulV3FusionPass图融合”
jgxjgx成员
7月7日 修改了issue 的描述