昇腾故障案例详情页

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

更新时间: 2023/05/22

暂无评分

问题信息

问题来源产品大类产品子类关键字
官方模型推理模型转换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

本页内容

该页面对您有帮助吗?
我要评分