Created by: juncaipeng
In order to add ci check for check_grad and upgrade the precision of test from float to double, we modify the op_test.py as follows:
- replace old OpTest with OpTestBase, and use all inputs instead only one input to infer dtype
- add OpTestInt8, which is the parent class of the op test with int8 precision
- add OpTestFp16, which is the parent class of the op test with float16 precision. OpTestFp16 demands the test to call check_grad at least once.
- add OpTest, which is the parent class of the op test with float32/64 precision. OpTest demands the test to call check_grad with float64 precision at least once.
TODO:
- add restrictions to numeric_grad_delta, max_relative_error for check_grad with float64 precision
- add check for op_whit_list.py in check_api_approve.sh
- forbid op test to inherit OpTestBase by add check in check_api_approve.sh
TODO: 如果从fp32升级到fp64检查,fp32检查可以不需要了。 简单的改一下单测中fp16继承关系,使得存量问列表最小集
NO_NEED_FP64_CHECK_GRAD_OP_LIST:真正的白名单,应该是那些需要被豁免检查的op或者case NEED_TO_FIX_OP_LIST:是存量问题