Created by: liym27
tensor_array_read_write op 报错信息增强 [仅C++端]
c++不合规报错检查增强
1. 错误类型有误,报错内容需改
- 修改前报错:
InvalidArgumentError: Read/Write array operation must set the subscript index.
- 修改后报错:
NotFoundError: Input(I) of WriteToArrayOp is not found.
2. 错误类型有误,报错内容需改
- 修改前报错:
InvalidArgumentError: Read/Write array operation must set the output Tensor to get the result.
- 修改后报错:
NotFoundError: Output(Out) of WriteToArrayOp is not found.
3. 错误类型有误,报错内容需改
- 修改前报错:
InvalidArgumentError: X(Input Variable) must be set when we call read array operation。
- 修改后报错:
NotFoundError: Input(X) of ReadFromArrayOp is not found.
4. 错误类型有误,报错内容需改
- 修改前报错:
InvalidArgumentError: Out(Output Varibale) must be set when we call read array operation.
- 修改后报错:
NotFoundError: Output(Out) of ReadFromArrayOp is not found.
5. 报错不规范
- 修改前报错:
I must be set
- 修改后报错:
NotFoundError: Input(I) is not found.
6. 报错不规范
-
修改前报错:无
-
修改后报错:
InvalidArgumentError: Input(I) must have numel 1. But received 2, and it's shape is [1,2]