Created by: lelelelelez
不合规报错检查增强
测试脚本
1. 输入Tensor X与Y的dims size相同
修改前报错:
Input tensors dims size should be equal.
修改后报错:
InvalidArgumentError: The input tensor X's dims size should be equal to Y's. But received X's dims size = 2, Y's dims size = 1.
2. Input tensor X's dims[1] == Y's dims[0]
修改前报错:
Inputs Matrix should be multiply.
修改后报错:
InvalidArgumentError: The input tensor X's dims[1] should be equal to Y's dims[0]. But received X's dims[1] = 3, Y's dims[0] = 4.
3. Input tensor X_dims.size() == 2
修改前报错:
Input tensors should be a Matrix.
修改后报错:
InvalidArgumentError: The input tensor X's dims size should be 2. But received X's dims size = 1.
4. 输入输出不为空检测
修改前报错:
Input(X) of FusionSquaredMatSubOp should not be null.
修改后使用新的检测宏OP_INOUT_CHECK(ctx->HasInput("X"), "Input", "X", "Mul"),保证Op的输入输出检查报错信息均一致:
NotFoundError: No Input(X) found for FusionSquaredMatSub operator.
除此之外,此PR还修改 #23454 遗留问题: 删除Input Tensor 'Ids' shape小于1的检测。