---
title: SoftmaxGradFusionPass
description: "该融合将符合图融合pattern的小算子融合成SoftmaxGrad算子。"
url: https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/latest/maintenref/graphubfusionref/atlasrr_30_0131.html
sourcePath: /source/zh/CANNCommunityEdition/920beta1/maintenref/graphubfusionref/atlasrr_30_0131.html
indexId: b5af48bcf95b8c84c11620ce4237c1178efecccbaad2284db8c42de7fd05f45389
---
# SoftmaxGradFusionPass

#### 融合模式

该融合将符合图融合pattern的小算子融合成SoftmaxGrad算子。

- 场景一：


- 场景二：


#### 使用约束

- Mul0和Mul1的第一个输入相同。
- ReduceSumD的输出节点只能有一个。
- 在reduce轴为1且AReduceSumFusionPass融合规则开启时，当前融合规则不生效。
- 在场景一子图中，

  - Mul0的第二个输入和Sub的第一个输入相同。
  - Mul0的输出节点只能有一个。
  - Sub的输出节点只能有一个。
- 在场景二子图中

  - Sub的第一个输入必须是Mul0的输出。
  - Mul0的输出节点只能有2个。
  - Mul1的输出节点只能有一个。


#### 支持的型号

Atlas A2 训练系列产品 / Atlas A2 推理系列产品
