---
title: ATC模型转换时报错：E89999 op[MatMul_1529/PadD], 0th input has wrong shape0, it should be 1-昇腾社区
description: 当CANN软件包版本为6.0.1时，执行ATC模型转换时报E89999 op[MatMul_1529/PadD], 0th input has wrong shape0, it should be 1错误信息。
keywords: ATC模型转换
url: https://www.hiascend.com/document/caselibrary/detail/atccase_0003
section: (其他)
---

# ATC模型转换时报错：E89999 op[MatMul_1529/PadD], 0th input has wrong shape0, it should be 1-昇腾社区

URL: https://www.hiascend.com/document/caselibrary/detail/atccase_0003
描述: 当CANN软件包版本为6.0.1时，执行ATC模型转换时报E89999 op[MatMul_1529/PadD], 0th input has wrong shape0, it should be 1错误信息。
关键词: ATC模型转换

昇腾文档 [了解详情](https://www.hiascend.com/document)

故障案例 [了解详情](https://www.hiascend.com/document/caselibrary)

ATC模型转换时报错：E89999 op[MatMul_1529/PadD], 0th input has wrong shape0, it should be 1

ATC模型转换时报错：E89999 op[MatMul_1529/PadD], 0th input has wrong shape0, it should be 1

2023/05/22

1.6k

问题信息

| 问题来源 | 产品大类 | 产品子类 | 关键字 |
| --- | --- | --- | ---|
| 官方 | 模型推理 | 模型转换 | ATC模型转换 |

#### 问题现象描述

- 适用处理器：昇腾310P3 AI处理器

- 问题现象：

当CANN软件包版本为6.0.1时，执行ATC模型转换时报E89999 op[MatMul_1529/PadD], 0th input has wrong shape0, it should be 1错误信息。

#### 原因分析

查看/root/ascend/log日志发现matmul算子融合失败，融合规则为BatchMatMulReduceMeanFusionPass。

网络中存在2个问题，relu多输出，batch_matmul是add的第2个输入，当前融合规则未考虑此种场景。

#### 解决措施

BatchMatMulReduceMeanFusionPass融合规则。

1. 使用vi命令创建fusion_switch.cfg文件并输入以下内容。

```
{
"Switch":{
"GraphFusion":{
"BatchMatMulReduceMeanFusionPass":"off"
},
}
}
```
2. 执行ATC模型转换前使用以下命令融合规则。

```
--fusion_switch_file=pwd/fustion_swtich.cfg
```

本页内容

- 问题信息
- 问题现象描述
- 原因分析
- 解决措施
