Created by: zhangting2020
In order to avoid check_grad checking failures, related with #21383, this PR fix some unit tests.
- some PythonAPI tests do not need to inherit OpTest
- fp16 test cases should be created only in GPU mode
- remove FP16 Case from tests of mkldnn op
Op单测中,需要检查case是否进行了check_grad。个别的Case无需做check_grad的检查:
- PythonAPI测试
- 部分单测仅在GPU上运行,这类case应该加上
@unittest.skipIf
,限制在有GPU时才被创建。涉及:- fp16 case
- 仅测试GPU实现的,如:lstm_cudnn
mkldnn op单测中,不应该存在fp16的case,需要被移除,涉及:
- test_softmax_mkldnn_op.py