From cde6241a1bc1c4c42d3991d5a394f7f1398c702d Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Tue, 13 Feb 2018 08:37:48 +0800 Subject: [PATCH] Run Python OP tests in a single Python process to improve test time. (#8362) Currently, our tests run with 2 GPUs, the init time is absurdly long: about 4s for each process. Currently, we run each OP test on different processes. This PR: 1. create cmake function py_test_modules which will generate the Makefile that runs a list of Python unittest module in a single Python process. 2. move all "python unittest compatible" (e.g., used the unittest package, not just a regular python file). from fluid/tests to fluid/tests/unittests. 3. cmake now will run all OP tests in fluid/tests/unittests in a single process, except the time-consuming tests, they are separated into different processes to utilize parallelism. Please make sure to use the unittest package if you put the python test file in fluid/tests/unittests 4. remove all exit(0) from fluid/tests/unittests/*.py, exit(0) is used to disable unittest, we can not do it when running all tests in a single process since it will terminate the process without running the other tests. Instead, the test is disabled in fluid/tests/unittests/CMakeLists.txt. FIXME is added for each disabled item. Please disable the unittest from fluid/tests/unittests/CMakeLists.txt, instead of adding exit(0) to the Python file, for all Python file in fluid/tests/unittests/. 5. add an option WITH_FAST_BUNDLE_TEST. When OFF, will run the unit tests in separate process so that they can be tested individually. --- CMakeLists.txt | 1 + python/paddle/v2/fluid/tests/CMakeLists.txt | 9 +- .../v2/fluid/tests/unittests/CMakeLists.txt | 89 +++++++++++++++++++ .../v2/fluid/tests/unittests/__init__.py | 13 +++ .../fluid/tests/{ => unittests}/decorators.py | 0 .../v2/fluid/tests/{ => unittests}/op_test.py | 0 .../tests/{ => unittests}/test_accuracy_op.py | 0 .../{ => unittests}/test_activation_op.py | 0 .../tests/{ => unittests}/test_adadelta_op.py | 0 .../tests/{ => unittests}/test_adagrad_op.py | 0 .../tests/{ => unittests}/test_adam_op.py | 0 .../tests/{ => unittests}/test_adamax_op.py | 0 .../test_array_read_write_op.py | 0 .../tests/{ => unittests}/test_assign_op.py | 0 .../{ => unittests}/test_assign_value_op.py | 0 .../tests/{ => unittests}/test_auc_op.py | 0 .../{ => unittests}/test_batch_norm_op.py | 0 .../test_beam_search_decode_op.py | 0 .../{ => unittests}/test_beam_search_op.py | 0 .../test_bilinear_tensor_product_op.py | 0 .../test_bipartite_match_op.py | 0 .../{ => unittests}/test_box_coder_op.py | 0 .../{ => unittests}/test_calc_gradient.py | 0 .../tests/{ => unittests}/test_cast_op.py | 0 .../{ => unittests}/test_chunk_eval_op.py | 0 .../{ => unittests}/test_clip_by_norm_op.py | 0 .../tests/{ => unittests}/test_clip_op.py | 0 .../tests/{ => unittests}/test_compare_op.py | 0 .../tests/{ => unittests}/test_concat_op.py | 0 .../tests/{ => unittests}/test_cond_op.py | 3 - .../{ => unittests}/test_conditional_block.py | 0 .../tests/{ => unittests}/test_const_value.py | 0 .../tests/{ => unittests}/test_conv2d_op.py | 0 .../test_conv2d_transpose_op.py | 0 .../tests/{ => unittests}/test_conv3d_op.py | 0 .../test_conv3d_transpose_op.py | 0 .../{ => unittests}/test_conv_shift_op.py | 0 .../tests/{ => unittests}/test_cos_sim_op.py | 0 .../test_create_op_doc_string.py | 0 .../{ => unittests}/test_crf_decoding_op.py | 0 .../tests/{ => unittests}/test_crop_op.py | 0 .../{ => unittests}/test_cross_entropy_op.py | 0 .../tests/{ => unittests}/test_ctc_align.py | 0 .../tests/{ => unittests}/test_cumsum_op.py | 0 .../test_decayed_adagrad_op.py | 0 .../test_default_scope_funcs.py | 0 .../{ => unittests}/test_detection_map_op.py | 0 .../test_detection_output_op.py | 4 +- .../tests/{ => unittests}/test_dropout_op.py | 0 .../tests/{ => unittests}/test_dyn_rnn.py | 0 .../test_dynrnn_gradient_check.py | 0 .../test_dynrnn_static_input.py | 0 .../{ => unittests}/test_edit_distance_op.py | 0 .../test_elementwise_add_op.py | 0 .../test_elementwise_div_op.py | 0 .../test_elementwise_max_op.py | 0 .../test_elementwise_min_op.py | 0 .../test_elementwise_mul_op.py | 0 .../test_elementwise_pow_op.py | 0 .../test_elementwise_sub_op.py | 0 .../tests/{ => unittests}/test_exception.py | 0 .../{ => unittests}/test_executor_and_mul.py | 0 .../tests/{ => unittests}/test_expand_op.py | 0 .../{ => unittests}/test_feed_fetch_method.py | 0 .../tests/{ => unittests}/test_fetch_var.py | 0 .../test_fill_constant_batch_size_like_op.py | 0 .../{ => unittests}/test_fill_constant_op.py | 0 .../tests/{ => unittests}/test_fill_op.py | 0 .../test_fill_zeros_like_op.py | 0 .../test_framework_debug_str.py | 0 .../tests/{ => unittests}/test_ftrl_op.py | 0 .../tests/{ => unittests}/test_gather_op.py | 0 .../test_gaussian_random_op.py | 0 .../{ => unittests}/test_get_places_op.py | 0 .../tests/{ => unittests}/test_gru_op.py | 0 .../tests/{ => unittests}/test_gru_unit_op.py | 0 .../{ => unittests}/test_hinge_loss_op.py | 0 .../{ => unittests}/test_huber_loss_op.py | 0 .../{ => unittests}/test_im2sequence_op.py | 0 .../test_image_classification_layer.py | 0 .../tests/{ => unittests}/test_infer_shape.py | 0 .../test_inference_model_io.py | 0 .../tests/{ => unittests}/test_initializer.py | 0 .../{ => unittests}/test_iou_similarity_op.py | 0 .../tests/{ => unittests}/test_is_empty_op.py | 0 .../tests/{ => unittests}/test_l1_norm_op.py | 0 .../{ => unittests}/test_label_smooth_op.py | 0 .../{ => unittests}/test_layer_norm_op.py | 0 .../tests/{ => unittests}/test_layers.py | 0 .../test_learning_rate_decay.py | 0 .../test_linear_chain_crf_op.py | 0 .../test_lod_array_length_op.py | 0 .../{ => unittests}/test_lod_rank_table.py | 0 .../{ => unittests}/test_lod_reset_op.py | 0 .../{ => unittests}/test_lod_tensor_array.py | 0 .../test_lod_tensor_array_ops.py | 0 .../tests/{ => unittests}/test_log_loss_op.py | 0 .../tests/{ => unittests}/test_logical_op.py | 0 .../{ => unittests}/test_lookup_table_op.py | 0 .../tests/{ => unittests}/test_lrn_op.py | 0 .../tests/{ => unittests}/test_lstm_op.py | 0 .../{ => unittests}/test_lstm_unit_op.py | 2 - .../tests/{ => unittests}/test_lstmp_op.py | 0 .../test_margin_rank_loss_op.py | 0 .../{ => unittests}/test_math_op_patch.py | 0 .../tests/{ => unittests}/test_matmul_op.py | 0 .../tests/{ => unittests}/test_maxout_op.py | 0 .../tests/{ => unittests}/test_mean_op.py | 0 .../test_memory_optimization_transpiler.py | 0 .../test_mine_hard_examples_op.py | 0 .../tests/{ => unittests}/test_minus_op.py | 0 .../test_modified_huber_loss_op.py | 2 - .../tests/{ => unittests}/test_momentum_op.py | 0 .../tests/{ => unittests}/test_mul_op.py | 0 .../{ => unittests}/test_multiclass_nms_op.py | 0 .../test_multihead_attention.py | 0 .../{ => unittests}/test_multiplex_op.py | 0 .../fluid/tests/{ => unittests}/test_nce.py | 2 - .../fluid/tests/{ => unittests}/test_net.py | 0 .../tests/{ => unittests}/test_norm_op.py | 0 .../test_normalization_wrapper.py | 0 .../tests/{ => unittests}/test_one_hot_op.py | 0 .../{ => unittests}/test_op_support_gpu.py | 0 .../tests/{ => unittests}/test_operator.py | 0 .../{ => unittests}/test_operator_desc.py | 0 .../tests/{ => unittests}/test_optimizer.py | 0 .../tests/{ => unittests}/test_pad_op.py | 0 .../tests/{ => unittests}/test_parallel_op.py | 7 +- .../tests/{ => unittests}/test_parameter.py | 0 .../tests/{ => unittests}/test_pool2d_op.py | 0 .../tests/{ => unittests}/test_pool3d_op.py | 0 .../tests/{ => unittests}/test_pool_max_op.py | 0 .../test_positive_negative_pair_op.py | 0 .../test_precision_recall_op.py | 0 .../tests/{ => unittests}/test_prelu_op.py | 0 .../tests/{ => unittests}/test_print_op.py | 0 .../{ => unittests}/test_prior_box_op.py | 0 .../tests/{ => unittests}/test_profiler.py | 0 .../tests/{ => unittests}/test_program.py | 0 .../tests/{ => unittests}/test_protobuf.py | 0 .../{ => unittests}/test_protobuf_descs.py | 0 .../test_proximal_adagrad_op.py | 0 .../{ => unittests}/test_proximal_gd_op.py | 0 .../{ => unittests}/test_rank_loss_op.py | 0 .../{ => unittests}/test_recurrent_op.py | 2 - .../tests/{ => unittests}/test_recv_op.py | 0 .../tests/{ => unittests}/test_reduce_op.py | 0 .../tests/{ => unittests}/test_registry.py | 2 +- .../tests/{ => unittests}/test_regularizer.py | 0 .../test_reorder_lod_tensor.py | 0 .../tests/{ => unittests}/test_reshape_op.py | 0 .../tests/{ => unittests}/test_rmsprop_op.py | 0 .../test_rnn_memory_helper_op.py | 0 .../tests/{ => unittests}/test_roi_pool_op.py | 0 .../tests/{ => unittests}/test_row_conv_op.py | 0 .../tests/{ => unittests}/test_scale_op.py | 0 .../tests/{ => unittests}/test_scatter_op.py | 0 .../fluid/tests/{ => unittests}/test_scope.py | 0 .../{ => unittests}/test_selected_rows.py | 0 .../{ => unittests}/test_seq_concat_op.py | 1 - .../tests/{ => unittests}/test_seq_conv.py | 0 .../tests/{ => unittests}/test_seq_pool.py | 0 .../{ => unittests}/test_sequence_erase_op.py | 0 .../{ => unittests}/test_sequence_expand.py | 0 .../{ => unittests}/test_sequence_reshape.py | 0 .../{ => unittests}/test_sequence_slice_op.py | 0 .../test_sequence_softmax_op.py | 0 .../tests/{ => unittests}/test_sgd_op.py | 0 .../{ => unittests}/test_shrink_rnn_memory.py | 0 ...st_sigmoid_cross_entropy_with_logits_op.py | 0 .../tests/{ => unittests}/test_sign_op.py | 0 .../{ => unittests}/test_smooth_l1_loss_op.py | 0 .../tests/{ => unittests}/test_softmax_op.py | 0 .../test_softmax_with_cross_entropy_op.py | 0 .../test_split_and_merge_lod_tensor_op.py | 0 .../tests/{ => unittests}/test_split_op.py | 0 .../test_split_selected_rows_op.py | 0 .../test_split_var.py | 0 .../tests/{ => unittests}/test_spp_op.py | 0 .../test_squared_l2_distance_op.py | 0 .../test_squared_l2_norm_op.py | 0 .../tests/{ => unittests}/test_sum_op.py | 0 .../tests/{ => unittests}/test_switch.py | 0 .../{ => unittests}/test_target_assign_op.py | 0 .../tests/{ => unittests}/test_tensor.py | 0 .../tests/{ => unittests}/test_top_k_op.py | 0 .../{ => unittests}/test_transpose_op.py | 0 .../{ => unittests}/test_uniform_random_op.py | 0 .../tests/{ => unittests}/test_unpool_op.py | 0 .../tests/{ => unittests}/test_variable.py | 0 .../tests/{ => unittests}/test_warpctc_op.py | 0 .../test_weight_normalization.py | 0 .../tests/{ => unittests}/test_while_op.py | 0 193 files changed, 111 insertions(+), 26 deletions(-) create mode 100644 python/paddle/v2/fluid/tests/unittests/CMakeLists.txt create mode 100644 python/paddle/v2/fluid/tests/unittests/__init__.py rename python/paddle/v2/fluid/tests/{ => unittests}/decorators.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/op_test.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_accuracy_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_activation_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_adadelta_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_adagrad_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_adam_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_adamax_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_array_read_write_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_assign_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_assign_value_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_auc_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_batch_norm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_beam_search_decode_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_beam_search_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_bilinear_tensor_product_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_bipartite_match_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_box_coder_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_calc_gradient.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_cast_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_chunk_eval_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_clip_by_norm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_clip_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_compare_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_concat_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_cond_op.py (96%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_conditional_block.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_const_value.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_conv2d_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_conv2d_transpose_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_conv3d_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_conv3d_transpose_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_conv_shift_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_cos_sim_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_create_op_doc_string.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_crf_decoding_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_crop_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_cross_entropy_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_ctc_align.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_cumsum_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_decayed_adagrad_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_default_scope_funcs.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_detection_map_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_detection_output_op.py (94%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_dropout_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_dyn_rnn.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_dynrnn_gradient_check.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_dynrnn_static_input.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_edit_distance_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_add_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_div_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_max_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_min_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_mul_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_pow_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_elementwise_sub_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_exception.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_executor_and_mul.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_expand_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_feed_fetch_method.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_fetch_var.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_fill_constant_batch_size_like_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_fill_constant_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_fill_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_fill_zeros_like_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_framework_debug_str.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_ftrl_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_gather_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_gaussian_random_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_get_places_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_gru_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_gru_unit_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_hinge_loss_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_huber_loss_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_im2sequence_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_image_classification_layer.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_infer_shape.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_inference_model_io.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_initializer.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_iou_similarity_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_is_empty_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_l1_norm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_label_smooth_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_layer_norm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_layers.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_learning_rate_decay.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_linear_chain_crf_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lod_array_length_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lod_rank_table.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lod_reset_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lod_tensor_array.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lod_tensor_array_ops.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_log_loss_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_logical_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lookup_table_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lrn_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lstm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lstm_unit_op.py (95%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_lstmp_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_margin_rank_loss_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_math_op_patch.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_matmul_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_maxout_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_mean_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_memory_optimization_transpiler.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_mine_hard_examples_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_minus_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_modified_huber_loss_op.py (96%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_momentum_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_mul_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_multiclass_nms_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_multihead_attention.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_multiplex_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_nce.py (97%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_net.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_norm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_normalization_wrapper.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_one_hot_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_op_support_gpu.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_operator.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_operator_desc.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_optimizer.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_pad_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_parallel_op.py (96%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_parameter.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_pool2d_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_pool3d_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_pool_max_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_positive_negative_pair_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_precision_recall_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_prelu_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_print_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_prior_box_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_profiler.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_program.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_protobuf.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_protobuf_descs.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_proximal_adagrad_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_proximal_gd_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_rank_loss_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_recurrent_op.py (99%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_recv_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_reduce_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_registry.py (94%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_regularizer.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_reorder_lod_tensor.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_reshape_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_rmsprop_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_rnn_memory_helper_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_roi_pool_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_row_conv_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_scale_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_scatter_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_scope.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_selected_rows.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_seq_concat_op.py (99%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_seq_conv.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_seq_pool.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sequence_erase_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sequence_expand.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sequence_reshape.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sequence_slice_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sequence_softmax_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sgd_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_shrink_rnn_memory.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sigmoid_cross_entropy_with_logits_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sign_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_smooth_l1_loss_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_softmax_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_softmax_with_cross_entropy_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_split_and_merge_lod_tensor_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_split_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_split_selected_rows_op.py (100%) rename python/paddle/v2/fluid/tests/{book_distribute => unittests}/test_split_var.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_spp_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_squared_l2_distance_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_squared_l2_norm_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_sum_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_switch.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_target_assign_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_tensor.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_top_k_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_transpose_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_uniform_random_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_unpool_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_variable.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_warpctc_op.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_weight_normalization.py (100%) rename python/paddle/v2/fluid/tests/{ => unittests}/test_while_op.py (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae04f9ff3..fb91e3b36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,7 @@ option(USE_NNPACK "Compile PaddlePaddle with NNPACK library" OFF) option(WITH_DISTRIBUTE "Compile with grpc distributed support" OFF) option(USE_EIGEN_FOR_BLAS "Use matrix multiplication in Eigen" OFF) option(WITH_ARM_FP16 "Use half precision support on armv8.2-a cpu" OFF) +option(WITH_FAST_BUNDLE_TEST "Bundle tests that can be run in a single process together to reduce launch overhead" ON) # CMAKE_BUILD_TYPE if(NOT CMAKE_BUILD_TYPE) diff --git a/python/paddle/v2/fluid/tests/CMakeLists.txt b/python/paddle/v2/fluid/tests/CMakeLists.txt index 26a80abcb..5ff7b1b02 100644 --- a/python/paddle/v2/fluid/tests/CMakeLists.txt +++ b/python/paddle/v2/fluid/tests/CMakeLists.txt @@ -1,16 +1,11 @@ file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py") string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}") -if(NOT WITH_DISTRIBUTE) - list(REMOVE_ITEM TEST_OPS test_recv_op) -endif(NOT WITH_DISTRIBUTE) - -list(REMOVE_ITEM TEST_OPS test_warpctc_op) foreach(src ${TEST_OPS}) - py_test(${src} SRCS ${src}.py) + py_test(${src} SRCS ${src}.py) endforeach() -py_test(test_warpctc_op SRCS test_warpctc_op.py ENVS FLAGS_warpctc_dir=${WARPCTC_LIB_DIR}) +add_subdirectory(unittests) add_subdirectory(book) add_subdirectory(book_distribute) add_subdirectory(book_memory_optimization) diff --git a/python/paddle/v2/fluid/tests/unittests/CMakeLists.txt b/python/paddle/v2/fluid/tests/unittests/CMakeLists.txt new file mode 100644 index 000000000..9355f5131 --- /dev/null +++ b/python/paddle/v2/fluid/tests/unittests/CMakeLists.txt @@ -0,0 +1,89 @@ +file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py") +string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}") + +if(NOT WITH_DISTRIBUTE) + list(REMOVE_ITEM TEST_OPS test_recv_op) +endif(NOT WITH_DISTRIBUTE) + +list(REMOVE_ITEM TEST_OPS test_seq_concat_op) # FIXME(helin): https://github.com/PaddlePaddle/Paddle/issues/8290 +list(REMOVE_ITEM TEST_OPS test_modified_huber_loss_op) # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/5184 +list(REMOVE_ITEM TEST_OPS test_lstm_unit_op) # # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/5185 +list(REMOVE_ITEM TEST_OPS test_nce) # IXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/7778 +list(REMOVE_ITEM TEST_OPS test_recurrent_op) # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/6152 +list(REMOVE_ITEM TEST_OPS test_cond_op) # FIXME(qijun): https://github.com/PaddlePaddle/Paddle/issues/5101#issuecomment-339814957 +list(REMOVE_ITEM TEST_OPS test_detection_output_op) # FIXME: detection_output_op will be rewritten. This unittest should be + +list(REMOVE_ITEM TEST_OPS op_test) # op_test is a helper python file, not a test +list(REMOVE_ITEM TEST_OPS decorators) # decorators is a helper python file, not a test + +function(py_test_modules TARGET_NAME) + if(WITH_TESTING) + set(options "") + set(oneValueArgs "") + set(multiValueArgs MODULES DEPS ARGS ENVS) + cmake_parse_arguments(py_test_modules "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + add_test(NAME ${TARGET_NAME} + COMMAND env PYTHONPATH=${PADDLE_PYTHON_BUILD_DIR}/lib-python ${py_test_modules_ENVS} + ${PYTHON_EXECUTABLE} -u -m unittest --verbose ${py_test_modules_MODULES} ${py_test_modules_ARGS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + endif() +endfunction() + +# test time consuming OPs in a separate process for expliot parallism +list(REMOVE_ITEM TEST_OPS test_warpctc_op) +list(REMOVE_ITEM TEST_OPS test_dyn_rnn) +list(REMOVE_ITEM TEST_OPS test_mul_op) + +# tests that need to be run in separate process. +list(REMOVE_ITEM TEST_OPS test_multihead_attention) +list(REMOVE_ITEM TEST_OPS test_calc_gradient) +list(REMOVE_ITEM TEST_OPS test_while_op) +list(REMOVE_ITEM TEST_OPS test_lod_array_length_op) +list(REMOVE_ITEM TEST_OPS test_reorder_lod_tensor) +list(REMOVE_ITEM TEST_OPS test_profiler) +list(REMOVE_ITEM TEST_OPS test_normalization_wrapper) +list(REMOVE_ITEM TEST_OPS test_executor_and_mul) +list(REMOVE_ITEM TEST_OPS test_assign_value_op) +list(REMOVE_ITEM TEST_OPS test_array_read_write_op) +list(REMOVE_ITEM TEST_OPS test_lod_rank_table) +list(REMOVE_ITEM TEST_OPS test_weight_normalization) +list(REMOVE_ITEM TEST_OPS test_conditional_block) +list(REMOVE_ITEM TEST_OPS test_parameter) +list(REMOVE_ITEM TEST_OPS test_registry) +list(REMOVE_ITEM TEST_OPS test_fetch_var) +list(REMOVE_ITEM TEST_OPS test_parallel_op) +list(REMOVE_ITEM TEST_OPS test_dynrnn_static_input) + +# tests that can be bundled together in one python process for speed. +if(WITH_FAST_BUNDLE_TEST) + py_test_modules("test_all_ops" MODULES ${TEST_OPS}) +else() + foreach(TEST_OP ${TEST_OPS}) + py_test_modules(${TEST_OP} MODULES ${TEST_OP}) + endforeach(TEST_OP) +endif(WITH_FAST_BUNDLE_TEST) + +# tests with high overhead +py_test_modules(test_warpctc_op MODULES test_warpctc_op ENVS FLAGS_warpctc_dir=${WARPCTC_LIB_DIR}) +py_test_modules(test_train_dyn_rnn MODULES test_dyn_rnn) +py_test_modules(test_mul_op MODULES test_mul_op) + +# tests that need to be run in separate process. +py_test_modules(test_multihead_attention MODULES test_multihead_attention) +py_test_modules(test_calc_gradient MODULES test_calc_gradient) +py_test_modules(test_while_op MODULES test_while_op) +py_test_modules(test_lod_array_length_op MODULES test_lod_array_length_op) +py_test_modules(test_reorder_lod_tensor MODULES test_reorder_lod_tensor) +py_test_modules(test_profiler MODULES test_profiler) +py_test_modules(test_normalization_wrapper MODULES test_normalization_wrapper) +py_test_modules(test_executor_and_mul MODULES test_executor_and_mul) +py_test_modules(test_assign_value_op MODULES test_assign_value_op) +py_test_modules(test_array_read_write_op MODULES test_array_read_write_op) +py_test_modules(test_lod_rank_table MODULES test_lod_rank_table) +py_test_modules(test_weight_normalization MODULES test_weight_normalization) +py_test_modules(test_conditional_block MODULES test_conditional_block) +py_test_modules(test_parameter MODULES test_parameter) +py_test_modules(test_registry MODULES test_registry) +py_test_modules(test_fetch_var MODULES test_fetch_var) +py_test_modules(test_dynrnn_static_input MODULES test_dynrnn_static_input) +py_test_modules(test_parallel_op MODULES test_parallel_op) diff --git a/python/paddle/v2/fluid/tests/unittests/__init__.py b/python/paddle/v2/fluid/tests/unittests/__init__.py new file mode 100644 index 000000000..b94a21a7e --- /dev/null +++ b/python/paddle/v2/fluid/tests/unittests/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/python/paddle/v2/fluid/tests/decorators.py b/python/paddle/v2/fluid/tests/unittests/decorators.py similarity index 100% rename from python/paddle/v2/fluid/tests/decorators.py rename to python/paddle/v2/fluid/tests/unittests/decorators.py diff --git a/python/paddle/v2/fluid/tests/op_test.py b/python/paddle/v2/fluid/tests/unittests/op_test.py similarity index 100% rename from python/paddle/v2/fluid/tests/op_test.py rename to python/paddle/v2/fluid/tests/unittests/op_test.py diff --git a/python/paddle/v2/fluid/tests/test_accuracy_op.py b/python/paddle/v2/fluid/tests/unittests/test_accuracy_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_accuracy_op.py rename to python/paddle/v2/fluid/tests/unittests/test_accuracy_op.py diff --git a/python/paddle/v2/fluid/tests/test_activation_op.py b/python/paddle/v2/fluid/tests/unittests/test_activation_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_activation_op.py rename to python/paddle/v2/fluid/tests/unittests/test_activation_op.py diff --git a/python/paddle/v2/fluid/tests/test_adadelta_op.py b/python/paddle/v2/fluid/tests/unittests/test_adadelta_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_adadelta_op.py rename to python/paddle/v2/fluid/tests/unittests/test_adadelta_op.py diff --git a/python/paddle/v2/fluid/tests/test_adagrad_op.py b/python/paddle/v2/fluid/tests/unittests/test_adagrad_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_adagrad_op.py rename to python/paddle/v2/fluid/tests/unittests/test_adagrad_op.py diff --git a/python/paddle/v2/fluid/tests/test_adam_op.py b/python/paddle/v2/fluid/tests/unittests/test_adam_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_adam_op.py rename to python/paddle/v2/fluid/tests/unittests/test_adam_op.py diff --git a/python/paddle/v2/fluid/tests/test_adamax_op.py b/python/paddle/v2/fluid/tests/unittests/test_adamax_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_adamax_op.py rename to python/paddle/v2/fluid/tests/unittests/test_adamax_op.py diff --git a/python/paddle/v2/fluid/tests/test_array_read_write_op.py b/python/paddle/v2/fluid/tests/unittests/test_array_read_write_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_array_read_write_op.py rename to python/paddle/v2/fluid/tests/unittests/test_array_read_write_op.py diff --git a/python/paddle/v2/fluid/tests/test_assign_op.py b/python/paddle/v2/fluid/tests/unittests/test_assign_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_assign_op.py rename to python/paddle/v2/fluid/tests/unittests/test_assign_op.py diff --git a/python/paddle/v2/fluid/tests/test_assign_value_op.py b/python/paddle/v2/fluid/tests/unittests/test_assign_value_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_assign_value_op.py rename to python/paddle/v2/fluid/tests/unittests/test_assign_value_op.py diff --git a/python/paddle/v2/fluid/tests/test_auc_op.py b/python/paddle/v2/fluid/tests/unittests/test_auc_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_auc_op.py rename to python/paddle/v2/fluid/tests/unittests/test_auc_op.py diff --git a/python/paddle/v2/fluid/tests/test_batch_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_batch_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_batch_norm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_batch_norm_op.py diff --git a/python/paddle/v2/fluid/tests/test_beam_search_decode_op.py b/python/paddle/v2/fluid/tests/unittests/test_beam_search_decode_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_beam_search_decode_op.py rename to python/paddle/v2/fluid/tests/unittests/test_beam_search_decode_op.py diff --git a/python/paddle/v2/fluid/tests/test_beam_search_op.py b/python/paddle/v2/fluid/tests/unittests/test_beam_search_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_beam_search_op.py rename to python/paddle/v2/fluid/tests/unittests/test_beam_search_op.py diff --git a/python/paddle/v2/fluid/tests/test_bilinear_tensor_product_op.py b/python/paddle/v2/fluid/tests/unittests/test_bilinear_tensor_product_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_bilinear_tensor_product_op.py rename to python/paddle/v2/fluid/tests/unittests/test_bilinear_tensor_product_op.py diff --git a/python/paddle/v2/fluid/tests/test_bipartite_match_op.py b/python/paddle/v2/fluid/tests/unittests/test_bipartite_match_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_bipartite_match_op.py rename to python/paddle/v2/fluid/tests/unittests/test_bipartite_match_op.py diff --git a/python/paddle/v2/fluid/tests/test_box_coder_op.py b/python/paddle/v2/fluid/tests/unittests/test_box_coder_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_box_coder_op.py rename to python/paddle/v2/fluid/tests/unittests/test_box_coder_op.py diff --git a/python/paddle/v2/fluid/tests/test_calc_gradient.py b/python/paddle/v2/fluid/tests/unittests/test_calc_gradient.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_calc_gradient.py rename to python/paddle/v2/fluid/tests/unittests/test_calc_gradient.py diff --git a/python/paddle/v2/fluid/tests/test_cast_op.py b/python/paddle/v2/fluid/tests/unittests/test_cast_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_cast_op.py rename to python/paddle/v2/fluid/tests/unittests/test_cast_op.py diff --git a/python/paddle/v2/fluid/tests/test_chunk_eval_op.py b/python/paddle/v2/fluid/tests/unittests/test_chunk_eval_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_chunk_eval_op.py rename to python/paddle/v2/fluid/tests/unittests/test_chunk_eval_op.py diff --git a/python/paddle/v2/fluid/tests/test_clip_by_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_clip_by_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_clip_by_norm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_clip_by_norm_op.py diff --git a/python/paddle/v2/fluid/tests/test_clip_op.py b/python/paddle/v2/fluid/tests/unittests/test_clip_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_clip_op.py rename to python/paddle/v2/fluid/tests/unittests/test_clip_op.py diff --git a/python/paddle/v2/fluid/tests/test_compare_op.py b/python/paddle/v2/fluid/tests/unittests/test_compare_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_compare_op.py rename to python/paddle/v2/fluid/tests/unittests/test_compare_op.py diff --git a/python/paddle/v2/fluid/tests/test_concat_op.py b/python/paddle/v2/fluid/tests/unittests/test_concat_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_concat_op.py rename to python/paddle/v2/fluid/tests/unittests/test_concat_op.py diff --git a/python/paddle/v2/fluid/tests/test_cond_op.py b/python/paddle/v2/fluid/tests/unittests/test_cond_op.py similarity index 96% rename from python/paddle/v2/fluid/tests/test_cond_op.py rename to python/paddle/v2/fluid/tests/unittests/test_cond_op.py index 6f4380166..4a1e806c4 100644 --- a/python/paddle/v2/fluid/tests/test_cond_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_cond_op.py @@ -125,7 +125,4 @@ class TestCondOp(unittest.TestCase): if __name__ == "__main__": - exit( - 0 - ) # FIXME(qijun): https://github.com/PaddlePaddle/Paddle/issues/5101#issuecomment-339814957 unittest.main() diff --git a/python/paddle/v2/fluid/tests/test_conditional_block.py b/python/paddle/v2/fluid/tests/unittests/test_conditional_block.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_conditional_block.py rename to python/paddle/v2/fluid/tests/unittests/test_conditional_block.py diff --git a/python/paddle/v2/fluid/tests/test_const_value.py b/python/paddle/v2/fluid/tests/unittests/test_const_value.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_const_value.py rename to python/paddle/v2/fluid/tests/unittests/test_const_value.py diff --git a/python/paddle/v2/fluid/tests/test_conv2d_op.py b/python/paddle/v2/fluid/tests/unittests/test_conv2d_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_conv2d_op.py rename to python/paddle/v2/fluid/tests/unittests/test_conv2d_op.py diff --git a/python/paddle/v2/fluid/tests/test_conv2d_transpose_op.py b/python/paddle/v2/fluid/tests/unittests/test_conv2d_transpose_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_conv2d_transpose_op.py rename to python/paddle/v2/fluid/tests/unittests/test_conv2d_transpose_op.py diff --git a/python/paddle/v2/fluid/tests/test_conv3d_op.py b/python/paddle/v2/fluid/tests/unittests/test_conv3d_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_conv3d_op.py rename to python/paddle/v2/fluid/tests/unittests/test_conv3d_op.py diff --git a/python/paddle/v2/fluid/tests/test_conv3d_transpose_op.py b/python/paddle/v2/fluid/tests/unittests/test_conv3d_transpose_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_conv3d_transpose_op.py rename to python/paddle/v2/fluid/tests/unittests/test_conv3d_transpose_op.py diff --git a/python/paddle/v2/fluid/tests/test_conv_shift_op.py b/python/paddle/v2/fluid/tests/unittests/test_conv_shift_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_conv_shift_op.py rename to python/paddle/v2/fluid/tests/unittests/test_conv_shift_op.py diff --git a/python/paddle/v2/fluid/tests/test_cos_sim_op.py b/python/paddle/v2/fluid/tests/unittests/test_cos_sim_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_cos_sim_op.py rename to python/paddle/v2/fluid/tests/unittests/test_cos_sim_op.py diff --git a/python/paddle/v2/fluid/tests/test_create_op_doc_string.py b/python/paddle/v2/fluid/tests/unittests/test_create_op_doc_string.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_create_op_doc_string.py rename to python/paddle/v2/fluid/tests/unittests/test_create_op_doc_string.py diff --git a/python/paddle/v2/fluid/tests/test_crf_decoding_op.py b/python/paddle/v2/fluid/tests/unittests/test_crf_decoding_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_crf_decoding_op.py rename to python/paddle/v2/fluid/tests/unittests/test_crf_decoding_op.py diff --git a/python/paddle/v2/fluid/tests/test_crop_op.py b/python/paddle/v2/fluid/tests/unittests/test_crop_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_crop_op.py rename to python/paddle/v2/fluid/tests/unittests/test_crop_op.py diff --git a/python/paddle/v2/fluid/tests/test_cross_entropy_op.py b/python/paddle/v2/fluid/tests/unittests/test_cross_entropy_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_cross_entropy_op.py rename to python/paddle/v2/fluid/tests/unittests/test_cross_entropy_op.py diff --git a/python/paddle/v2/fluid/tests/test_ctc_align.py b/python/paddle/v2/fluid/tests/unittests/test_ctc_align.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_ctc_align.py rename to python/paddle/v2/fluid/tests/unittests/test_ctc_align.py diff --git a/python/paddle/v2/fluid/tests/test_cumsum_op.py b/python/paddle/v2/fluid/tests/unittests/test_cumsum_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_cumsum_op.py rename to python/paddle/v2/fluid/tests/unittests/test_cumsum_op.py diff --git a/python/paddle/v2/fluid/tests/test_decayed_adagrad_op.py b/python/paddle/v2/fluid/tests/unittests/test_decayed_adagrad_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_decayed_adagrad_op.py rename to python/paddle/v2/fluid/tests/unittests/test_decayed_adagrad_op.py diff --git a/python/paddle/v2/fluid/tests/test_default_scope_funcs.py b/python/paddle/v2/fluid/tests/unittests/test_default_scope_funcs.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_default_scope_funcs.py rename to python/paddle/v2/fluid/tests/unittests/test_default_scope_funcs.py diff --git a/python/paddle/v2/fluid/tests/test_detection_map_op.py b/python/paddle/v2/fluid/tests/unittests/test_detection_map_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_detection_map_op.py rename to python/paddle/v2/fluid/tests/unittests/test_detection_map_op.py diff --git a/python/paddle/v2/fluid/tests/test_detection_output_op.py b/python/paddle/v2/fluid/tests/unittests/test_detection_output_op.py similarity index 94% rename from python/paddle/v2/fluid/tests/test_detection_output_op.py rename to python/paddle/v2/fluid/tests/unittests/test_detection_output_op.py index 0a132652f..946813191 100644 --- a/python/paddle/v2/fluid/tests/test_detection_output_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_detection_output_op.py @@ -68,6 +68,4 @@ class TestUnpoolOp(OpTest): if __name__ == '__main__': - # FIXME: detection_output_op will be rewritten. This unittest should be - # enabled after rewriting. - exit(0) # temporary disable this unittest + unittest.main() diff --git a/python/paddle/v2/fluid/tests/test_dropout_op.py b/python/paddle/v2/fluid/tests/unittests/test_dropout_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_dropout_op.py rename to python/paddle/v2/fluid/tests/unittests/test_dropout_op.py diff --git a/python/paddle/v2/fluid/tests/test_dyn_rnn.py b/python/paddle/v2/fluid/tests/unittests/test_dyn_rnn.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_dyn_rnn.py rename to python/paddle/v2/fluid/tests/unittests/test_dyn_rnn.py diff --git a/python/paddle/v2/fluid/tests/test_dynrnn_gradient_check.py b/python/paddle/v2/fluid/tests/unittests/test_dynrnn_gradient_check.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_dynrnn_gradient_check.py rename to python/paddle/v2/fluid/tests/unittests/test_dynrnn_gradient_check.py diff --git a/python/paddle/v2/fluid/tests/test_dynrnn_static_input.py b/python/paddle/v2/fluid/tests/unittests/test_dynrnn_static_input.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_dynrnn_static_input.py rename to python/paddle/v2/fluid/tests/unittests/test_dynrnn_static_input.py diff --git a/python/paddle/v2/fluid/tests/test_edit_distance_op.py b/python/paddle/v2/fluid/tests/unittests/test_edit_distance_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_edit_distance_op.py rename to python/paddle/v2/fluid/tests/unittests/test_edit_distance_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_add_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_add_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_add_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_add_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_div_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_div_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_div_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_div_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_max_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_max_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_max_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_max_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_min_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_min_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_min_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_min_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_mul_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_mul_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_mul_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_mul_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_pow_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_pow_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_pow_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_pow_op.py diff --git a/python/paddle/v2/fluid/tests/test_elementwise_sub_op.py b/python/paddle/v2/fluid/tests/unittests/test_elementwise_sub_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_elementwise_sub_op.py rename to python/paddle/v2/fluid/tests/unittests/test_elementwise_sub_op.py diff --git a/python/paddle/v2/fluid/tests/test_exception.py b/python/paddle/v2/fluid/tests/unittests/test_exception.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_exception.py rename to python/paddle/v2/fluid/tests/unittests/test_exception.py diff --git a/python/paddle/v2/fluid/tests/test_executor_and_mul.py b/python/paddle/v2/fluid/tests/unittests/test_executor_and_mul.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_executor_and_mul.py rename to python/paddle/v2/fluid/tests/unittests/test_executor_and_mul.py diff --git a/python/paddle/v2/fluid/tests/test_expand_op.py b/python/paddle/v2/fluid/tests/unittests/test_expand_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_expand_op.py rename to python/paddle/v2/fluid/tests/unittests/test_expand_op.py diff --git a/python/paddle/v2/fluid/tests/test_feed_fetch_method.py b/python/paddle/v2/fluid/tests/unittests/test_feed_fetch_method.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_feed_fetch_method.py rename to python/paddle/v2/fluid/tests/unittests/test_feed_fetch_method.py diff --git a/python/paddle/v2/fluid/tests/test_fetch_var.py b/python/paddle/v2/fluid/tests/unittests/test_fetch_var.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_fetch_var.py rename to python/paddle/v2/fluid/tests/unittests/test_fetch_var.py diff --git a/python/paddle/v2/fluid/tests/test_fill_constant_batch_size_like_op.py b/python/paddle/v2/fluid/tests/unittests/test_fill_constant_batch_size_like_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_fill_constant_batch_size_like_op.py rename to python/paddle/v2/fluid/tests/unittests/test_fill_constant_batch_size_like_op.py diff --git a/python/paddle/v2/fluid/tests/test_fill_constant_op.py b/python/paddle/v2/fluid/tests/unittests/test_fill_constant_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_fill_constant_op.py rename to python/paddle/v2/fluid/tests/unittests/test_fill_constant_op.py diff --git a/python/paddle/v2/fluid/tests/test_fill_op.py b/python/paddle/v2/fluid/tests/unittests/test_fill_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_fill_op.py rename to python/paddle/v2/fluid/tests/unittests/test_fill_op.py diff --git a/python/paddle/v2/fluid/tests/test_fill_zeros_like_op.py b/python/paddle/v2/fluid/tests/unittests/test_fill_zeros_like_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_fill_zeros_like_op.py rename to python/paddle/v2/fluid/tests/unittests/test_fill_zeros_like_op.py diff --git a/python/paddle/v2/fluid/tests/test_framework_debug_str.py b/python/paddle/v2/fluid/tests/unittests/test_framework_debug_str.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_framework_debug_str.py rename to python/paddle/v2/fluid/tests/unittests/test_framework_debug_str.py diff --git a/python/paddle/v2/fluid/tests/test_ftrl_op.py b/python/paddle/v2/fluid/tests/unittests/test_ftrl_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_ftrl_op.py rename to python/paddle/v2/fluid/tests/unittests/test_ftrl_op.py diff --git a/python/paddle/v2/fluid/tests/test_gather_op.py b/python/paddle/v2/fluid/tests/unittests/test_gather_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_gather_op.py rename to python/paddle/v2/fluid/tests/unittests/test_gather_op.py diff --git a/python/paddle/v2/fluid/tests/test_gaussian_random_op.py b/python/paddle/v2/fluid/tests/unittests/test_gaussian_random_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_gaussian_random_op.py rename to python/paddle/v2/fluid/tests/unittests/test_gaussian_random_op.py diff --git a/python/paddle/v2/fluid/tests/test_get_places_op.py b/python/paddle/v2/fluid/tests/unittests/test_get_places_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_get_places_op.py rename to python/paddle/v2/fluid/tests/unittests/test_get_places_op.py diff --git a/python/paddle/v2/fluid/tests/test_gru_op.py b/python/paddle/v2/fluid/tests/unittests/test_gru_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_gru_op.py rename to python/paddle/v2/fluid/tests/unittests/test_gru_op.py diff --git a/python/paddle/v2/fluid/tests/test_gru_unit_op.py b/python/paddle/v2/fluid/tests/unittests/test_gru_unit_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_gru_unit_op.py rename to python/paddle/v2/fluid/tests/unittests/test_gru_unit_op.py diff --git a/python/paddle/v2/fluid/tests/test_hinge_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_hinge_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_hinge_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_hinge_loss_op.py diff --git a/python/paddle/v2/fluid/tests/test_huber_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_huber_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_huber_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_huber_loss_op.py diff --git a/python/paddle/v2/fluid/tests/test_im2sequence_op.py b/python/paddle/v2/fluid/tests/unittests/test_im2sequence_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_im2sequence_op.py rename to python/paddle/v2/fluid/tests/unittests/test_im2sequence_op.py diff --git a/python/paddle/v2/fluid/tests/test_image_classification_layer.py b/python/paddle/v2/fluid/tests/unittests/test_image_classification_layer.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_image_classification_layer.py rename to python/paddle/v2/fluid/tests/unittests/test_image_classification_layer.py diff --git a/python/paddle/v2/fluid/tests/test_infer_shape.py b/python/paddle/v2/fluid/tests/unittests/test_infer_shape.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_infer_shape.py rename to python/paddle/v2/fluid/tests/unittests/test_infer_shape.py diff --git a/python/paddle/v2/fluid/tests/test_inference_model_io.py b/python/paddle/v2/fluid/tests/unittests/test_inference_model_io.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_inference_model_io.py rename to python/paddle/v2/fluid/tests/unittests/test_inference_model_io.py diff --git a/python/paddle/v2/fluid/tests/test_initializer.py b/python/paddle/v2/fluid/tests/unittests/test_initializer.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_initializer.py rename to python/paddle/v2/fluid/tests/unittests/test_initializer.py diff --git a/python/paddle/v2/fluid/tests/test_iou_similarity_op.py b/python/paddle/v2/fluid/tests/unittests/test_iou_similarity_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_iou_similarity_op.py rename to python/paddle/v2/fluid/tests/unittests/test_iou_similarity_op.py diff --git a/python/paddle/v2/fluid/tests/test_is_empty_op.py b/python/paddle/v2/fluid/tests/unittests/test_is_empty_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_is_empty_op.py rename to python/paddle/v2/fluid/tests/unittests/test_is_empty_op.py diff --git a/python/paddle/v2/fluid/tests/test_l1_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_l1_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_l1_norm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_l1_norm_op.py diff --git a/python/paddle/v2/fluid/tests/test_label_smooth_op.py b/python/paddle/v2/fluid/tests/unittests/test_label_smooth_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_label_smooth_op.py rename to python/paddle/v2/fluid/tests/unittests/test_label_smooth_op.py diff --git a/python/paddle/v2/fluid/tests/test_layer_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_layer_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_layer_norm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_layer_norm_op.py diff --git a/python/paddle/v2/fluid/tests/test_layers.py b/python/paddle/v2/fluid/tests/unittests/test_layers.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_layers.py rename to python/paddle/v2/fluid/tests/unittests/test_layers.py diff --git a/python/paddle/v2/fluid/tests/test_learning_rate_decay.py b/python/paddle/v2/fluid/tests/unittests/test_learning_rate_decay.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_learning_rate_decay.py rename to python/paddle/v2/fluid/tests/unittests/test_learning_rate_decay.py diff --git a/python/paddle/v2/fluid/tests/test_linear_chain_crf_op.py b/python/paddle/v2/fluid/tests/unittests/test_linear_chain_crf_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_linear_chain_crf_op.py rename to python/paddle/v2/fluid/tests/unittests/test_linear_chain_crf_op.py diff --git a/python/paddle/v2/fluid/tests/test_lod_array_length_op.py b/python/paddle/v2/fluid/tests/unittests/test_lod_array_length_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lod_array_length_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lod_array_length_op.py diff --git a/python/paddle/v2/fluid/tests/test_lod_rank_table.py b/python/paddle/v2/fluid/tests/unittests/test_lod_rank_table.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lod_rank_table.py rename to python/paddle/v2/fluid/tests/unittests/test_lod_rank_table.py diff --git a/python/paddle/v2/fluid/tests/test_lod_reset_op.py b/python/paddle/v2/fluid/tests/unittests/test_lod_reset_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lod_reset_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lod_reset_op.py diff --git a/python/paddle/v2/fluid/tests/test_lod_tensor_array.py b/python/paddle/v2/fluid/tests/unittests/test_lod_tensor_array.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lod_tensor_array.py rename to python/paddle/v2/fluid/tests/unittests/test_lod_tensor_array.py diff --git a/python/paddle/v2/fluid/tests/test_lod_tensor_array_ops.py b/python/paddle/v2/fluid/tests/unittests/test_lod_tensor_array_ops.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lod_tensor_array_ops.py rename to python/paddle/v2/fluid/tests/unittests/test_lod_tensor_array_ops.py diff --git a/python/paddle/v2/fluid/tests/test_log_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_log_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_log_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_log_loss_op.py diff --git a/python/paddle/v2/fluid/tests/test_logical_op.py b/python/paddle/v2/fluid/tests/unittests/test_logical_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_logical_op.py rename to python/paddle/v2/fluid/tests/unittests/test_logical_op.py diff --git a/python/paddle/v2/fluid/tests/test_lookup_table_op.py b/python/paddle/v2/fluid/tests/unittests/test_lookup_table_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lookup_table_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lookup_table_op.py diff --git a/python/paddle/v2/fluid/tests/test_lrn_op.py b/python/paddle/v2/fluid/tests/unittests/test_lrn_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lrn_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lrn_op.py diff --git a/python/paddle/v2/fluid/tests/test_lstm_op.py b/python/paddle/v2/fluid/tests/unittests/test_lstm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lstm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lstm_op.py diff --git a/python/paddle/v2/fluid/tests/test_lstm_unit_op.py b/python/paddle/v2/fluid/tests/unittests/test_lstm_unit_op.py similarity index 95% rename from python/paddle/v2/fluid/tests/test_lstm_unit_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lstm_unit_op.py index af0c3db70..e34326587 100644 --- a/python/paddle/v2/fluid/tests/test_lstm_unit_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_lstm_unit_op.py @@ -49,6 +49,4 @@ class LstmUnitTest(OpTest): if __name__ == "__main__": - # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/5185 - exit(0) unittest.main() diff --git a/python/paddle/v2/fluid/tests/test_lstmp_op.py b/python/paddle/v2/fluid/tests/unittests/test_lstmp_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_lstmp_op.py rename to python/paddle/v2/fluid/tests/unittests/test_lstmp_op.py diff --git a/python/paddle/v2/fluid/tests/test_margin_rank_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_margin_rank_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_margin_rank_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_margin_rank_loss_op.py diff --git a/python/paddle/v2/fluid/tests/test_math_op_patch.py b/python/paddle/v2/fluid/tests/unittests/test_math_op_patch.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_math_op_patch.py rename to python/paddle/v2/fluid/tests/unittests/test_math_op_patch.py diff --git a/python/paddle/v2/fluid/tests/test_matmul_op.py b/python/paddle/v2/fluid/tests/unittests/test_matmul_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_matmul_op.py rename to python/paddle/v2/fluid/tests/unittests/test_matmul_op.py diff --git a/python/paddle/v2/fluid/tests/test_maxout_op.py b/python/paddle/v2/fluid/tests/unittests/test_maxout_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_maxout_op.py rename to python/paddle/v2/fluid/tests/unittests/test_maxout_op.py diff --git a/python/paddle/v2/fluid/tests/test_mean_op.py b/python/paddle/v2/fluid/tests/unittests/test_mean_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_mean_op.py rename to python/paddle/v2/fluid/tests/unittests/test_mean_op.py diff --git a/python/paddle/v2/fluid/tests/test_memory_optimization_transpiler.py b/python/paddle/v2/fluid/tests/unittests/test_memory_optimization_transpiler.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_memory_optimization_transpiler.py rename to python/paddle/v2/fluid/tests/unittests/test_memory_optimization_transpiler.py diff --git a/python/paddle/v2/fluid/tests/test_mine_hard_examples_op.py b/python/paddle/v2/fluid/tests/unittests/test_mine_hard_examples_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_mine_hard_examples_op.py rename to python/paddle/v2/fluid/tests/unittests/test_mine_hard_examples_op.py diff --git a/python/paddle/v2/fluid/tests/test_minus_op.py b/python/paddle/v2/fluid/tests/unittests/test_minus_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_minus_op.py rename to python/paddle/v2/fluid/tests/unittests/test_minus_op.py diff --git a/python/paddle/v2/fluid/tests/test_modified_huber_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_modified_huber_loss_op.py similarity index 96% rename from python/paddle/v2/fluid/tests/test_modified_huber_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_modified_huber_loss_op.py index def48c926..62035efe8 100644 --- a/python/paddle/v2/fluid/tests/test_modified_huber_loss_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_modified_huber_loss_op.py @@ -59,6 +59,4 @@ class TestModifiedHuberLossOp(OpTest): if __name__ == '__main__': - exit(0) - # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/5184 unittest.main() diff --git a/python/paddle/v2/fluid/tests/test_momentum_op.py b/python/paddle/v2/fluid/tests/unittests/test_momentum_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_momentum_op.py rename to python/paddle/v2/fluid/tests/unittests/test_momentum_op.py diff --git a/python/paddle/v2/fluid/tests/test_mul_op.py b/python/paddle/v2/fluid/tests/unittests/test_mul_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_mul_op.py rename to python/paddle/v2/fluid/tests/unittests/test_mul_op.py diff --git a/python/paddle/v2/fluid/tests/test_multiclass_nms_op.py b/python/paddle/v2/fluid/tests/unittests/test_multiclass_nms_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_multiclass_nms_op.py rename to python/paddle/v2/fluid/tests/unittests/test_multiclass_nms_op.py diff --git a/python/paddle/v2/fluid/tests/test_multihead_attention.py b/python/paddle/v2/fluid/tests/unittests/test_multihead_attention.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_multihead_attention.py rename to python/paddle/v2/fluid/tests/unittests/test_multihead_attention.py diff --git a/python/paddle/v2/fluid/tests/test_multiplex_op.py b/python/paddle/v2/fluid/tests/unittests/test_multiplex_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_multiplex_op.py rename to python/paddle/v2/fluid/tests/unittests/test_multiplex_op.py diff --git a/python/paddle/v2/fluid/tests/test_nce.py b/python/paddle/v2/fluid/tests/unittests/test_nce.py similarity index 97% rename from python/paddle/v2/fluid/tests/test_nce.py rename to python/paddle/v2/fluid/tests/unittests/test_nce.py index 068081972..76ecc8ba0 100644 --- a/python/paddle/v2/fluid/tests/test_nce.py +++ b/python/paddle/v2/fluid/tests/unittests/test_nce.py @@ -109,6 +109,4 @@ class TestNCECase1(TestNCE): if __name__ == '__main__': - # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/7778 - exit(0) unittest.main() diff --git a/python/paddle/v2/fluid/tests/test_net.py b/python/paddle/v2/fluid/tests/unittests/test_net.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_net.py rename to python/paddle/v2/fluid/tests/unittests/test_net.py diff --git a/python/paddle/v2/fluid/tests/test_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_norm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_norm_op.py diff --git a/python/paddle/v2/fluid/tests/test_normalization_wrapper.py b/python/paddle/v2/fluid/tests/unittests/test_normalization_wrapper.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_normalization_wrapper.py rename to python/paddle/v2/fluid/tests/unittests/test_normalization_wrapper.py diff --git a/python/paddle/v2/fluid/tests/test_one_hot_op.py b/python/paddle/v2/fluid/tests/unittests/test_one_hot_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_one_hot_op.py rename to python/paddle/v2/fluid/tests/unittests/test_one_hot_op.py diff --git a/python/paddle/v2/fluid/tests/test_op_support_gpu.py b/python/paddle/v2/fluid/tests/unittests/test_op_support_gpu.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_op_support_gpu.py rename to python/paddle/v2/fluid/tests/unittests/test_op_support_gpu.py diff --git a/python/paddle/v2/fluid/tests/test_operator.py b/python/paddle/v2/fluid/tests/unittests/test_operator.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_operator.py rename to python/paddle/v2/fluid/tests/unittests/test_operator.py diff --git a/python/paddle/v2/fluid/tests/test_operator_desc.py b/python/paddle/v2/fluid/tests/unittests/test_operator_desc.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_operator_desc.py rename to python/paddle/v2/fluid/tests/unittests/test_operator_desc.py diff --git a/python/paddle/v2/fluid/tests/test_optimizer.py b/python/paddle/v2/fluid/tests/unittests/test_optimizer.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_optimizer.py rename to python/paddle/v2/fluid/tests/unittests/test_optimizer.py diff --git a/python/paddle/v2/fluid/tests/test_pad_op.py b/python/paddle/v2/fluid/tests/unittests/test_pad_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_pad_op.py rename to python/paddle/v2/fluid/tests/unittests/test_pad_op.py diff --git a/python/paddle/v2/fluid/tests/test_parallel_op.py b/python/paddle/v2/fluid/tests/unittests/test_parallel_op.py similarity index 96% rename from python/paddle/v2/fluid/tests/test_parallel_op.py rename to python/paddle/v2/fluid/tests/unittests/test_parallel_op.py index a0fc91f6d..0d377ae70 100644 --- a/python/paddle/v2/fluid/tests/test_parallel_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_parallel_op.py @@ -138,9 +138,10 @@ class BaseParallelForTest(unittest.TestCase): def _impl_(a, b, fetch_id, item_id): item_str = ['CPU', 'ParallelCPU', 'GPU', 'ParallelGPU'] - flag = numpy.allclose(a, b, rtol=0.1) - self.assertTrue(flag, "The {0} are different in {1}".format( - fetch[fetch_id], item_str[item_id])) + flag = numpy.allclose(a, b, rtol=0.1, atol=1e-3) + self.assertTrue(flag, + "The {0} are different in {1}, {2} vs {3}".format( + fetch[fetch_id], item_str[item_id], a, b)) for i, items in enumerate(zip(*args)): self.assertGreater(len(items), 0) diff --git a/python/paddle/v2/fluid/tests/test_parameter.py b/python/paddle/v2/fluid/tests/unittests/test_parameter.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_parameter.py rename to python/paddle/v2/fluid/tests/unittests/test_parameter.py diff --git a/python/paddle/v2/fluid/tests/test_pool2d_op.py b/python/paddle/v2/fluid/tests/unittests/test_pool2d_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_pool2d_op.py rename to python/paddle/v2/fluid/tests/unittests/test_pool2d_op.py diff --git a/python/paddle/v2/fluid/tests/test_pool3d_op.py b/python/paddle/v2/fluid/tests/unittests/test_pool3d_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_pool3d_op.py rename to python/paddle/v2/fluid/tests/unittests/test_pool3d_op.py diff --git a/python/paddle/v2/fluid/tests/test_pool_max_op.py b/python/paddle/v2/fluid/tests/unittests/test_pool_max_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_pool_max_op.py rename to python/paddle/v2/fluid/tests/unittests/test_pool_max_op.py diff --git a/python/paddle/v2/fluid/tests/test_positive_negative_pair_op.py b/python/paddle/v2/fluid/tests/unittests/test_positive_negative_pair_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_positive_negative_pair_op.py rename to python/paddle/v2/fluid/tests/unittests/test_positive_negative_pair_op.py diff --git a/python/paddle/v2/fluid/tests/test_precision_recall_op.py b/python/paddle/v2/fluid/tests/unittests/test_precision_recall_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_precision_recall_op.py rename to python/paddle/v2/fluid/tests/unittests/test_precision_recall_op.py diff --git a/python/paddle/v2/fluid/tests/test_prelu_op.py b/python/paddle/v2/fluid/tests/unittests/test_prelu_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_prelu_op.py rename to python/paddle/v2/fluid/tests/unittests/test_prelu_op.py diff --git a/python/paddle/v2/fluid/tests/test_print_op.py b/python/paddle/v2/fluid/tests/unittests/test_print_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_print_op.py rename to python/paddle/v2/fluid/tests/unittests/test_print_op.py diff --git a/python/paddle/v2/fluid/tests/test_prior_box_op.py b/python/paddle/v2/fluid/tests/unittests/test_prior_box_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_prior_box_op.py rename to python/paddle/v2/fluid/tests/unittests/test_prior_box_op.py diff --git a/python/paddle/v2/fluid/tests/test_profiler.py b/python/paddle/v2/fluid/tests/unittests/test_profiler.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_profiler.py rename to python/paddle/v2/fluid/tests/unittests/test_profiler.py diff --git a/python/paddle/v2/fluid/tests/test_program.py b/python/paddle/v2/fluid/tests/unittests/test_program.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_program.py rename to python/paddle/v2/fluid/tests/unittests/test_program.py diff --git a/python/paddle/v2/fluid/tests/test_protobuf.py b/python/paddle/v2/fluid/tests/unittests/test_protobuf.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_protobuf.py rename to python/paddle/v2/fluid/tests/unittests/test_protobuf.py diff --git a/python/paddle/v2/fluid/tests/test_protobuf_descs.py b/python/paddle/v2/fluid/tests/unittests/test_protobuf_descs.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_protobuf_descs.py rename to python/paddle/v2/fluid/tests/unittests/test_protobuf_descs.py diff --git a/python/paddle/v2/fluid/tests/test_proximal_adagrad_op.py b/python/paddle/v2/fluid/tests/unittests/test_proximal_adagrad_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_proximal_adagrad_op.py rename to python/paddle/v2/fluid/tests/unittests/test_proximal_adagrad_op.py diff --git a/python/paddle/v2/fluid/tests/test_proximal_gd_op.py b/python/paddle/v2/fluid/tests/unittests/test_proximal_gd_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_proximal_gd_op.py rename to python/paddle/v2/fluid/tests/unittests/test_proximal_gd_op.py diff --git a/python/paddle/v2/fluid/tests/test_rank_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_rank_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_rank_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_rank_loss_op.py diff --git a/python/paddle/v2/fluid/tests/test_recurrent_op.py b/python/paddle/v2/fluid/tests/unittests/test_recurrent_op.py similarity index 99% rename from python/paddle/v2/fluid/tests/test_recurrent_op.py rename to python/paddle/v2/fluid/tests/unittests/test_recurrent_op.py index e540ca43b..177d8fc65 100644 --- a/python/paddle/v2/fluid/tests/test_recurrent_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_recurrent_op.py @@ -468,6 +468,4 @@ class RecurrentOpNoMemBootTest(RecurrentOpTest1): if __name__ == '__main__': - # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/6152 - exit(0) unittest.main() diff --git a/python/paddle/v2/fluid/tests/test_recv_op.py b/python/paddle/v2/fluid/tests/unittests/test_recv_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_recv_op.py rename to python/paddle/v2/fluid/tests/unittests/test_recv_op.py diff --git a/python/paddle/v2/fluid/tests/test_reduce_op.py b/python/paddle/v2/fluid/tests/unittests/test_reduce_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_reduce_op.py rename to python/paddle/v2/fluid/tests/unittests/test_reduce_op.py diff --git a/python/paddle/v2/fluid/tests/test_registry.py b/python/paddle/v2/fluid/tests/unittests/test_registry.py similarity index 94% rename from python/paddle/v2/fluid/tests/test_registry.py rename to python/paddle/v2/fluid/tests/unittests/test_registry.py index bf4dc6418..82527a6ec 100644 --- a/python/paddle/v2/fluid/tests/test_registry.py +++ b/python/paddle/v2/fluid/tests/unittests/test_registry.py @@ -28,4 +28,4 @@ class TestRegistry(unittest.TestCase): exe = fluid.Executor(place) X = np.random.random((10, 10)).astype("float32") mean_out = exe.run(feed={"X": X}, fetch_list=[output]) - self.assertAlmostEqual(np.mean(X), mean_out[0]) + self.assertAlmostEqual(np.mean(X), mean_out[0], delta=1e-5) diff --git a/python/paddle/v2/fluid/tests/test_regularizer.py b/python/paddle/v2/fluid/tests/unittests/test_regularizer.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_regularizer.py rename to python/paddle/v2/fluid/tests/unittests/test_regularizer.py diff --git a/python/paddle/v2/fluid/tests/test_reorder_lod_tensor.py b/python/paddle/v2/fluid/tests/unittests/test_reorder_lod_tensor.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_reorder_lod_tensor.py rename to python/paddle/v2/fluid/tests/unittests/test_reorder_lod_tensor.py diff --git a/python/paddle/v2/fluid/tests/test_reshape_op.py b/python/paddle/v2/fluid/tests/unittests/test_reshape_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_reshape_op.py rename to python/paddle/v2/fluid/tests/unittests/test_reshape_op.py diff --git a/python/paddle/v2/fluid/tests/test_rmsprop_op.py b/python/paddle/v2/fluid/tests/unittests/test_rmsprop_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_rmsprop_op.py rename to python/paddle/v2/fluid/tests/unittests/test_rmsprop_op.py diff --git a/python/paddle/v2/fluid/tests/test_rnn_memory_helper_op.py b/python/paddle/v2/fluid/tests/unittests/test_rnn_memory_helper_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_rnn_memory_helper_op.py rename to python/paddle/v2/fluid/tests/unittests/test_rnn_memory_helper_op.py diff --git a/python/paddle/v2/fluid/tests/test_roi_pool_op.py b/python/paddle/v2/fluid/tests/unittests/test_roi_pool_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_roi_pool_op.py rename to python/paddle/v2/fluid/tests/unittests/test_roi_pool_op.py diff --git a/python/paddle/v2/fluid/tests/test_row_conv_op.py b/python/paddle/v2/fluid/tests/unittests/test_row_conv_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_row_conv_op.py rename to python/paddle/v2/fluid/tests/unittests/test_row_conv_op.py diff --git a/python/paddle/v2/fluid/tests/test_scale_op.py b/python/paddle/v2/fluid/tests/unittests/test_scale_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_scale_op.py rename to python/paddle/v2/fluid/tests/unittests/test_scale_op.py diff --git a/python/paddle/v2/fluid/tests/test_scatter_op.py b/python/paddle/v2/fluid/tests/unittests/test_scatter_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_scatter_op.py rename to python/paddle/v2/fluid/tests/unittests/test_scatter_op.py diff --git a/python/paddle/v2/fluid/tests/test_scope.py b/python/paddle/v2/fluid/tests/unittests/test_scope.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_scope.py rename to python/paddle/v2/fluid/tests/unittests/test_scope.py diff --git a/python/paddle/v2/fluid/tests/test_selected_rows.py b/python/paddle/v2/fluid/tests/unittests/test_selected_rows.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_selected_rows.py rename to python/paddle/v2/fluid/tests/unittests/test_selected_rows.py diff --git a/python/paddle/v2/fluid/tests/test_seq_concat_op.py b/python/paddle/v2/fluid/tests/unittests/test_seq_concat_op.py similarity index 99% rename from python/paddle/v2/fluid/tests/test_seq_concat_op.py rename to python/paddle/v2/fluid/tests/unittests/test_seq_concat_op.py index 1c9b61d8f..10592d127 100644 --- a/python/paddle/v2/fluid/tests/test_seq_concat_op.py +++ b/python/paddle/v2/fluid/tests/unittests/test_seq_concat_op.py @@ -16,7 +16,6 @@ import unittest import numpy as np import sys from op_test import OpTest -exit(0) def to_abs_lod(lod): diff --git a/python/paddle/v2/fluid/tests/test_seq_conv.py b/python/paddle/v2/fluid/tests/unittests/test_seq_conv.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_seq_conv.py rename to python/paddle/v2/fluid/tests/unittests/test_seq_conv.py diff --git a/python/paddle/v2/fluid/tests/test_seq_pool.py b/python/paddle/v2/fluid/tests/unittests/test_seq_pool.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_seq_pool.py rename to python/paddle/v2/fluid/tests/unittests/test_seq_pool.py diff --git a/python/paddle/v2/fluid/tests/test_sequence_erase_op.py b/python/paddle/v2/fluid/tests/unittests/test_sequence_erase_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sequence_erase_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sequence_erase_op.py diff --git a/python/paddle/v2/fluid/tests/test_sequence_expand.py b/python/paddle/v2/fluid/tests/unittests/test_sequence_expand.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sequence_expand.py rename to python/paddle/v2/fluid/tests/unittests/test_sequence_expand.py diff --git a/python/paddle/v2/fluid/tests/test_sequence_reshape.py b/python/paddle/v2/fluid/tests/unittests/test_sequence_reshape.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sequence_reshape.py rename to python/paddle/v2/fluid/tests/unittests/test_sequence_reshape.py diff --git a/python/paddle/v2/fluid/tests/test_sequence_slice_op.py b/python/paddle/v2/fluid/tests/unittests/test_sequence_slice_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sequence_slice_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sequence_slice_op.py diff --git a/python/paddle/v2/fluid/tests/test_sequence_softmax_op.py b/python/paddle/v2/fluid/tests/unittests/test_sequence_softmax_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sequence_softmax_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sequence_softmax_op.py diff --git a/python/paddle/v2/fluid/tests/test_sgd_op.py b/python/paddle/v2/fluid/tests/unittests/test_sgd_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sgd_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sgd_op.py diff --git a/python/paddle/v2/fluid/tests/test_shrink_rnn_memory.py b/python/paddle/v2/fluid/tests/unittests/test_shrink_rnn_memory.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_shrink_rnn_memory.py rename to python/paddle/v2/fluid/tests/unittests/test_shrink_rnn_memory.py diff --git a/python/paddle/v2/fluid/tests/test_sigmoid_cross_entropy_with_logits_op.py b/python/paddle/v2/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sigmoid_cross_entropy_with_logits_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py diff --git a/python/paddle/v2/fluid/tests/test_sign_op.py b/python/paddle/v2/fluid/tests/unittests/test_sign_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sign_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sign_op.py diff --git a/python/paddle/v2/fluid/tests/test_smooth_l1_loss_op.py b/python/paddle/v2/fluid/tests/unittests/test_smooth_l1_loss_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_smooth_l1_loss_op.py rename to python/paddle/v2/fluid/tests/unittests/test_smooth_l1_loss_op.py diff --git a/python/paddle/v2/fluid/tests/test_softmax_op.py b/python/paddle/v2/fluid/tests/unittests/test_softmax_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_softmax_op.py rename to python/paddle/v2/fluid/tests/unittests/test_softmax_op.py diff --git a/python/paddle/v2/fluid/tests/test_softmax_with_cross_entropy_op.py b/python/paddle/v2/fluid/tests/unittests/test_softmax_with_cross_entropy_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_softmax_with_cross_entropy_op.py rename to python/paddle/v2/fluid/tests/unittests/test_softmax_with_cross_entropy_op.py diff --git a/python/paddle/v2/fluid/tests/test_split_and_merge_lod_tensor_op.py b/python/paddle/v2/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_split_and_merge_lod_tensor_op.py rename to python/paddle/v2/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py diff --git a/python/paddle/v2/fluid/tests/test_split_op.py b/python/paddle/v2/fluid/tests/unittests/test_split_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_split_op.py rename to python/paddle/v2/fluid/tests/unittests/test_split_op.py diff --git a/python/paddle/v2/fluid/tests/test_split_selected_rows_op.py b/python/paddle/v2/fluid/tests/unittests/test_split_selected_rows_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_split_selected_rows_op.py rename to python/paddle/v2/fluid/tests/unittests/test_split_selected_rows_op.py diff --git a/python/paddle/v2/fluid/tests/book_distribute/test_split_var.py b/python/paddle/v2/fluid/tests/unittests/test_split_var.py similarity index 100% rename from python/paddle/v2/fluid/tests/book_distribute/test_split_var.py rename to python/paddle/v2/fluid/tests/unittests/test_split_var.py diff --git a/python/paddle/v2/fluid/tests/test_spp_op.py b/python/paddle/v2/fluid/tests/unittests/test_spp_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_spp_op.py rename to python/paddle/v2/fluid/tests/unittests/test_spp_op.py diff --git a/python/paddle/v2/fluid/tests/test_squared_l2_distance_op.py b/python/paddle/v2/fluid/tests/unittests/test_squared_l2_distance_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_squared_l2_distance_op.py rename to python/paddle/v2/fluid/tests/unittests/test_squared_l2_distance_op.py diff --git a/python/paddle/v2/fluid/tests/test_squared_l2_norm_op.py b/python/paddle/v2/fluid/tests/unittests/test_squared_l2_norm_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_squared_l2_norm_op.py rename to python/paddle/v2/fluid/tests/unittests/test_squared_l2_norm_op.py diff --git a/python/paddle/v2/fluid/tests/test_sum_op.py b/python/paddle/v2/fluid/tests/unittests/test_sum_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_sum_op.py rename to python/paddle/v2/fluid/tests/unittests/test_sum_op.py diff --git a/python/paddle/v2/fluid/tests/test_switch.py b/python/paddle/v2/fluid/tests/unittests/test_switch.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_switch.py rename to python/paddle/v2/fluid/tests/unittests/test_switch.py diff --git a/python/paddle/v2/fluid/tests/test_target_assign_op.py b/python/paddle/v2/fluid/tests/unittests/test_target_assign_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_target_assign_op.py rename to python/paddle/v2/fluid/tests/unittests/test_target_assign_op.py diff --git a/python/paddle/v2/fluid/tests/test_tensor.py b/python/paddle/v2/fluid/tests/unittests/test_tensor.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_tensor.py rename to python/paddle/v2/fluid/tests/unittests/test_tensor.py diff --git a/python/paddle/v2/fluid/tests/test_top_k_op.py b/python/paddle/v2/fluid/tests/unittests/test_top_k_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_top_k_op.py rename to python/paddle/v2/fluid/tests/unittests/test_top_k_op.py diff --git a/python/paddle/v2/fluid/tests/test_transpose_op.py b/python/paddle/v2/fluid/tests/unittests/test_transpose_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_transpose_op.py rename to python/paddle/v2/fluid/tests/unittests/test_transpose_op.py diff --git a/python/paddle/v2/fluid/tests/test_uniform_random_op.py b/python/paddle/v2/fluid/tests/unittests/test_uniform_random_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_uniform_random_op.py rename to python/paddle/v2/fluid/tests/unittests/test_uniform_random_op.py diff --git a/python/paddle/v2/fluid/tests/test_unpool_op.py b/python/paddle/v2/fluid/tests/unittests/test_unpool_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_unpool_op.py rename to python/paddle/v2/fluid/tests/unittests/test_unpool_op.py diff --git a/python/paddle/v2/fluid/tests/test_variable.py b/python/paddle/v2/fluid/tests/unittests/test_variable.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_variable.py rename to python/paddle/v2/fluid/tests/unittests/test_variable.py diff --git a/python/paddle/v2/fluid/tests/test_warpctc_op.py b/python/paddle/v2/fluid/tests/unittests/test_warpctc_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_warpctc_op.py rename to python/paddle/v2/fluid/tests/unittests/test_warpctc_op.py diff --git a/python/paddle/v2/fluid/tests/test_weight_normalization.py b/python/paddle/v2/fluid/tests/unittests/test_weight_normalization.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_weight_normalization.py rename to python/paddle/v2/fluid/tests/unittests/test_weight_normalization.py diff --git a/python/paddle/v2/fluid/tests/test_while_op.py b/python/paddle/v2/fluid/tests/unittests/test_while_op.py similarity index 100% rename from python/paddle/v2/fluid/tests/test_while_op.py rename to python/paddle/v2/fluid/tests/unittests/test_while_op.py -- GitLab