Created by: JepsonWong
open dygraph op test. The PR solves the problem of opening op test in dygraph.
There are several types of problems: 1.Does not support lod in dygraph.
Through the Variable._ivar.value().get_tensor().set_recursive_sequence_lengths interface, I can set the lod information for the LoDTensor, so that the following ops that do not depend on the scope structure pass the test, but the interface is not exposed to the user. Debug the lod test is only for verifying the correctness of the dygraph optest framework.
Some lod information needs to be read from the scope structure.
- test_attention_lstm_op.py (成功)
- test_fused_emb_seq_pool_op.py
- test_fused_embedding_fc_lstm_op.py (成功)
- test_fusion_gru_op.py (成功)
- test_fusion_lstm_op.py (成功)
- test_fusion_seqconv_eltadd_relu_op.py (成功)
- test_lod_reset_op.py
- test_lstm_op.py (成功)
- test_multiclass_nms_op.py (成功)
- test_one_hot_op.py (成功)
- test_one_hot_v2_op.py (成功)
- test_seq_pool.py (成功)
- test_sequence_pad_op.py (成功)
- test_warpctc_op.py (成功)
- linear_chain_crf_op (成功)
2.Does not support mkldnn in dygraph.
- test_activation_mkldnn_op.py
- test_concat_int8_mkldnn_op.py
- test_concat_mkldnn_op.py
- test_conv2d_int8_mkldnn_op.py
- test_dequantize_mkldnn_op.py
- test_fc_mkldnn_op.py
- test_lrn_mkldnn_op.py
- test_mul_int8_mkldnn_op.py
- test_pool2d_int8_mkldnn_op.py
- test_quantize_mkldnn_op.py
- test_requantize_mkldnn_op.py
- test_softmax_mkldnn_op.py
- test_sum_mkldnn_op.py
- test_transpose_int8_mkldnn_op.py
- test_transpose_mkldnn_op.py
The following optest cannot be passed when uses mkldnn:
- test_conv2d_op.py
- test_conv2d_transpose_op.py
- test_conv3d_op.py
- test_elementwise_add_op.py
- test_elementwise_mul_op.py
- test_pool2d_op.py
- test_softmax_op.py
3.Op constructs the reverse OpDesc using the DefaultGradOpDescMaker class, but some output grad is not used.
- nce_op
- unpool_op
- var_conv_2d_op
4.The HasInput and HasOutput methods in ExecutionContext depend on the Scope structure, while the Scope structure in the dynamic graph is empty.
- strided_slice_op
- activation_op
- crf_decoding_op
- crop_op
- crop_tensor_op
- data_norm_op
- edit_distance_op
- expand_op
- fused_elemwise_activation_op
- im2sequence_op
- reshape_op
- sequence_mask_op
- slice_op
5. Execution function depend on the Scope structure
- test_lstm_cudnn_op.py
6.In dygraph RuntimeInferVarTypeContext class, if you want to determine the existence of a variable, you should use the HasOutput method instead of the Output method.
- hierarchical_sigmoid_op
7.Exception capture in optest.
- test_fill_any_like_op.py
8.Reverse OpDesc class is not standardized.
- test_increment_ngraph_op
At present, because dygraph does not support lod and mkldnn, the ops in problems 1, 2 have been banned, and problem 5, 7, 8 have been banned. Problems 3, 4, and 6 have been resolved.
CI耗时统计: MAC_PR_CI: 36m51s MAC_PR_CI_python35: 38m16s PR_CI_Coverage: 1h23m PR_CI_GPU_Py2_GCC8: 44m59s PR_CI_Inference: 15m51s PR_CI_python35: 40m10s PR_Windows_CI: 1h32m