From 67e9247f4c6da6610c617cc5cd56aa91d5a8de12 Mon Sep 17 00:00:00 2001 From: juncaipeng <52520497+juncaipeng@users.noreply.github.com> Date: Wed, 15 Jan 2020 14:55:10 +0800 Subject: [PATCH] Make every op in a line to avoid conflict in the future (#22274) --- .../white_list/op_accuracy_white_list.py | 91 +++++++++++++++---- .../white_list/op_threshold_white_list.py | 35 +++++-- 2 files changed, 102 insertions(+), 24 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/white_list/op_accuracy_white_list.py b/python/paddle/fluid/tests/unittests/white_list/op_accuracy_white_list.py index 3490643014e..771d7ac6c49 100644 --- a/python/paddle/fluid/tests/unittests/white_list/op_accuracy_white_list.py +++ b/python/paddle/fluid/tests/unittests/white_list/op_accuracy_white_list.py @@ -14,25 +14,82 @@ # For op in NO_FP64_CHECK_GRAD_OP_LIST, the op test requires check_grad with fp64 precision NO_FP64_CHECK_GRAD_OP_LIST = [ - 'affine_grid', 'clip', 'conv2d', 'conv2d_transpose', 'conv3d', - 'conv3d_transpose', 'conv_shift', 'cos_sim', 'cudnn_lstm', 'cvm', - 'data_norm', 'deformable_conv', 'deformable_conv_v1', - 'deformable_psroi_pooling', 'depthwise_conv2d', - 'depthwise_conv2d_transpose', 'dropout', 'elementwise_max', - 'fused_elemwise_activation', 'hierarchical_sigmoid', 'hinge_loss', - 'huber_loss', 'im2sequence', 'increment', 'l1_norm', 'log_loss', 'lrn', - 'margin_rank_loss', 'match_matrix_tensor', 'matmul', - 'max_pool2d_with_index', 'max_pool3d_with_index', 'maxout', 'minus', - 'modified_huber_loss', 'mul', 'nce', 'pad', 'pad2d', 'pad_constant_like', - 'pool2d', 'pool3d', 'prelu', 'prroi_pool', 'rank_loss', 'reduce_max', - 'reduce_min', 'relu', 'reshape2', 'roi_perspective_transform', 'row_conv', - 'scale', 'scatter', 'sequence_conv', 'sequence_pool', 'sequence_reverse', - 'sequence_slice', 'sequence_topk_avg_pooling', 'shuffle_channel', 'sigmoid', - 'smooth_l1_loss', 'softmax', 'spectral_norm', 'sqrt', 'squared_l2_distance', - 'squared_l2_norm', 'tanh', 'transpose2', 'trilinear_interp', 'var_conv_2d', + 'affine_grid', \ + 'clip', \ + 'conv2d', \ + 'conv2d_transpose', \ + 'conv3d', \ + 'conv3d_transpose', \ + 'conv_shift', \ + 'cos_sim', \ + 'cudnn_lstm', \ + 'cvm', \ + 'data_norm', \ + 'deformable_conv', \ + 'deformable_conv_v1', \ + 'deformable_psroi_pooling', \ + 'depthwise_conv2d', \ + 'depthwise_conv2d_transpose', \ + 'dropout', \ + 'elementwise_max', \ + 'fused_elemwise_activation', \ + 'hierarchical_sigmoid', \ + 'hinge_loss', \ + 'huber_loss', \ + 'im2sequence', \ + 'increment', \ + 'l1_norm', \ + 'log_loss', \ + 'lrn', \ + 'margin_rank_loss', \ + 'match_matrix_tensor', \ + 'matmul', \ + 'max_pool2d_with_index', \ + 'max_pool3d_with_index', \ + 'maxout', \ + 'minus', \ + 'modified_huber_loss', \ + 'mul', \ + 'nce', \ + 'pad', \ + 'pad2d', \ + 'pad_constant_like', \ + 'pool2d', \ + 'pool3d', \ + 'prelu', \ + 'prroi_pool', \ + 'rank_loss', \ + 'reduce_max', \ + 'reduce_min', \ + 'relu', \ + 'reshape2', \ + 'roi_perspective_transform', \ + 'row_conv', \ + 'scale', \ + 'scatter', \ + 'sequence_conv', \ + 'sequence_pool', \ + 'sequence_reverse', \ + 'sequence_slice', \ + 'sequence_topk_avg_pooling', \ + 'shuffle_channel', \ + 'sigmoid', \ + 'smooth_l1_loss', \ + 'softmax', \ + 'spectral_norm', \ + 'sqrt', \ + 'squared_l2_distance', \ + 'squared_l2_norm', \ + 'tanh', \ + 'transpose2', \ + 'trilinear_interp', \ + 'var_conv_2d', \ 'warpctc' ] NO_FP16_CHECK_GRAD_OP_LIST = [ - 'fused_elemwise_activation', 'pool2d', 'pool3d', 'softmax' + 'fused_elemwise_activation', \ + 'pool2d', \ + 'pool3d', \ + 'softmax' ] diff --git a/python/paddle/fluid/tests/unittests/white_list/op_threshold_white_list.py b/python/paddle/fluid/tests/unittests/white_list/op_threshold_white_list.py index 1dea72d8300..23d986a1997 100644 --- a/python/paddle/fluid/tests/unittests/white_list/op_threshold_white_list.py +++ b/python/paddle/fluid/tests/unittests/white_list/op_threshold_white_list.py @@ -13,13 +13,34 @@ # limitations under the License. NEED_FIX_FP64_CHECK_GRAD_THRESHOLD_OP_LIST = [ - 'affine_channel', 'bilinear_interp', 'bilinear_tensor_product', 'conv2d', - 'conv3d', 'cross_entropy', 'depthwise_conv2d_transpose', 'elementwise_pow', - 'grid_sampler', 'group_norm', 'gru', 'gru_unit', 'kldiv_loss', 'lstm', - 'lstmp', 'max_pool2d_with_index', 'max_pool3d_with_index', 'norm', 'pool3d', - 'reduce_prod', 'selu', 'sigmoid_cross_entropy_with_logits', 'soft_relu', - 'softmax_with_cross_entropy', 'spp', 'teacher_student_sigmoid_loss', - 'unpool', 'yolov3_loss' + 'affine_channel', \ + 'bilinear_interp', \ + 'bilinear_tensor_product', \ + 'conv2d', \ + 'conv3d', \ + 'cross_entropy', \ + 'depthwise_conv2d_transpose', \ + 'elementwise_pow', \ + 'grid_sampler', \ + 'group_norm', \ + 'gru', \ + 'gru_unit', \ + 'kldiv_loss', \ + 'lstm', \ + 'lstmp', \ + 'max_pool2d_with_index', \ + 'max_pool3d_with_index', \ + 'norm', \ + 'pool3d', \ + 'reduce_prod', \ + 'selu', \ + 'sigmoid_cross_entropy_with_logits', \ + 'soft_relu', \ + 'softmax_with_cross_entropy', \ + 'spp', \ + 'teacher_student_sigmoid_loss', \ + 'unpool', \ + 'yolov3_loss' ] NEED_FIX_FP64_CHECK_OUTPUT_THRESHOLD_OP_LIST = ['bilinear_interp'] -- GitLab