From 45d98894673d11728ede82677c22fc7795c16d24 Mon Sep 17 00:00:00 2001 From: chenzhiyang <1792266893@qq.com> Date: Tue, 12 Sep 2023 07:18:39 +0000 Subject: [PATCH 1/4] change eager_op_test to op_test & delete new IR log --- paddle/scripts/paddle_build.sh | 2 +- test/distribution/test_dirichlet_op.py | 6 +----- test/fft/test_spectral_op.py | 2 +- test/ir/test_ir_subgraph_python_interface.py | 2 +- test/legacy_test/benchmark.py | 2 +- test/legacy_test/c_embedding_op_base.py | 2 +- test/legacy_test/{eager_op_test.py => op_test.py} | 5 ----- test/legacy_test/test_accuracy_op.py | 6 +++++- test/legacy_test/test_activation_op.py | 2 +- test/legacy_test/test_adadelta_op.py | 2 +- test/legacy_test/test_adagrad_op.py | 2 +- test/legacy_test/test_adam_op.py | 2 +- test/legacy_test/test_adamax_op.py | 2 +- test/legacy_test/test_adamw_op.py | 2 +- test/legacy_test/test_adaptive_max_pool1d.py | 2 +- test/legacy_test/test_adaptive_max_pool2d.py | 2 +- test/legacy_test/test_adaptive_max_pool3d.py | 2 +- test/legacy_test/test_add_position_encoding_op.py | 2 +- test/legacy_test/test_addmm_op.py | 2 +- test/legacy_test/test_affine_channel_op.py | 2 +- test/legacy_test/test_affine_grid_op.py | 2 +- test/legacy_test/test_allclose_op.py | 2 +- .../test_amp_check_finite_and_scale_op.py | 2 +- test/legacy_test/test_anchor_generator_op.py | 2 +- test/legacy_test/test_angle_op.py | 2 +- test/legacy_test/test_arange.py | 2 +- test/legacy_test/test_arg_min_max_op.py | 2 +- test/legacy_test/test_arg_min_max_v2_op.py | 2 +- test/legacy_test/test_argsort_op.py | 2 +- test/legacy_test/test_assign_op.py | 13 ++++++++----- test/legacy_test/test_assign_pos_op.py | 4 ++-- test/legacy_test/test_assign_value_op.py | 10 +++++----- test/legacy_test/test_atan2_op.py | 2 +- test/legacy_test/test_attention_lstm_op.py | 2 +- test/legacy_test/test_auc_op.py | 2 +- test/legacy_test/test_auc_single_pred_op.py | 2 +- test/legacy_test/test_batch_fc_op.py | 2 +- test/legacy_test/test_batch_norm_op.py | 6 +++--- test/legacy_test/test_batch_norm_op_prim_nchw.py | 6 +++--- test/legacy_test/test_batch_norm_op_prim_nhwc.py | 2 +- test/legacy_test/test_bce_loss.py | 2 +- test/legacy_test/test_bernoulli_op.py | 2 +- test/legacy_test/test_bicubic_interp_op.py | 2 +- test/legacy_test/test_bicubic_interp_v2_op.py | 2 +- test/legacy_test/test_bilateral_slice_op.py | 2 +- test/legacy_test/test_bilinear_interp_op.py | 2 +- test/legacy_test/test_bilinear_interp_v2_op.py | 2 +- test/legacy_test/test_bilinear_tensor_product_op.py | 2 +- test/legacy_test/test_bincount_op.py | 2 +- test/legacy_test/test_bipartite_match_op.py | 2 +- test/legacy_test/test_bitwise_op.py | 2 +- test/legacy_test/test_bmm_op.py | 6 +++++- test/legacy_test/test_box_clip_op.py | 2 +- test/legacy_test/test_box_coder_op.py | 2 +- test/legacy_test/test_box_decoder_and_assign_op.py | 2 +- test/legacy_test/test_bpr_loss_op.py | 2 +- test/legacy_test/test_broadcast_error.py | 2 +- test/legacy_test/test_broadcast_tensors_op.py | 2 +- test/legacy_test/test_cast_op.py | 10 +++++----- test/legacy_test/test_center_loss.py | 2 +- test/legacy_test/test_channel_shuffle.py | 2 +- test/legacy_test/test_cholesky_op.py | 2 +- test/legacy_test/test_cholesky_solve_op.py | 2 +- test/legacy_test/test_chunk_eval_op.py | 2 +- test/legacy_test/test_class_center_sample_op.py | 2 +- test/legacy_test/test_clip_by_norm_op.py | 2 +- test/legacy_test/test_clip_op.py | 2 +- test/legacy_test/test_coalesce_tensor_op.py | 2 +- test/legacy_test/test_collect_fpn_proposals_op.py | 2 +- test/legacy_test/test_collective_api_base.py | 6 +++++- test/legacy_test/test_compare_op.py | 10 +++++----- test/legacy_test/test_compare_reduce_op.py | 10 +++++----- test/legacy_test/test_complex_abs.py | 2 +- test/legacy_test/test_complex_op.py | 2 +- test/legacy_test/test_complex_view_op.py | 2 +- test/legacy_test/test_concat_op.py | 6 +++++- test/legacy_test/test_conj_op.py | 3 ++- test/legacy_test/test_conv2d_fusion_op.py | 2 +- test/legacy_test/test_conv2d_op.py | 6 +++++- test/legacy_test/test_conv2d_op_depthwise_conv.py | 3 ++- test/legacy_test/test_conv2d_transpose_op.py | 7 ++++++- test/legacy_test/test_conv3d_op.py | 6 +++--- test/legacy_test/test_conv3d_transpose_op.py | 2 +- test/legacy_test/test_conv_shift_op.py | 2 +- test/legacy_test/test_cos_sim_op.py | 2 +- test/legacy_test/test_crf_decoding_op.py | 2 +- test/legacy_test/test_crop_op.py | 2 +- test/legacy_test/test_crop_tensor_op.py | 2 +- test/legacy_test/test_cross_entropy2_op.py | 2 +- test/legacy_test/test_cross_entropy_op.py | 6 +++++- test/legacy_test/test_cross_op.py | 2 +- test/legacy_test/test_ctc_align.py | 2 +- test/legacy_test/test_cummax_op.py | 2 +- test/legacy_test/test_cummin_op.py | 2 +- test/legacy_test/test_cumprod_op.py | 2 +- test/legacy_test/test_cumsum_op.py | 2 +- test/legacy_test/test_cvm_op.py | 2 +- test/legacy_test/test_data_norm_op.py | 2 +- test/legacy_test/test_decayed_adagrad_op.py | 2 +- test/legacy_test/test_deformable_conv_op.py | 2 +- test/legacy_test/test_deformable_conv_v1_op.py | 2 +- test/legacy_test/test_density_prior_box_op.py | 2 +- test/legacy_test/test_dequantize_abs_max_op.py | 2 +- test/legacy_test/test_dequantize_log_op.py | 2 +- test/legacy_test/test_detection_map_op.py | 2 +- test/legacy_test/test_determinant_op.py | 2 +- test/legacy_test/test_diag.py | 2 +- test/legacy_test/test_diag_embed.py | 2 +- test/legacy_test/test_diag_v2.py | 2 +- test/legacy_test/test_diagonal_op.py | 2 +- test/legacy_test/test_digamma_op.py | 2 +- test/legacy_test/test_dist_op.py | 2 +- .../legacy_test/test_distribute_fpn_proposals_op.py | 2 +- test/legacy_test/test_dot_op.py | 2 +- test/legacy_test/test_dpsgd_op.py | 2 +- test/legacy_test/test_dropout_nd_op.py | 2 +- test/legacy_test/test_dropout_op.py | 6 +++++- test/legacy_test/test_edit_distance_op.py | 2 +- test/legacy_test/test_eig_op.py | 2 +- test/legacy_test/test_eigh_op.py | 2 +- test/legacy_test/test_eigvals_op.py | 2 +- test/legacy_test/test_eigvalsh_op.py | 2 +- test/legacy_test/test_einsum_op.py | 2 +- test/legacy_test/test_einsum_v2.py | 2 +- test/legacy_test/test_elementwise_add_op.py | 6 +++++- test/legacy_test/test_elementwise_div_op.py | 6 +++++- test/legacy_test/test_elementwise_floordiv_op.py | 2 +- test/legacy_test/test_elementwise_heaviside_op.py | 2 +- test/legacy_test/test_elementwise_max_op.py | 6 +++++- test/legacy_test/test_elementwise_min_op.py | 6 +++++- test/legacy_test/test_elementwise_mod_op.py | 6 +++--- test/legacy_test/test_elementwise_mul_op.py | 6 +++++- test/legacy_test/test_elementwise_pow_op.py | 6 +++++- test/legacy_test/test_elementwise_sub_op.py | 6 +++++- test/legacy_test/test_empty_like_op.py | 2 +- test/legacy_test/test_empty_op.py | 2 +- test/legacy_test/test_erf_op.py | 2 +- test/legacy_test/test_erfinv_op.py | 6 +++--- .../test_executor_return_tensor_not_overwriting.py | 2 +- test/legacy_test/test_expand_as_op.py | 2 +- test/legacy_test/test_expand_as_v2_op.py | 2 +- test/legacy_test/test_expand_op.py | 2 +- test/legacy_test/test_expand_v2_op.py | 2 +- test/legacy_test/test_exponential_op.py | 6 +++--- test/legacy_test/test_eye_op.py | 2 +- test/legacy_test/test_fake_dequantize_op.py | 2 +- test/legacy_test/test_fake_quantize_op.py | 2 +- test/legacy_test/test_fc_op.py | 2 +- test/legacy_test/test_fill_any_like_op.py | 2 +- test/legacy_test/test_fill_any_op.py | 2 +- test/legacy_test/test_fill_constant_op.py | 2 +- test/legacy_test/test_fill_diagonal_tensor_op.py | 2 +- test/legacy_test/test_fill_op.py | 2 +- test/legacy_test/test_fill_zeros_like2_op.py | 2 +- test/legacy_test/test_fill_zeros_like_op.py | 2 +- test/legacy_test/test_filter_by_instag_op.py | 2 +- test/legacy_test/test_flatten2_op.py | 2 +- .../legacy_test/test_flatten_contiguous_range_op.py | 2 +- test/legacy_test/test_flatten_op.py | 2 +- test/legacy_test/test_flip.py | 2 +- test/legacy_test/test_fmax_op.py | 2 +- test/legacy_test/test_fmin_op.py | 2 +- test/legacy_test/test_fold_op.py | 2 +- test/legacy_test/test_frame_op.py | 2 +- test/legacy_test/test_fsp_op.py | 2 +- test/legacy_test/test_ftrl_op.py | 2 +- test/legacy_test/test_full_like_op.py | 2 +- test/legacy_test/test_fused_adam_op.py | 2 +- test/legacy_test/test_fused_attention_op.py | 2 +- test/legacy_test/test_fused_bias_act_op.py | 2 +- ...est_fused_bias_dropout_residual_layer_norm_op.py | 2 +- test/legacy_test/test_fused_ec_moe_op.py | 2 +- .../test_fused_elemwise_activation_op.py | 2 +- test/legacy_test/test_fused_emb_seq_pool_op.py | 6 +++++- test/legacy_test/test_fused_embedding_fc_lstm_op.py | 2 +- .../test_fused_fc_elementwise_layernorm_op.py | 2 +- test/legacy_test/test_fused_feedforward_op.py | 2 +- test/legacy_test/test_fused_gate_attention_op.py | 6 +++--- .../legacy_test/test_fused_gemm_epilogue_grad_op.py | 2 +- test/legacy_test/test_fused_gemm_epilogue_op.py | 6 +++++- test/legacy_test/test_fused_multi_transformer_op.py | 2 +- test/legacy_test/test_fused_multihead_matmul_op.py | 2 +- .../test_fused_scale_bias_relu_conv_bnstats_op.py | 2 +- test/legacy_test/test_fused_token_prune_op.py | 2 +- test/legacy_test/test_fusion_gru_op.py | 2 +- test/legacy_test/test_fusion_lstm_op.py | 2 +- test/legacy_test/test_fusion_repeated_fc_relu_op.py | 2 +- .../test_fusion_seqconv_eltadd_relu_op.py | 2 +- .../test_fusion_seqexpand_concat_fc_op.py | 2 +- test/legacy_test/test_fusion_seqpool_concat_op.py | 2 +- .../test_fusion_seqpool_cvm_concat_op.py | 2 +- test/legacy_test/test_fusion_squared_mat_sub_op.py | 2 +- .../test_fusion_transpose_flatten_concat_op.py | 2 +- test/legacy_test/test_gather_nd_op.py | 6 +++--- test/legacy_test/test_gather_op.py | 2 +- test/legacy_test/test_gather_tree_op.py | 2 +- test/legacy_test/test_gaussian_random_op.py | 6 +++++- .../legacy_test/test_generate_proposal_labels_op.py | 2 +- test/legacy_test/test_generate_proposals_op.py | 2 +- test/legacy_test/test_generate_proposals_v2_op.py | 2 +- test/legacy_test/test_graph_send_recv_op.py | 2 +- test/legacy_test/test_graph_send_ue_recv_op.py | 2 +- test/legacy_test/test_graph_send_uv_op.py | 2 +- test/legacy_test/test_grid_sampler_op.py | 2 +- test/legacy_test/test_group_norm_op.py | 8 ++++---- test/legacy_test/test_gru_op.py | 2 +- test/legacy_test/test_gru_rnn_op.py | 2 +- test/legacy_test/test_gru_unit_op.py | 2 +- test/legacy_test/test_gumbel_softmax_op.py | 2 +- test/legacy_test/test_hash_op.py | 2 +- test/legacy_test/test_hinge_loss_op.py | 2 +- test/legacy_test/test_histogram_op.py | 2 +- test/legacy_test/test_hsigmoid_op.py | 2 +- test/legacy_test/test_huber_loss_op.py | 2 +- test/legacy_test/test_i0_op.py | 2 +- test/legacy_test/test_i0e_op.py | 2 +- test/legacy_test/test_i1_op.py | 2 +- test/legacy_test/test_i1e_op.py | 2 +- test/legacy_test/test_identity_loss_op.py | 2 +- test/legacy_test/test_im2sequence_op.py | 2 +- test/legacy_test/test_index_add_op.py | 2 +- test/legacy_test/test_index_sample_op.py | 2 +- test/legacy_test/test_index_select_op.py | 2 +- test/legacy_test/test_instance_norm_op.py | 2 +- test/legacy_test/test_instance_norm_op_v2.py | 2 +- test/legacy_test/test_inverse_op.py | 2 +- test/legacy_test/test_iou_similarity_op.py | 2 +- test/legacy_test/test_is_empty_op.py | 2 +- test/legacy_test/test_isclose_op.py | 2 +- test/legacy_test/test_isfinite_op.py | 2 +- test/legacy_test/test_kldiv_loss_op.py | 2 +- test/legacy_test/test_kron_op.py | 2 +- test/legacy_test/test_kthvalue_op.py | 2 +- test/legacy_test/test_l1_norm_op.py | 2 +- test/legacy_test/test_label_smooth_op.py | 2 +- test/legacy_test/test_lamb_op.py | 2 +- test/legacy_test/test_layer_norm_op.py | 6 +++--- test/legacy_test/test_lerp_op.py | 2 +- test/legacy_test/test_lgamma_op.py | 2 +- test/legacy_test/test_linear_chain_crf_op.py | 2 +- test/legacy_test/test_linear_interp_op.py | 2 +- test/legacy_test/test_linear_interp_v2_op.py | 6 +++++- test/legacy_test/test_linspace.py | 6 +++++- test/legacy_test/test_locality_aware_nms_op.py | 2 +- test/legacy_test/test_lod_reset_op.py | 2 +- test/legacy_test/test_log_loss_op.py | 2 +- test/legacy_test/test_log_softmax.py | 2 +- test/legacy_test/test_logcumsumexp_op.py | 8 ++++---- test/legacy_test/test_logical_op.py | 2 +- test/legacy_test/test_logit_op.py | 2 +- test/legacy_test/test_logspace.py | 2 +- test/legacy_test/test_logsumexp.py | 2 +- test/legacy_test/test_lookup_table_bf16_op.py | 6 +++--- test/legacy_test/test_lookup_table_dequant_op.py | 2 +- test/legacy_test/test_lookup_table_op.py | 6 +++--- test/legacy_test/test_lookup_table_v2_bf16_op.py | 2 +- test/legacy_test/test_lookup_table_v2_op.py | 6 +++++- test/legacy_test/test_lrn_op.py | 2 +- test/legacy_test/test_lstm_cudnn_op.py | 2 +- test/legacy_test/test_lstm_op.py | 2 +- test/legacy_test/test_lstm_unit_op.py | 2 +- test/legacy_test/test_lu_op.py | 2 +- test/legacy_test/test_lu_unpack_op.py | 2 +- test/legacy_test/test_margin_cross_entropy_op.py | 6 +++++- test/legacy_test/test_margin_rank_loss_op.py | 2 +- test/legacy_test/test_marker_op.py | 3 +-- test/legacy_test/test_masked_select_op.py | 2 +- test/legacy_test/test_match_matrix_tensor_op.py | 2 +- test/legacy_test/test_matmul_op.py | 2 +- test/legacy_test/test_matmul_op_with_head.py | 2 +- test/legacy_test/test_matmul_v2_op.py | 6 +++++- test/legacy_test/test_matrix_nms_op.py | 2 +- test/legacy_test/test_matrix_power_op.py | 2 +- test/legacy_test/test_matrix_rank_op.py | 2 +- test/legacy_test/test_max_op.py | 2 +- test/legacy_test/test_maxout_op.py | 2 +- test/legacy_test/test_mean_iou.py | 2 +- test/legacy_test/test_mean_op.py | 2 +- test/legacy_test/test_meshgrid_op.py | 2 +- test/legacy_test/test_min_op.py | 2 +- test/legacy_test/test_mine_hard_examples_op.py | 2 +- test/legacy_test/test_minus_op.py | 2 +- test/legacy_test/test_mode_op.py | 6 +++--- test/legacy_test/test_modified_huber_loss_op.py | 2 +- test/legacy_test/test_momentum_op.py | 2 +- test/legacy_test/test_mul_op.py | 2 +- test/legacy_test/test_multi_dot_op.py | 2 +- test/legacy_test/test_multiclass_nms_op.py | 2 +- test/legacy_test/test_multinomial_op.py | 2 +- test/legacy_test/test_multiplex_op.py | 2 +- test/legacy_test/test_mv_op.py | 2 +- test/legacy_test/test_nan_to_num_op.py | 2 +- test/legacy_test/test_nanmedian.py | 2 +- test/legacy_test/test_nce.py | 2 +- test/legacy_test/test_nearest_interp_op.py | 2 +- test/legacy_test/test_nearest_interp_v2_op.py | 2 +- test/legacy_test/test_nextafter_op.py | 2 +- test/legacy_test/test_nll_loss.py | 2 +- test/legacy_test/test_nms_op.py | 2 +- test/legacy_test/test_nn_functional_hot_op.py | 2 +- test/legacy_test/test_nonzero_api.py | 2 +- test/legacy_test/test_norm_all.py | 2 +- test/legacy_test/test_norm_op.py | 6 +++++- test/legacy_test/test_number_count_op.py | 4 ++-- test/legacy_test/test_numel_op.py | 2 +- test/legacy_test/test_one_hot_v2_op.py | 2 +- test/legacy_test/test_overlap_add_op.py | 2 +- test/legacy_test/test_pad2d_op.py | 2 +- test/legacy_test/test_pad3d_op.py | 2 +- test/legacy_test/test_pad_constant_like.py | 2 +- test/legacy_test/test_pad_op.py | 2 +- test/legacy_test/test_partial_concat_op.py | 2 +- test/legacy_test/test_partial_sum_op.py | 2 +- test/legacy_test/test_pixel_shuffle_op.py | 2 +- test/legacy_test/test_pixel_unshuffle.py | 2 +- test/legacy_test/test_poisson_op.py | 6 +++--- test/legacy_test/test_polygamma_op.py | 2 +- test/legacy_test/test_polygon_box_transform.py | 2 +- test/legacy_test/test_pool2d_op.py | 2 +- test/legacy_test/test_pool3d_op.py | 2 +- test/legacy_test/test_pool_max_op.py | 6 +++--- test/legacy_test/test_positive_negative_pair_op.py | 2 +- test/legacy_test/test_precision_recall_op.py | 2 +- test/legacy_test/test_prelu_op.py | 6 +++++- test/legacy_test/test_prior_box_op.py | 2 +- test/legacy_test/test_proximal_adagrad_op.py | 2 +- test/legacy_test/test_proximal_gd_op.py | 2 +- test/legacy_test/test_psroi_pool_op.py | 2 +- test/legacy_test/test_put_along_axis_op.py | 2 +- test/legacy_test/test_qr_op.py | 2 +- test/legacy_test/test_randint_op.py | 2 +- test/legacy_test/test_random_crop_op.py | 2 +- test/legacy_test/test_randperm_op.py | 6 +++--- test/legacy_test/test_range.py | 2 +- test/legacy_test/test_rank_attention_op.py | 2 +- test/legacy_test/test_rank_loss_op.py | 2 +- test/legacy_test/test_real_imag_op.py | 2 +- test/legacy_test/test_reduce_op.py | 6 +++++- test/legacy_test/test_repeat_interleave_op.py | 2 +- test/legacy_test/test_reshape_op.py | 2 +- test/legacy_test/test_retinanet_detection_output.py | 2 +- test/legacy_test/test_reverse_op.py | 2 +- test/legacy_test/test_rnn_op.py | 2 +- test/legacy_test/test_roi_align_op.py | 2 +- test/legacy_test/test_roi_pool_op.py | 2 +- test/legacy_test/test_roll_op.py | 2 +- test/legacy_test/test_row_conv_op.py | 2 +- test/legacy_test/test_rpn_target_assign_op.py | 2 +- test/legacy_test/test_rrelu_op.py | 2 +- test/legacy_test/test_sample_logits_op.py | 2 +- test/legacy_test/test_scale_op.py | 2 +- test/legacy_test/test_scatter_nd_op.py | 2 +- test/legacy_test/test_scatter_op.py | 2 +- test/legacy_test/test_searchsorted_op.py | 2 +- test/legacy_test/test_seed_op.py | 2 +- test/legacy_test/test_segment_ops.py | 2 +- test/legacy_test/test_selu_op.py | 2 +- test/legacy_test/test_set_value_op.py | 2 +- test/legacy_test/test_sgd_op.py | 2 +- test/legacy_test/test_sgd_op_bf16.py | 6 +++--- test/legacy_test/test_shape_op.py | 2 +- test/legacy_test/test_shard_index_op.py | 2 +- test/legacy_test/test_share_data_op.py | 2 +- test/legacy_test/test_shuffle_batch_op.py | 2 +- test/legacy_test/test_shuffle_channel_op.py | 2 +- .../test_sigmoid_cross_entropy_with_logits_op.py | 2 +- test/legacy_test/test_sigmoid_focal_loss_op.py | 2 +- test/legacy_test/test_sign_op.py | 2 +- test/legacy_test/test_similarity_focus_op.py | 2 +- test/legacy_test/test_simple_rnn_op.py | 2 +- test/legacy_test/test_size_op.py | 2 +- test/legacy_test/test_slice_op.py | 6 +++++- test/legacy_test/test_smooth_l1_loss_op.py | 2 +- test/legacy_test/test_softmax_mask_fuse_op.py | 2 +- .../test_softmax_mask_fuse_upper_triangle_op.py | 2 +- test/legacy_test/test_softmax_op.py | 2 +- .../test_softmax_with_cross_entropy_op.py | 2 +- test/legacy_test/test_solve_op.py | 2 +- test/legacy_test/test_space_to_depth_op.py | 2 +- test/legacy_test/test_sparse_attention_op.py | 2 +- test/legacy_test/test_sparse_momentum_op.py | 2 +- test/legacy_test/test_spectral_norm_op.py | 2 +- test/legacy_test/test_split_op.py | 2 +- test/legacy_test/test_spp_op.py | 2 +- test/legacy_test/test_squared_l2_distance_op.py | 2 +- test/legacy_test/test_squared_l2_norm_op.py | 2 +- test/legacy_test/test_squeeze2_op.py | 2 +- test/legacy_test/test_squeeze_op.py | 2 +- test/legacy_test/test_stack_op.py | 2 +- test/legacy_test/test_stft_op.py | 2 +- test/legacy_test/test_strided_slice_op.py | 2 +- test/legacy_test/test_sum_op.py | 10 +++++----- test/legacy_test/test_svd_op.py | 2 +- test/legacy_test/test_sync_batch_norm_op.py | 8 ++++---- test/legacy_test/test_take_along_axis_op.py | 2 +- test/legacy_test/test_target_assign_op.py | 2 +- test/legacy_test/test_tdm_child_op.py | 2 +- test/legacy_test/test_tdm_sampler_op.py | 2 +- .../test_teacher_student_sigmoid_loss_op.py | 2 +- test/legacy_test/test_temporal_shift_op.py | 2 +- test/legacy_test/test_tile_op.py | 2 +- test/legacy_test/test_top_k_op.py | 2 +- test/legacy_test/test_top_k_v2_op.py | 6 +++--- test/legacy_test/test_trace_op.py | 2 +- test/legacy_test/test_trans_layout_op.py | 2 +- test/legacy_test/test_transfer_dtype_op.py | 6 +++--- test/legacy_test/test_transfer_layout_op.py | 2 +- test/legacy_test/test_transpose_op.py | 2 +- test/legacy_test/test_tree_conv_op.py | 2 +- test/legacy_test/test_triangular_solve_op.py | 2 +- test/legacy_test/test_tril_indices_op.py | 2 +- test/legacy_test/test_tril_triu_op.py | 2 +- test/legacy_test/test_trilinear_interp_op.py | 2 +- test/legacy_test/test_trilinear_interp_v2_op.py | 2 +- test/legacy_test/test_triu_indices_op.py | 2 +- test/legacy_test/test_trunc_op.py | 2 +- test/legacy_test/test_unbind_op.py | 2 +- test/legacy_test/test_unfold_op.py | 2 +- test/legacy_test/test_uniform_random_bf16_op.py | 2 +- test/legacy_test/test_uniform_random_inplace_op.py | 2 +- test/legacy_test/test_uniform_random_op.py | 2 +- test/legacy_test/test_unique.py | 6 +++++- test/legacy_test/test_unique_consecutive_op.py | 2 +- test/legacy_test/test_unique_with_counts.py | 2 +- test/legacy_test/test_unpool3d_op.py | 2 +- test/legacy_test/test_unpool_op.py | 2 +- test/legacy_test/test_unsqueeze2_op.py | 2 +- test/legacy_test/test_unsqueeze_op.py | 2 +- test/legacy_test/test_unstack_op.py | 2 +- test/legacy_test/test_update_loss_scaling_op.py | 6 +++++- test/legacy_test/test_var_conv_2d.py | 2 +- test/legacy_test/test_viterbi_decode_op.py | 2 +- test/legacy_test/test_warpctc_op.py | 2 +- test/legacy_test/test_warprnnt_op.py | 2 +- test/legacy_test/test_where_op.py | 2 +- test/legacy_test/test_yolo_box_op.py | 2 +- test/legacy_test/test_yolov3_loss_op.py | 2 +- test/mkldnn/test_activation_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_activation_mkldnn_op.py | 2 +- test/mkldnn/test_batch_norm_mkldnn_op.py | 2 +- test/mkldnn/test_bilinear_interp_mkldnn_op.py | 2 +- test/mkldnn/test_bilinear_interp_v2_mkldnn_op.py | 2 +- test/mkldnn/test_cast_mkldnn_op.py | 2 +- test/mkldnn/test_clip_mkldnn_op.py | 2 +- test/mkldnn/test_concat_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_concat_int8_mkldnn_op.py | 2 +- test/mkldnn/test_concat_mkldnn_op.py | 2 +- test/mkldnn/test_conv2d_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_conv2d_int8_mkldnn_op.py | 2 +- test/mkldnn/test_conv2d_mkldnn_op.py | 2 +- test/mkldnn/test_conv2d_transpose_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_conv2d_transpose_mkldnn_op.py | 2 +- test/mkldnn/test_dequantize_mkldnn_op.py | 2 +- test/mkldnn/test_elementwise_add_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_elementwise_add_mkldnn_op.py | 2 +- test/mkldnn/test_elementwise_div_mkldnn_op.py | 2 +- test/mkldnn/test_elementwise_mul_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_elementwise_mul_onednn_op.py | 2 +- test/mkldnn/test_elementwise_sub_onednn_op.py | 2 +- test/mkldnn/test_expand_v2_mkldnn_op.py | 2 +- test/mkldnn/test_fc_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_fc_int8_mkldnn_op.py | 2 +- test/mkldnn/test_fc_mkldnn_op.py | 2 +- test/mkldnn/test_fill_constant_mkldnn_op.py | 2 +- test/mkldnn/test_flatten_mkldnn_op.py | 2 +- test/mkldnn/test_fusion_gru_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_fusion_gru_int8_mkldnn_op.py | 2 +- test/mkldnn/test_fusion_lstm_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_fusion_lstm_int8_mkldnn_op.py | 2 +- test/mkldnn/test_gaussian_random_mkldnn_op.py | 2 +- test/mkldnn/test_layer_norm_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_layer_norm_mkldnn_op.py | 2 +- test/mkldnn/test_log_softmax_mkldnn_op.py | 2 +- test/mkldnn/test_matmul_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_matmul_mkldnn_op.py | 2 +- test/mkldnn/test_matmul_v2_mkldnn_op.py | 2 +- test/mkldnn/test_mul_int8_mkldnn_op.py | 2 +- test/mkldnn/test_mul_mkldnn_op.py | 2 +- test/mkldnn/test_multi_gru_mkldnn_op.py | 2 +- test/mkldnn/test_nearest_interp_mkldnn_op.py | 2 +- test/mkldnn/test_nearest_interp_v2_mkldnn_op.py | 2 +- test/mkldnn/test_pool2d_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_pool2d_int8_mkldnn_op.py | 2 +- test/mkldnn/test_prelu_mkldnn_op.py | 2 +- test/mkldnn/test_quantize_mkldnn_op.py | 2 +- test/mkldnn/test_reduce_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_reduce_mkldnn_op.py | 2 +- test/mkldnn/test_requantize_mkldnn_op.py | 2 +- test/mkldnn/test_reshape_bf16_op.py | 2 +- test/mkldnn/test_reshape_mkldnn_op.py | 2 +- test/mkldnn/test_scale_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_scale_mkldnn_op.py | 2 +- test/mkldnn/test_shape_mkldnn_op.py | 2 +- test/mkldnn/test_shuffle_channel_mkldnn_op.py | 2 +- test/mkldnn/test_slice_mkldnn_op.py | 2 +- test/mkldnn/test_softmax_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_softmax_mkldnn_op.py | 2 +- test/mkldnn/test_softplus_mkldnn_op.py | 2 +- test/mkldnn/test_split_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_split_mkldnn_op.py | 2 +- test/mkldnn/test_squeeze2_mkldnn_op.py | 2 +- test/mkldnn/test_stack_mkldnn_op.py | 2 +- test/mkldnn/test_sum_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_transpose_bf16_mkldnn_op.py | 2 +- test/mkldnn/test_transpose_int8_mkldnn_op.py | 2 +- test/mkldnn/test_transpose_mkldnn_op.py | 2 +- test/sequence/test_sequence_concat.py | 2 +- test/sequence/test_sequence_conv.py | 2 +- test/sequence/test_sequence_erase_op.py | 2 +- test/sequence/test_sequence_expand.py | 2 +- test/sequence/test_sequence_expand_as.py | 2 +- test/sequence/test_sequence_mask.py | 2 +- test/sequence/test_sequence_pad_op.py | 2 +- test/sequence/test_sequence_pool.py | 2 +- test/sequence/test_sequence_reshape.py | 2 +- test/sequence/test_sequence_reverse.py | 2 +- test/sequence/test_sequence_scatter_op.py | 2 +- test/sequence/test_sequence_slice_op.py | 2 +- test/sequence/test_sequence_softmax_op.py | 2 +- test/sequence/test_sequence_topk_avg_pooling.py | 2 +- test/sequence/test_sequence_unpad_op.py | 2 +- test/xpu/op_test_xpu.py | 2 +- test/xpu/test_activation_op_xpu.py | 2 +- test/xpu/test_bitwise_op_xpu.py | 2 +- test/xpu/test_concat_op_xpu.py | 2 +- test/xpu/test_diagonal_op_xpu.py | 2 +- test/xpu/test_elementwise_add_op_xpu.py | 2 +- test/xpu/test_elementwise_add_op_xpu_kp.py | 2 +- test/xpu/test_elementwise_div_op_xpu.py | 2 +- test/xpu/test_elementwise_floordiv_op_xpu.py | 2 +- test/xpu/test_elementwise_max_op_xpu.py | 2 +- test/xpu/test_elementwise_min_op_xpu.py | 2 +- test/xpu/test_elementwise_mod_op_xpu.py | 2 +- test/xpu/test_elementwise_mul_op_xpu.py | 2 +- test/xpu/test_elementwise_pow_op_xpu.py | 2 +- test/xpu/test_elementwise_sub_op_xpu.py | 2 +- test/xpu/test_fill_constant_op_xpu.py | 2 +- test/xpu/test_fill_diagonal_tensor_op_xpu.py | 2 +- test/xpu/test_fused_resnet_basic_block_op_xpu.py | 2 +- test/xpu/test_group_norm_op_xpu.py | 2 +- test/xpu/test_huber_loss_op_xpu.py | 2 +- test/xpu/test_log_loss_op_xpu.py | 2 +- test/xpu/test_logical_op_xpu.py | 2 +- test/xpu/test_refactor_op_xpu.py | 2 +- test/xpu/test_stack_op_xpu.py | 2 +- tools/jetson_infer_op.py | 8 ++++---- 546 files changed, 741 insertions(+), 629 deletions(-) rename test/legacy_test/{eager_op_test.py => op_test.py} (99%) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 2a407375d1855..3260f6885d651 100644 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -783,7 +783,7 @@ function run_linux_cpu_test() { if [ -d "${PADDLE_ROOT}/dist/" ]; then pip install ${PADDLE_ROOT}/dist/*whl fi - cp ${PADDLE_ROOT}/build/test/legacy_test/eager_op_test.py ${PADDLE_ROOT}/build/python + cp ${PADDLE_ROOT}/build/test/legacy_test/op_test.py ${PADDLE_ROOT}/build/python cp ${PADDLE_ROOT}/build/test/legacy_test/testsuite.py ${PADDLE_ROOT}/build/python cp -r ${PADDLE_ROOT}/build/test/white_list ${PADDLE_ROOT}/build/python ut_total_startTime_s=`date +%s` diff --git a/test/distribution/test_dirichlet_op.py b/test/distribution/test_dirichlet_op.py index b2c1c15bbf91f..dccf825b3f121 100644 --- a/test/distribution/test_dirichlet_op.py +++ b/test/distribution/test_dirichlet_op.py @@ -17,11 +17,7 @@ import numpy as np import scipy.stats -from eager_op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float import paddle from paddle.base import core diff --git a/test/fft/test_spectral_op.py b/test/fft/test_spectral_op.py index 96ef439728524..885aff2c7cd1b 100644 --- a/test/fft/test_spectral_op.py +++ b/test/fft/test_spectral_op.py @@ -16,7 +16,7 @@ import sys import numpy as np -from eager_op_test import OpTest +from op_test import OpTest from spectral_op_np import fft_c2c, fft_c2r, fft_r2c import paddle diff --git a/test/ir/test_ir_subgraph_python_interface.py b/test/ir/test_ir_subgraph_python_interface.py index 6738dc6dccef6..7c1258dc8f837 100644 --- a/test/ir/test_ir_subgraph_python_interface.py +++ b/test/ir/test_ir_subgraph_python_interface.py @@ -14,7 +14,7 @@ import unittest -from eager_op_test import OpTestTool +from op_test import OpTestTool import paddle from paddle import base diff --git a/test/legacy_test/benchmark.py b/test/legacy_test/benchmark.py index 3384c04889389..8cbc429cc0d91 100644 --- a/test/legacy_test/benchmark.py +++ b/test/legacy_test/benchmark.py @@ -13,9 +13,9 @@ # limitations under the License. import time +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from op import Operator diff --git a/test/legacy_test/c_embedding_op_base.py b/test/legacy_test/c_embedding_op_base.py index 891b3b8288260..abebefacea695 100644 --- a/test/legacy_test/c_embedding_op_base.py +++ b/test/legacy_test/c_embedding_op_base.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.framework import core diff --git a/test/legacy_test/eager_op_test.py b/test/legacy_test/op_test.py similarity index 99% rename from test/legacy_test/eager_op_test.py rename to test/legacy_test/op_test.py index af7d44fd21aff..69f70ee8302b3 100644 --- a/test/legacy_test/eager_op_test.py +++ b/test/legacy_test/op_test.py @@ -2465,13 +2465,10 @@ def _is_skip_name(self, name): type(place) is paddle.base.libpaddle.CPUPlace or type(place) is paddle.base.libpaddle.CUDAPlace ): - print("New IR checker begins...........") with paddle.new_ir_utils.IrGuard(): new_ir_checker = NewIRChecker(self, self.outputs) new_ir_checker.check() - print("New IR checker ends...........") - # Note(zhiqiu): inplace_atol should be only set when op doesn't ensure # computational consistency. # For example, group_norm uses AtomicAdd on CUDAPlace, which do not ensure @@ -3019,7 +3016,6 @@ def check_grad_with_place( type(place) is paddle.base.libpaddle.CPUPlace or type(place) is paddle.base.libpaddle.CUDAPlace ): - print("New IR gradient begins...........") with paddle.new_ir_utils.IrGuard(): new_ir_grad = self._get_ir_gradient( inputs_to_check, @@ -3028,7 +3024,6 @@ def check_grad_with_place( user_defined_grad_outputs, no_grad_set, ) - print("New IR gradient ends...........") fp32_analytic_grads = [] for grad in new_ir_grad: if grad.dtype == np.uint16: diff --git a/test/legacy_test/test_accuracy_op.py b/test/legacy_test/test_accuracy_op.py index e722b6912c24d..333acb87c47f6 100755 --- a/test/legacy_test/test_accuracy_op.py +++ b/test/legacy_test/test_accuracy_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + paddle_static_guard, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_activation_op.py b/test/legacy_test/test_activation_op.py index f40663fb10cfd..0868948b3fddc 100644 --- a/test/legacy_test/test_activation_op.py +++ b/test/legacy_test/test_activation_op.py @@ -16,9 +16,9 @@ import unittest import warnings from contextlib import contextmanager +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from scipy.special import erf, expit import paddle diff --git a/test/legacy_test/test_adadelta_op.py b/test/legacy_test/test_adadelta_op.py index a1733fa45a150..ba7ae68077a12 100644 --- a/test/legacy_test/test_adadelta_op.py +++ b/test/legacy_test/test_adadelta_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_adagrad_op.py b/test/legacy_test/test_adagrad_op.py index 552f19f6c0aff..0f7e99239d169 100644 --- a/test/legacy_test/test_adagrad_op.py +++ b/test/legacy_test/test_adagrad_op.py @@ -14,9 +14,9 @@ import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from op import Operator import paddle diff --git a/test/legacy_test/test_adam_op.py b/test/legacy_test/test_adam_op.py index f0326fc54d744..0c1ebd1cb81ec 100644 --- a/test/legacy_test/test_adam_op.py +++ b/test/legacy_test/test_adam_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from op import Operator import paddle diff --git a/test/legacy_test/test_adamax_op.py b/test/legacy_test/test_adamax_op.py index c12bcfd994fa0..c30a7a7769773 100644 --- a/test/legacy_test/test_adamax_op.py +++ b/test/legacy_test/test_adamax_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_adamw_op.py b/test/legacy_test/test_adamw_op.py index a6a30d3af101a..a56a01705ce70 100644 --- a/test/legacy_test/test_adamw_op.py +++ b/test/legacy_test/test_adamw_op.py @@ -15,9 +15,9 @@ import random import unittest from functools import partial +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_adaptive_max_pool1d.py b/test/legacy_test/test_adaptive_max_pool1d.py index b4f44790af5d3..ed4e4715818d9 100644 --- a/test/legacy_test/test_adaptive_max_pool1d.py +++ b/test/legacy_test/test_adaptive_max_pool1d.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import check_out_dtype, paddle_static_guard import numpy as np -from eager_op_test import check_out_dtype, paddle_static_guard import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_adaptive_max_pool2d.py b/test/legacy_test/test_adaptive_max_pool2d.py index e4625fbd8eb33..89446dc4b1133 100644 --- a/test/legacy_test/test_adaptive_max_pool2d.py +++ b/test/legacy_test/test_adaptive_max_pool2d.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import check_out_dtype import numpy as np -from eager_op_test import check_out_dtype import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_adaptive_max_pool3d.py b/test/legacy_test/test_adaptive_max_pool3d.py index b09b5779fc444..104e775943937 100755 --- a/test/legacy_test/test_adaptive_max_pool3d.py +++ b/test/legacy_test/test_adaptive_max_pool3d.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import check_out_dtype import numpy as np -from eager_op_test import check_out_dtype import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_add_position_encoding_op.py b/test/legacy_test/test_add_position_encoding_op.py index 48f718ae4f98f..2b229372b5464 100644 --- a/test/legacy_test/test_add_position_encoding_op.py +++ b/test/legacy_test/test_add_position_encoding_op.py @@ -13,9 +13,9 @@ # limitations under the License. import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def add_position_encoding(input, alpha=1.0, beta=1.0): diff --git a/test/legacy_test/test_addmm_op.py b/test/legacy_test/test_addmm_op.py index 201d86f7d17c4..7903b7f9d6192 100644 --- a/test/legacy_test/test_addmm_op.py +++ b/test/legacy_test/test_addmm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_affine_channel_op.py b/test/legacy_test/test_affine_channel_op.py index ada236d2e6c9a..36b699032fab8 100644 --- a/test/legacy_test/test_affine_channel_op.py +++ b/test/legacy_test/test_affine_channel_op.py @@ -16,9 +16,9 @@ """ import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def affine_channel(x, scale, bias, layout): diff --git a/test/legacy_test/test_affine_grid_op.py b/test/legacy_test/test_affine_grid_op.py index 0bb9f2a19b435..9cbdb4ce8b7f4 100644 --- a/test/legacy_test/test_affine_grid_op.py +++ b/test/legacy_test/test_affine_grid_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_allclose_op.py b/test/legacy_test/test_allclose_op.py index e272e98403903..e7c391efcedfc 100644 --- a/test/legacy_test/test_allclose_op.py +++ b/test/legacy_test/test_allclose_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_amp_check_finite_and_scale_op.py b/test/legacy_test/test_amp_check_finite_and_scale_op.py index 4926b10b4a1b2..7f4676367cc2d 100644 --- a/test/legacy_test/test_amp_check_finite_and_scale_op.py +++ b/test/legacy_test/test_amp_check_finite_and_scale_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle.static.amp import amp_nn diff --git a/test/legacy_test/test_anchor_generator_op.py b/test/legacy_test/test_anchor_generator_op.py index 6c30031e6308b..551bef655da7d 100644 --- a/test/legacy_test/test_anchor_generator_op.py +++ b/test/legacy_test/test_anchor_generator_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def anchor_generator_in_python( diff --git a/test/legacy_test/test_angle_op.py b/test/legacy_test/test_angle_op.py index 1433bcd117b09..3700ed64b339c 100644 --- a/test/legacy_test/test_angle_op.py +++ b/test/legacy_test/test_angle_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import static diff --git a/test/legacy_test/test_arange.py b/test/legacy_test/test_arange.py index 19390754048f4..4fdf6f65ede82 100644 --- a/test/legacy_test/test_arange.py +++ b/test/legacy_test/test_arange.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_arg_min_max_op.py b/test/legacy_test/test_arg_min_max_op.py index 000e5d88b080b..9a4fa37097bd1 100644 --- a/test/legacy_test/test_arg_min_max_op.py +++ b/test/legacy_test/test_arg_min_max_op.py @@ -14,9 +14,9 @@ import os import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from test_attribute_var import UnittestBase import paddle diff --git a/test/legacy_test/test_arg_min_max_v2_op.py b/test/legacy_test/test_arg_min_max_v2_op.py index f7e79b56e9f0b..bf5c7b6a1e38e 100644 --- a/test/legacy_test/test_arg_min_max_v2_op.py +++ b/test/legacy_test/test_arg_min_max_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_argsort_op.py b/test/legacy_test/test_argsort_op.py index 4ecbe2a8386b1..33d6f6bc270d2 100644 --- a/test/legacy_test/test_argsort_op.py +++ b/test/legacy_test/test_argsort_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_assign_op.py b/test/legacy_test/test_assign_op.py index e9dc9889d5fc3..5a37a939dac9e 100644 --- a/test/legacy_test/test_assign_op.py +++ b/test/legacy_test/test_assign_op.py @@ -13,12 +13,15 @@ # limitations under the License. import unittest +from test.legacy_test import op_test +from test.legacy_test.op_test import ( + convert_float_to_uint16, + convert_uint16_to_float, +) -import eager_op_test import gradient_checker import numpy as np from decorator_helper import prog_scope -from eager_op_test import convert_float_to_uint16, convert_uint16_to_float import paddle from paddle import base @@ -26,7 +29,7 @@ from paddle.base.backward import append_backward -class TestAssignOp(eager_op_test.OpTest): +class TestAssignOp(op_test.OpTest): def setUp(self): self.python_api = paddle.assign self.public_python_api = paddle.assign @@ -59,7 +62,7 @@ def init_input_configs(self): @unittest.skipIf( not paddle.is_compiled_with_cuda(), "FP16 test runs only on GPU" ) -class TestAssignFP16Op(eager_op_test.OpTest): +class TestAssignFP16Op(op_test.OpTest): def setUp(self): self.python_api = paddle.assign self.public_python_api = paddle.assign @@ -84,7 +87,7 @@ def test_backward(self): not paddle.is_compiled_with_cuda() or paddle.is_compiled_with_rocm(), "BFP16 test runs only on CUDA", ) -class TestAssignBFP16Op(eager_op_test.OpTest): +class TestAssignBFP16Op(op_test.OpTest): def setUp(self): self.python_api = paddle.assign self.public_python_api = paddle.assign diff --git a/test/legacy_test/test_assign_pos_op.py b/test/legacy_test/test_assign_pos_op.py index 4b039eb1bd91d..24f2547a47f25 100644 --- a/test/legacy_test/test_assign_pos_op.py +++ b/test/legacy_test/test_assign_pos_op.py @@ -13,8 +13,8 @@ # limitations under the License. import unittest +from test.legacy_test import op_test -import eager_op_test import numpy as np import paddle @@ -72,7 +72,7 @@ def redefined_allclose(x, y, *args, **kwargs): @unittest.skipIf( not core.is_compiled_with_cuda(), "core is not compiled with CUDA" ) -class TestAssignPosOpInt64(eager_op_test.OpTest): +class TestAssignPosOpInt64(op_test.OpTest): def setUp(self): x = np.random.randint(0, 16, size=(100, 2)).astype("int64") y = count(x, 16) diff --git a/test/legacy_test/test_assign_value_op.py b/test/legacy_test/test_assign_value_op.py index 28f9b0fba0597..8b883c311f757 100644 --- a/test/legacy_test/test_assign_value_op.py +++ b/test/legacy_test/test_assign_value_op.py @@ -13,8 +13,8 @@ # limitations under the License. import unittest +from test.legacy_test import op_test -import eager_op_test import numpy as np import paddle @@ -31,7 +31,7 @@ def assign_value_wrapper( ) -class TestAssignValueOp(eager_op_test.OpTest): +class TestAssignValueOp(op_test.OpTest): def setUp(self): self.op_type = "assign_value" self.python_api = assign_value_wrapper @@ -74,7 +74,7 @@ def init_data(self): class TestAssignApi(unittest.TestCase): def setUp(self): - with eager_op_test.paddle_static_guard(): + with op_test.paddle_static_guard(): self.init_dtype() self.value = (-100 + 200 * np.random.random(size=(2, 5))).astype( self.dtype @@ -89,7 +89,7 @@ def init_dtype(self): self.dtype = "float32" def test_assign(self): - with eager_op_test.paddle_static_guard(): + with op_test.paddle_static_guard(): main_program = base.Program() with base.program_guard(main_program): x = paddle.tensor.create_tensor(dtype=self.dtype) @@ -113,7 +113,7 @@ def init_dtype(self): class TestAssignApi4(TestAssignApi): def setUp(self): - with eager_op_test.paddle_static_guard(): + with op_test.paddle_static_guard(): self.init_dtype() self.value = np.random.choice(a=[False, True], size=(2, 5)).astype( np.bool_ diff --git a/test/legacy_test/test_atan2_op.py b/test/legacy_test/test_atan2_op.py index 74d5bb7d8f290..101382cd4f4c4 100644 --- a/test/legacy_test/test_atan2_op.py +++ b/test/legacy_test/test_atan2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_attention_lstm_op.py b/test/legacy_test/test_attention_lstm_op.py index c086a3f33cd92..e252ef2cbe4af 100644 --- a/test/legacy_test/test_attention_lstm_op.py +++ b/test/legacy_test/test_attention_lstm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_fusion_lstm_op import ACTIVATION, fc from test_softmax_op import stable_softmax diff --git a/test/legacy_test/test_auc_op.py b/test/legacy_test/test_auc_op.py index 64b617c1eee22..39b3b7d661799 100644 --- a/test/legacy_test/test_auc_op.py +++ b/test/legacy_test/test_auc_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_auc_single_pred_op.py b/test/legacy_test/test_auc_single_pred_op.py index 3445b5a0a119e..412bd9be896d9 100644 --- a/test/legacy_test/test_auc_single_pred_op.py +++ b/test/legacy_test/test_auc_single_pred_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_batch_fc_op.py b/test/legacy_test/test_batch_fc_op.py index e5f045a49d604..d77ed3d795859 100644 --- a/test/legacy_test/test_batch_fc_op.py +++ b/test/legacy_test/test_batch_fc_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_batch_norm_op.py b/test/legacy_test/test_batch_norm_op.py index 4f3f06f692cba..c038fae4bc10b 100644 --- a/test/legacy_test/test_batch_norm_op.py +++ b/test/legacy_test/test_batch_norm_op.py @@ -14,14 +14,14 @@ import os import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, _set_use_system_allocator, convert_float_to_uint16, convert_uint16_to_float, ) + +import numpy as np from op import Operator import paddle diff --git a/test/legacy_test/test_batch_norm_op_prim_nchw.py b/test/legacy_test/test_batch_norm_op_prim_nchw.py index a83fc9fbc2c88..1a309dd1ba004 100644 --- a/test/legacy_test/test_batch_norm_op_prim_nchw.py +++ b/test/legacy_test/test_batch_norm_op_prim_nchw.py @@ -13,14 +13,14 @@ # limitations under the License. import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, _set_use_system_allocator, convert_float_to_uint16, ) +import numpy as np + import paddle import paddle.nn.functional as F from paddle.base import core diff --git a/test/legacy_test/test_batch_norm_op_prim_nhwc.py b/test/legacy_test/test_batch_norm_op_prim_nhwc.py index 11d8c4a0db459..4751ef72486f3 100644 --- a/test/legacy_test/test_batch_norm_op_prim_nhwc.py +++ b/test/legacy_test/test_batch_norm_op_prim_nhwc.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import _set_use_system_allocator import numpy as np -from eager_op_test import _set_use_system_allocator from test_batch_norm_op_prim_nchw import TestBatchNormOp import paddle diff --git a/test/legacy_test/test_bce_loss.py b/test/legacy_test/test_bce_loss.py index dc95248ae9bde..03f5b10c29351 100644 --- a/test/legacy_test/test_bce_loss.py +++ b/test/legacy_test/test_bce_loss.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_bernoulli_op.py b/test/legacy_test/test_bernoulli_op.py index 51cd296436ef3..b290c4d43a2b1 100644 --- a/test/legacy_test/test_bernoulli_op.py +++ b/test/legacy_test/test_bernoulli_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_bicubic_interp_op.py b/test/legacy_test/test_bicubic_interp_op.py index 8cec2f266cf61..97e3020f733f2 100644 --- a/test/legacy_test/test_bicubic_interp_op.py +++ b/test/legacy_test/test_bicubic_interp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_bicubic_interp_v2_op.py b/test/legacy_test/test_bicubic_interp_v2_op.py index e034015f9a8f0..d72d091d8d393 100644 --- a/test/legacy_test/test_bicubic_interp_v2_op.py +++ b/test/legacy_test/test_bicubic_interp_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_bilateral_slice_op.py b/test/legacy_test/test_bilateral_slice_op.py index 1cf5f292240d5..58611b88189ca 100644 --- a/test/legacy_test/test_bilateral_slice_op.py +++ b/test/legacy_test/test_bilateral_slice_op.py @@ -14,9 +14,9 @@ import math import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle from paddle.incubate.layers.nn import bilateral_slice diff --git a/test/legacy_test/test_bilinear_interp_op.py b/test/legacy_test/test_bilinear_interp_op.py index fca64f8b802df..eb5629e4769a6 100755 --- a/test/legacy_test/test_bilinear_interp_op.py +++ b/test/legacy_test/test_bilinear_interp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_bilinear_interp_v2_op.py b/test/legacy_test/test_bilinear_interp_v2_op.py index 93805968673a8..930068aedee55 100755 --- a/test/legacy_test/test_bilinear_interp_v2_op.py +++ b/test/legacy_test/test_bilinear_interp_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_bilinear_tensor_product_op.py b/test/legacy_test/test_bilinear_tensor_product_op.py index 3e8a81393ff05..cf125f83c5f8e 100644 --- a/test/legacy_test/test_bilinear_tensor_product_op.py +++ b/test/legacy_test/test_bilinear_tensor_product_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_bincount_op.py b/test/legacy_test/test_bincount_op.py index 24f509a46ed6e..d03f193033d42 100644 --- a/test/legacy_test/test_bincount_op.py +++ b/test/legacy_test/test_bincount_op.py @@ -15,9 +15,9 @@ import os import tempfile import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle import paddle.inference as paddle_infer diff --git a/test/legacy_test/test_bipartite_match_op.py b/test/legacy_test/test_bipartite_match_op.py index b42750d84b9a9..76cdcdd635ec3 100644 --- a/test/legacy_test/test_bipartite_match_op.py +++ b/test/legacy_test/test_bipartite_match_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def bipartite_match(distance, match_indices, match_dist): diff --git a/test/legacy_test/test_bitwise_op.py b/test/legacy_test/test_bitwise_op.py index 728ea62dbf2cb..295ae7f549e8f 100644 --- a/test/legacy_test/test_bitwise_op.py +++ b/test/legacy_test/test_bitwise_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_bmm_op.py b/test/legacy_test/test_bmm_op.py index 91a0f806dbe16..53bfe5b582fa3 100644 --- a/test/legacy_test/test_bmm_op.py +++ b/test/legacy_test/test_bmm_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + paddle_static_guard, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_box_clip_op.py b/test/legacy_test/test_box_clip_op.py index 1f7f3e9672541..c489543b7efe6 100644 --- a/test/legacy_test/test_box_clip_op.py +++ b/test/legacy_test/test_box_clip_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def box_clip(input_box, im_info, output_box): diff --git a/test/legacy_test/test_box_coder_op.py b/test/legacy_test/test_box_coder_op.py index c0beed3ca4a91..b940b4519f51b 100644 --- a/test/legacy_test/test_box_coder_op.py +++ b/test/legacy_test/test_box_coder_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_box_decoder_and_assign_op.py b/test/legacy_test/test_box_decoder_and_assign_op.py index 48b310671789f..09393530499f8 100644 --- a/test/legacy_test/test_box_decoder_and_assign_op.py +++ b/test/legacy_test/test_box_decoder_and_assign_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def box_decoder_and_assign(deltas, weights, boxes, box_score, box_clip): diff --git a/test/legacy_test/test_bpr_loss_op.py b/test/legacy_test/test_bpr_loss_op.py index 27c32c50063be..571e6da2c5798 100644 --- a/test/legacy_test/test_bpr_loss_op.py +++ b/test/legacy_test/test_bpr_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, randomize_probability import numpy as np -from eager_op_test import OpTest, randomize_probability import paddle diff --git a/test/legacy_test/test_broadcast_error.py b/test/legacy_test/test_broadcast_error.py index 3e8f924c85f2f..d86e30ce48431 100644 --- a/test/legacy_test/test_broadcast_error.py +++ b/test/legacy_test/test_broadcast_error.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_broadcast_tensors_op.py b/test/legacy_test/test_broadcast_tensors_op.py index 8e691f02fefff..43c1b9eae8ee9 100644 --- a/test/legacy_test/test_broadcast_tensors_op.py +++ b/test/legacy_test/test_broadcast_tensors_op.py @@ -14,9 +14,9 @@ import random import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_cast_op.py b/test/legacy_test/test_cast_op.py index e3bae330f0910..f34f31c1db313 100644 --- a/test/legacy_test/test_cast_op.py +++ b/test/legacy_test/test_cast_op.py @@ -13,16 +13,16 @@ # limitations under the License. import unittest - -import gradient_checker -import numpy as np -from decorator_helper import prog_scope -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, ) +import gradient_checker +import numpy as np +from decorator_helper import prog_scope + import paddle from paddle import base from paddle.base import Program, core, program_guard diff --git a/test/legacy_test/test_center_loss.py b/test/legacy_test/test_center_loss.py index ffb193953129e..8e284adb2d8c1 100644 --- a/test/legacy_test/test_center_loss.py +++ b/test/legacy_test/test_center_loss.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_channel_shuffle.py b/test/legacy_test/test_channel_shuffle.py index 2ade43213190d..b793f33f91bf6 100644 --- a/test/legacy_test/test_channel_shuffle.py +++ b/test/legacy_test/test_channel_shuffle.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_cholesky_op.py b/test/legacy_test/test_cholesky_op.py index daacb067cdff8..1cfda81ba4cff 100644 --- a/test/legacy_test/test_cholesky_op.py +++ b/test/legacy_test/test_cholesky_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np from decorator_helper import prog_scope -from eager_op_test import OpTest, skip_check_grad_ci from gradient_checker import grad_check import paddle diff --git a/test/legacy_test/test_cholesky_solve_op.py b/test/legacy_test/test_cholesky_solve_op.py index 413119ecc7587..82aea825b21d7 100644 --- a/test/legacy_test/test_cholesky_solve_op.py +++ b/test/legacy_test/test_cholesky_solve_op.py @@ -20,7 +20,7 @@ import scipy.linalg sys.path.append("..") -from eager_op_test import OpTest +from test.legacy_test.op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_chunk_eval_op.py b/test/legacy_test/test_chunk_eval_op.py index 61c29519d117f..ef852167f5407 100644 --- a/test/legacy_test/test_chunk_eval_op.py +++ b/test/legacy_test/test_chunk_eval_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class Segment: diff --git a/test/legacy_test/test_class_center_sample_op.py b/test/legacy_test/test_class_center_sample_op.py index ffc7350e0f703..1136c92e95896 100644 --- a/test/legacy_test/test_class_center_sample_op.py +++ b/test/legacy_test/test_class_center_sample_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle from paddle.base import Program, core, program_guard diff --git a/test/legacy_test/test_clip_by_norm_op.py b/test/legacy_test/test_clip_by_norm_op.py index 8319255bc925d..7efb2a81990a9 100644 --- a/test/legacy_test/test_clip_by_norm_op.py +++ b/test/legacy_test/test_clip_by_norm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from op import Operator import paddle diff --git a/test/legacy_test/test_clip_op.py b/test/legacy_test/test_clip_op.py index 354bc1ae95cad..107ec882ff2c9 100644 --- a/test/legacy_test/test_clip_op.py +++ b/test/legacy_test/test_clip_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_coalesce_tensor_op.py b/test/legacy_test/test_coalesce_tensor_op.py index 46be0e58bec2e..bb2958bcdb77f 100644 --- a/test/legacy_test/test_coalesce_tensor_op.py +++ b/test/legacy_test/test_coalesce_tensor_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_collect_fpn_proposals_op.py b/test/legacy_test/test_collect_fpn_proposals_op.py index b10771009d870..b98863cf4c950 100644 --- a/test/legacy_test/test_collect_fpn_proposals_op.py +++ b/test/legacy_test/test_collect_fpn_proposals_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestCollectFPNProposalstOp(OpTest): diff --git a/test/legacy_test/test_collective_api_base.py b/test/legacy_test/test_collective_api_base.py index 9cca57c50edc8..337cf7d989dac 100644 --- a/test/legacy_test/test_collective_api_base.py +++ b/test/legacy_test/test_collective_api_base.py @@ -23,8 +23,12 @@ sys.path.append("../legacy_test") +from test.legacy_test.op_test import ( + convert_float_to_uint16, + convert_uint16_to_float, +) + import numpy as np -from eager_op_test import convert_float_to_uint16, convert_uint16_to_float import paddle import paddle.distributed as dist diff --git a/test/legacy_test/test_compare_op.py b/test/legacy_test/test_compare_op.py index 85bdc6cd11838..eef033d38f147 100755 --- a/test/legacy_test/test_compare_op.py +++ b/test/legacy_test/test_compare_op.py @@ -13,8 +13,8 @@ # limitations under the License. import unittest +from test.legacy_test import op_test -import eager_op_test import numpy import numpy as np @@ -24,7 +24,7 @@ def create_test_class(op_type, typename, callback): - class Cls(eager_op_test.OpTest): + class Cls(op_test.OpTest): def setUp(self): a = numpy.random.random(size=(10, 7)).astype(typename) b = numpy.random.random(size=(10, 7)).astype(typename) @@ -444,7 +444,7 @@ def test_attr_name(self): # add bf16 tests def create_bf16_case(op_type, callback): - class TestCompareOpBF16Op(eager_op_test.OpTest): + class TestCompareOpBF16Op(op_test.OpTest): def setUp(self): self.op_type = op_type self.dtype = np.uint16 @@ -454,8 +454,8 @@ def setUp(self): y = np.random.uniform(0, 1, [5, 5]).astype(np.float32) real_result = callback(x, y) self.inputs = { - 'X': eager_op_test.convert_float_to_uint16(x), - 'Y': eager_op_test.convert_float_to_uint16(y), + 'X': op_test.convert_float_to_uint16(x), + 'Y': op_test.convert_float_to_uint16(y), } self.outputs = {'Out': real_result} diff --git a/test/legacy_test/test_compare_reduce_op.py b/test/legacy_test/test_compare_reduce_op.py index 2f982d3d8aa0b..194228b28f6a5 100644 --- a/test/legacy_test/test_compare_reduce_op.py +++ b/test/legacy_test/test_compare_reduce_op.py @@ -13,15 +13,15 @@ # limitations under the License. import unittest +from test.legacy_test import op_test -import eager_op_test import numpy as np import paddle def create_test_not_equal_class(op_type, typename, callback): - class Cls(eager_op_test.OpTest): + class Cls(op_test.OpTest): def setUp(self): x = np.random.random(size=(10, 7)).astype(typename) y = np.random.random(size=(10, 7)).astype(typename) @@ -40,7 +40,7 @@ def test_output(self): def create_test_not_shape_equal_class(op_type, typename, callback): - class Cls(eager_op_test.OpTest): + class Cls(op_test.OpTest): def setUp(self): x = np.random.random(size=(10, 7)).astype(typename) y = np.random.random(size=(10)).astype(typename) @@ -59,7 +59,7 @@ def test_output(self): def create_test_equal_class(op_type, typename, callback): - class Cls(eager_op_test.OpTest): + class Cls(op_test.OpTest): def setUp(self): x = y = np.random.random(size=(10, 7)).astype(typename) z = callback(x, y) @@ -77,7 +77,7 @@ def test_output(self): def create_test_dim1_class(op_type, typename, callback): - class Cls(eager_op_test.OpTest): + class Cls(op_test.OpTest): def setUp(self): x = y = np.random.random(size=(1)).astype(typename) x = np.array([True, False, True]).astype(typename) diff --git a/test/legacy_test/test_complex_abs.py b/test/legacy_test/test_complex_abs.py index 845308b9bb026..64fc1534b8cb1 100644 --- a/test/legacy_test/test_complex_abs.py +++ b/test/legacy_test/test_complex_abs.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle import paddle.base.dygraph as dg diff --git a/test/legacy_test/test_complex_op.py b/test/legacy_test/test_complex_op.py index 910e8945afda4..5300bb7daa0f8 100644 --- a/test/legacy_test/test_complex_op.py +++ b/test/legacy_test/test_complex_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import static diff --git a/test/legacy_test/test_complex_view_op.py b/test/legacy_test/test_complex_view_op.py index 6055a9781419a..ef7c9b3344955 100644 --- a/test/legacy_test/test_complex_view_op.py +++ b/test/legacy_test/test_complex_view_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import static diff --git a/test/legacy_test/test_concat_op.py b/test/legacy_test/test_concat_op.py index 286f59797caed..1c5c8ddd48c2a 100644 --- a/test/legacy_test/test_concat_op.py +++ b/test/legacy_test/test_concat_op.py @@ -13,11 +13,15 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + skip_check_grad_ci, +) import gradient_checker import numpy as np from decorator_helper import prog_scope -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_conj_op.py b/test/legacy_test/test_conj_op.py index 4cad7bc276fc1..9da9be7242e79 100644 --- a/test/legacy_test/test_conj_op.py +++ b/test/legacy_test/test_conj_op.py @@ -20,7 +20,8 @@ import paddle sys.path.append("..") -from eager_op_test import OpTest, convert_float_to_uint16 +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 + from numpy.random import random as rand import paddle.base.dygraph as dg diff --git a/test/legacy_test/test_conv2d_fusion_op.py b/test/legacy_test/test_conv2d_fusion_op.py index 6aff6cb38b967..2b1490e9fa700 100644 --- a/test/legacy_test/test_conv2d_fusion_op.py +++ b/test/legacy_test/test_conv2d_fusion_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_conv2d_op import conv2d_forward_naive from paddle.base import core diff --git a/test/legacy_test/test_conv2d_op.py b/test/legacy_test/test_conv2d_op.py index 3d4ffe78b935c..27789e2da5410 100644 --- a/test/legacy_test/test_conv2d_op.py +++ b/test/legacy_test/test_conv2d_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + get_numeric_gradient, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, get_numeric_gradient from testsuite import create_op import paddle diff --git a/test/legacy_test/test_conv2d_op_depthwise_conv.py b/test/legacy_test/test_conv2d_op_depthwise_conv.py index 19e5b335768b0..981c00ce7a838 100644 --- a/test/legacy_test/test_conv2d_op_depthwise_conv.py +++ b/test/legacy_test/test_conv2d_op_depthwise_conv.py @@ -19,7 +19,8 @@ import paddle paddle.enable_static() -from eager_op_test import get_numeric_gradient +from test.legacy_test.op_test import get_numeric_gradient + from test_conv2d_op import ( TestConv2DOp, TestConv2DOp_v2, diff --git a/test/legacy_test/test_conv2d_transpose_op.py b/test/legacy_test/test_conv2d_transpose_op.py index 28478c886ab7d..dc7dc564761cb 100644 --- a/test/legacy_test/test_conv2d_transpose_op.py +++ b/test/legacy_test/test_conv2d_transpose_op.py @@ -21,7 +21,12 @@ from paddle import nn paddle.enable_static() -from eager_op_test import OpTest, convert_float_to_uint16, get_numeric_gradient +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + get_numeric_gradient, +) + from test_attribute_var import UnittestBase from testsuite import create_op diff --git a/test/legacy_test/test_conv3d_op.py b/test/legacy_test/test_conv3d_op.py index 5ae2fb3a0f888..98f5b071e6bef 100644 --- a/test/legacy_test/test_conv3d_op.py +++ b/test/legacy_test/test_conv3d_op.py @@ -13,14 +13,14 @@ # limitations under the License. import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, get_numeric_gradient, paddle_static_guard, ) + +import numpy as np from testsuite import create_op import paddle diff --git a/test/legacy_test/test_conv3d_transpose_op.py b/test/legacy_test/test_conv3d_transpose_op.py index e8cdb7ddf42c7..4ae08eae6369b 100644 --- a/test/legacy_test/test_conv3d_transpose_op.py +++ b/test/legacy_test/test_conv3d_transpose_op.py @@ -19,7 +19,7 @@ import paddle paddle.enable_static() -from eager_op_test import OpTest, copy_bits_from_float_to_uint16 +from test.legacy_test.op_test import OpTest, copy_bits_from_float_to_uint16 from paddle.base import core diff --git a/test/legacy_test/test_conv_shift_op.py b/test/legacy_test/test_conv_shift_op.py index d416761b1b6c0..3e0fcc7032764 100644 --- a/test/legacy_test/test_conv_shift_op.py +++ b/test/legacy_test/test_conv_shift_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def conv_shift_forward(x, y): diff --git a/test/legacy_test/test_cos_sim_op.py b/test/legacy_test/test_cos_sim_op.py index 3113345364ffc..d10928c724d39 100644 --- a/test/legacy_test/test_cos_sim_op.py +++ b/test/legacy_test/test_cos_sim_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestCosSimOp(OpTest): diff --git a/test/legacy_test/test_crf_decoding_op.py b/test/legacy_test/test_crf_decoding_op.py index 75a6a2ce2fb8c..f4480f44d0519 100644 --- a/test/legacy_test/test_crf_decoding_op.py +++ b/test/legacy_test/test_crf_decoding_op.py @@ -14,9 +14,9 @@ import random import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class CRFDecoding: diff --git a/test/legacy_test/test_crop_op.py b/test/legacy_test/test_crop_op.py index 394b4a1b6885c..24c31ca25b654 100644 --- a/test/legacy_test/test_crop_op.py +++ b/test/legacy_test/test_crop_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_crop_tensor_op.py b/test/legacy_test/test_crop_tensor_op.py index 3f186ebab54bd..0946677cc0b4f 100644 --- a/test/legacy_test/test_crop_tensor_op.py +++ b/test/legacy_test/test_crop_tensor_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_cross_entropy2_op.py b/test/legacy_test/test_cross_entropy2_op.py index 3b39af0054920..a89a89c65bb95 100644 --- a/test/legacy_test/test_cross_entropy2_op.py +++ b/test/legacy_test/test_cross_entropy2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class CrossEntropy2OpTestBase(OpTest): diff --git a/test/legacy_test/test_cross_entropy_op.py b/test/legacy_test/test_cross_entropy_op.py index 4ad24ba762b09..baa5046ef6d45 100644 --- a/test/legacy_test/test_cross_entropy_op.py +++ b/test/legacy_test/test_cross_entropy_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + paddle_static_guard, + randomize_probability, +) import numpy as np -from eager_op_test import OpTest, paddle_static_guard, randomize_probability import paddle from paddle import base diff --git a/test/legacy_test/test_cross_op.py b/test/legacy_test/test_cross_op.py index 72f77a0adaf3b..79087cbc88744 100644 --- a/test/legacy_test/test_cross_op.py +++ b/test/legacy_test/test_cross_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_ctc_align.py b/test/legacy_test/test_ctc_align.py index b95ac8a3c6e5a..9808c9afb0ed2 100644 --- a/test/legacy_test/test_ctc_align.py +++ b/test/legacy_test/test_ctc_align.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_cummax_op.py b/test/legacy_test/test_cummax_op.py index 53e1da6da45f8..2e2f2041e1c8d 100644 --- a/test/legacy_test/test_cummax_op.py +++ b/test/legacy_test/test_cummax_op.py @@ -14,9 +14,9 @@ import sys import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_cummin_op.py b/test/legacy_test/test_cummin_op.py index 95235dc33d442..eaf9404a39a57 100644 --- a/test/legacy_test/test_cummin_op.py +++ b/test/legacy_test/test_cummin_op.py @@ -14,9 +14,9 @@ import sys import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_cumprod_op.py b/test/legacy_test/test_cumprod_op.py index f0569a7697239..dbfbec2c1aba7 100644 --- a/test/legacy_test/test_cumprod_op.py +++ b/test/legacy_test/test_cumprod_op.py @@ -14,9 +14,9 @@ import random import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_cumsum_op.py b/test/legacy_test/test_cumsum_op.py index 6422852458138..1c2ec36635799 100644 --- a/test/legacy_test/test_cumsum_op.py +++ b/test/legacy_test/test_cumsum_op.py @@ -15,9 +15,9 @@ import os import tempfile import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle import paddle.inference as paddle_infer diff --git a/test/legacy_test/test_cvm_op.py b/test/legacy_test/test_cvm_op.py index 12294665b99f3..569963aa7e858 100644 --- a/test/legacy_test/test_cvm_op.py +++ b/test/legacy_test/test_cvm_op.py @@ -14,9 +14,9 @@ import unittest from math import log +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def cvm_compute(X, item_width, use_cvm): diff --git a/test/legacy_test/test_data_norm_op.py b/test/legacy_test/test_data_norm_op.py index 251123e9abdaa..d37e4227b88bc 100644 --- a/test/legacy_test/test_data_norm_op.py +++ b/test/legacy_test/test_data_norm_op.py @@ -14,9 +14,9 @@ """This is unit test of Test data_norm Op.""" import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from op import Operator import paddle diff --git a/test/legacy_test/test_decayed_adagrad_op.py b/test/legacy_test/test_decayed_adagrad_op.py index fc542c2e764b6..a05938ba3ea88 100644 --- a/test/legacy_test/test_decayed_adagrad_op.py +++ b/test/legacy_test/test_decayed_adagrad_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestDecayedAdagradOp1(OpTest): diff --git a/test/legacy_test/test_deformable_conv_op.py b/test/legacy_test/test_deformable_conv_op.py index db01a7c68a48b..9bee738bcb180 100644 --- a/test/legacy_test/test_deformable_conv_op.py +++ b/test/legacy_test/test_deformable_conv_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_deformable_conv_v1_op.py b/test/legacy_test/test_deformable_conv_v1_op.py index c4354ea9e8a88..d45381154a8f2 100644 --- a/test/legacy_test/test_deformable_conv_v1_op.py +++ b/test/legacy_test/test_deformable_conv_v1_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_density_prior_box_op.py b/test/legacy_test/test_density_prior_box_op.py index 688913ce396e7..59147d5ef22ed 100644 --- a/test/legacy_test/test_density_prior_box_op.py +++ b/test/legacy_test/test_density_prior_box_op.py @@ -14,9 +14,9 @@ import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestDensityPriorBoxOp(OpTest): diff --git a/test/legacy_test/test_dequantize_abs_max_op.py b/test/legacy_test/test_dequantize_abs_max_op.py index 86a8b686b8eed..9d4b8c450a940 100644 --- a/test/legacy_test/test_dequantize_abs_max_op.py +++ b/test/legacy_test/test_dequantize_abs_max_op.py @@ -14,9 +14,9 @@ import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def quantize_max_abs(x, max_range): diff --git a/test/legacy_test/test_dequantize_log_op.py b/test/legacy_test/test_dequantize_log_op.py index dc97f5dc2ec5a..0540957adef2b 100644 --- a/test/legacy_test/test_dequantize_log_op.py +++ b/test/legacy_test/test_dequantize_log_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def dequantize_log(x, dict_data): diff --git a/test/legacy_test/test_detection_map_op.py b/test/legacy_test/test_detection_map_op.py index e8c0e27211017..82baeeff7c5df 100644 --- a/test/legacy_test/test_detection_map_op.py +++ b/test/legacy_test/test_detection_map_op.py @@ -15,9 +15,9 @@ import collections import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestDetectionMAPOp(OpTest): diff --git a/test/legacy_test/test_determinant_op.py b/test/legacy_test/test_determinant_op.py index 8e50f0c5552ec..b619aefcfa5d2 100644 --- a/test/legacy_test/test_determinant_op.py +++ b/test/legacy_test/test_determinant_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_diag.py b/test/legacy_test/test_diag.py index 96d5f9e53db79..4027188e4cebb 100644 --- a/test/legacy_test/test_diag.py +++ b/test/legacy_test/test_diag.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base import Program, core, program_guard diff --git a/test/legacy_test/test_diag_embed.py b/test/legacy_test/test_diag_embed.py index 4e9e26d1b4ad4..28fbd255f5189 100644 --- a/test/legacy_test/test_diag_embed.py +++ b/test/legacy_test/test_diag_embed.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_diag_v2.py b/test/legacy_test/test_diag_v2.py index bbe146245bf14..22fa99d254098 100644 --- a/test/legacy_test/test_diag_v2.py +++ b/test/legacy_test/test_diag_v2.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_diagonal_op.py b/test/legacy_test/test_diagonal_op.py index 005a890b6ed07..ff87915324916 100644 --- a/test/legacy_test/test_diagonal_op.py +++ b/test/legacy_test/test_diagonal_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_digamma_op.py b/test/legacy_test/test_digamma_op.py index 04fbefc1dc8be..4a3d428f50c2d 100644 --- a/test/legacy_test/test_digamma_op.py +++ b/test/legacy_test/test_digamma_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from scipy.special import psi import paddle diff --git a/test/legacy_test/test_dist_op.py b/test/legacy_test/test_dist_op.py index be7f05b638d8a..581a6a0d62184 100644 --- a/test/legacy_test/test_dist_op.py +++ b/test/legacy_test/test_dist_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_distribute_fpn_proposals_op.py b/test/legacy_test/test_distribute_fpn_proposals_op.py index 8d30b70c47a45..3791d179a176a 100644 --- a/test/legacy_test/test_distribute_fpn_proposals_op.py +++ b/test/legacy_test/test_distribute_fpn_proposals_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_dot_op.py b/test/legacy_test/test_dot_op.py index 2fdaf3dd1598b..99295511c6b3e 100644 --- a/test/legacy_test/test_dot_op.py +++ b/test/legacy_test/test_dot_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_dpsgd_op.py b/test/legacy_test/test_dpsgd_op.py index ee68ba01be697..553d941d621ed 100644 --- a/test/legacy_test/test_dpsgd_op.py +++ b/test/legacy_test/test_dpsgd_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestDpsgdOp(OpTest): diff --git a/test/legacy_test/test_dropout_nd_op.py b/test/legacy_test/test_dropout_nd_op.py index 003977fe7ebe2..43feb9f499e7b 100644 --- a/test/legacy_test/test_dropout_nd_op.py +++ b/test/legacy_test/test_dropout_nd_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import _legacy_C_ops, base diff --git a/test/legacy_test/test_dropout_op.py b/test/legacy_test/test_dropout_op.py index dbfbfca070c31..dda614c459b55 100644 --- a/test/legacy_test/test_dropout_op.py +++ b/test/legacy_test/test_dropout_op.py @@ -13,10 +13,14 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + skip_check_grad_ci, +) import numpy as np import parameterized as param -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import _C_ops, base, static diff --git a/test/legacy_test/test_edit_distance_op.py b/test/legacy_test/test_edit_distance_op.py index 1bcedf8b99d2c..7ca24d18fff50 100644 --- a/test/legacy_test/test_edit_distance_op.py +++ b/test/legacy_test/test_edit_distance_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_eig_op.py b/test/legacy_test/test_eig_op.py index da28ca66bc000..6de0f599d2b96 100644 --- a/test/legacy_test/test_eig_op.py +++ b/test/legacy_test/test_eig_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_eigh_op.py b/test/legacy_test/test_eigh_op.py index dd45169696247..50d49daa904a7 100644 --- a/test/legacy_test/test_eigh_op.py +++ b/test/legacy_test/test_eigh_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_eigvals_op.py b/test/legacy_test/test_eigvals_op.py index 811eee672e1a5..c4eb2c812fcad 100644 --- a/test/legacy_test/test_eigvals_op.py +++ b/test/legacy_test/test_eigvals_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_eigvalsh_op.py b/test/legacy_test/test_eigvalsh_op.py index 6b8dd9b1d8d5b..e0437ce522efc 100644 --- a/test/legacy_test/test_eigvalsh_op.py +++ b/test/legacy_test/test_eigvalsh_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_einsum_op.py b/test/legacy_test/test_einsum_op.py index 8595094ee0fed..a1bf8136dd4ba 100644 --- a/test/legacy_test/test_einsum_op.py +++ b/test/legacy_test/test_einsum_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_einsum_v2.py b/test/legacy_test/test_einsum_v2.py index 4ce8b7519bc8a..4009518329d0e 100644 --- a/test/legacy_test/test_einsum_v2.py +++ b/test/legacy_test/test_einsum_v2.py @@ -596,7 +596,7 @@ def test_shape(self): class TestSimpleComplexGrad(unittest.TestCase): """ - EinsumOp support complex grad. but eager_op_test don't support numeric grad for complex dtype. + EinsumOp support complex grad. but op_test don't support numeric grad for complex dtype. """ def test_shape(self): diff --git a/test/legacy_test/test_elementwise_add_op.py b/test/legacy_test/test_elementwise_add_op.py index 8630ef593be64..a7693fa356c31 100644 --- a/test/legacy_test/test_elementwise_add_op.py +++ b/test/legacy_test/test_elementwise_add_op.py @@ -16,9 +16,13 @@ import os import unittest import warnings +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + skip_check_grad_ci, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_elementwise_div_op.py b/test/legacy_test/test_elementwise_div_op.py index 9a30a7f081918..5eb1534456d73 100644 --- a/test/legacy_test/test_elementwise_div_op.py +++ b/test/legacy_test/test_elementwise_div_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + skip_check_grad_ci, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_elementwise_floordiv_op.py b/test/legacy_test/test_elementwise_floordiv_op.py index 17a5d0f2ed91a..1e83f5116a564 100644 --- a/test/legacy_test/test_elementwise_floordiv_op.py +++ b/test/legacy_test/test_elementwise_floordiv_op.py @@ -15,9 +15,9 @@ import random import unittest from contextlib import contextmanager +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_elementwise_heaviside_op.py b/test/legacy_test/test_elementwise_heaviside_op.py index 5e02e6cd0a945..0357acfb6cd20 100644 --- a/test/legacy_test/test_elementwise_heaviside_op.py +++ b/test/legacy_test/test_elementwise_heaviside_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_elementwise_max_op.py b/test/legacy_test/test_elementwise_max_op.py index 4c94992cec075..9bb41356c46f4 100644 --- a/test/legacy_test/test_elementwise_max_op.py +++ b/test/legacy_test/test_elementwise_max_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + skip_check_grad_ci, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle.base import core diff --git a/test/legacy_test/test_elementwise_min_op.py b/test/legacy_test/test_elementwise_min_op.py index 9d2e5b76b9a48..38c741c9fde8b 100644 --- a/test/legacy_test/test_elementwise_min_op.py +++ b/test/legacy_test/test_elementwise_min_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + skip_check_grad_ci, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle.base import core diff --git a/test/legacy_test/test_elementwise_mod_op.py b/test/legacy_test/test_elementwise_mod_op.py index eb3ba740ea5e2..c65fa75bbf57a 100644 --- a/test/legacy_test/test_elementwise_mod_op.py +++ b/test/legacy_test/test_elementwise_mod_op.py @@ -14,14 +14,14 @@ import random import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, ) +import numpy as np + import paddle from paddle import base from paddle.base import core diff --git a/test/legacy_test/test_elementwise_mul_op.py b/test/legacy_test/test_elementwise_mul_op.py index 6da50f02c163d..c0ac26235fd91 100644 --- a/test/legacy_test/test_elementwise_mul_op.py +++ b/test/legacy_test/test_elementwise_mul_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + skip_check_grad_ci, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle.base import core diff --git a/test/legacy_test/test_elementwise_pow_op.py b/test/legacy_test/test_elementwise_pow_op.py index ce8a63355c5c7..4661608191ba5 100644 --- a/test/legacy_test/test_elementwise_pow_op.py +++ b/test/legacy_test/test_elementwise_pow_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + skip_check_grad_ci, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_elementwise_sub_op.py b/test/legacy_test/test_elementwise_sub_op.py index 87abcc2b07e57..91bb59095799f 100644 --- a/test/legacy_test/test_elementwise_sub_op.py +++ b/test/legacy_test/test_elementwise_sub_op.py @@ -15,9 +15,13 @@ import os import unittest import warnings +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + skip_check_grad_ci, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_empty_like_op.py b/test/legacy_test/test_empty_like_op.py index 6074e74ae30f1..2a111e5fd7bc0 100644 --- a/test/legacy_test/test_empty_like_op.py +++ b/test/legacy_test/test_empty_like_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import convert_uint16_to_float import numpy as np -from eager_op_test import convert_uint16_to_float import paddle from paddle.base import core diff --git a/test/legacy_test/test_empty_op.py b/test/legacy_test/test_empty_op.py index 19980e55d4718..11f8f0e2891fc 100644 --- a/test/legacy_test/test_empty_op.py +++ b/test/legacy_test/test_empty_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_erf_op.py b/test/legacy_test/test_erf_op.py index e7eb19b156a70..39b6410b0e334 100644 --- a/test/legacy_test/test_erf_op.py +++ b/test/legacy_test/test_erf_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from scipy.special import erf import paddle diff --git a/test/legacy_test/test_erfinv_op.py b/test/legacy_test/test_erfinv_op.py index 1a4f54230991a..a4a3783dff0f3 100644 --- a/test/legacy_test/test_erfinv_op.py +++ b/test/legacy_test/test_erfinv_op.py @@ -13,13 +13,13 @@ # limitations under the License. import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, ) + +import numpy as np from scipy.special import erfinv import paddle diff --git a/test/legacy_test/test_executor_return_tensor_not_overwriting.py b/test/legacy_test/test_executor_return_tensor_not_overwriting.py index 66fa0001ef030..1a52eebcf4d9e 100644 --- a/test/legacy_test/test_executor_return_tensor_not_overwriting.py +++ b/test/legacy_test/test_executor_return_tensor_not_overwriting.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_expand_as_op.py b/test/legacy_test/test_expand_as_op.py index 51bfb46dbb5ae..c5ab5ed18f3a2 100755 --- a/test/legacy_test/test_expand_as_op.py +++ b/test/legacy_test/test_expand_as_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def bcast(x, target_tensor): diff --git a/test/legacy_test/test_expand_as_v2_op.py b/test/legacy_test/test_expand_as_v2_op.py index 0f9d9d3da6477..c1ff3299a4fc4 100755 --- a/test/legacy_test/test_expand_as_v2_op.py +++ b/test/legacy_test/test_expand_as_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_expand_op.py b/test/legacy_test/test_expand_op.py index 90fb5222dfae3..6f579ac67defa 100644 --- a/test/legacy_test/test_expand_op.py +++ b/test/legacy_test/test_expand_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle import base diff --git a/test/legacy_test/test_expand_v2_op.py b/test/legacy_test/test_expand_v2_op.py index 9352b34f69aa0..7fe48d9e18e0b 100644 --- a/test/legacy_test/test_expand_v2_op.py +++ b/test/legacy_test/test_expand_v2_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_exponential_op.py b/test/legacy_test/test_exponential_op.py index 4debe069b8235..b919bdc55d493 100644 --- a/test/legacy_test/test_exponential_op.py +++ b/test/legacy_test/test_exponential_op.py @@ -13,14 +13,14 @@ # limitations under the License. import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, ) +import numpy as np + import paddle from paddle.base import core diff --git a/test/legacy_test/test_eye_op.py b/test/legacy_test/test_eye_op.py index a0340dc2c5f56..e78e84cf21c5c 100644 --- a/test/legacy_test/test_eye_op.py +++ b/test/legacy_test/test_eye_op.py @@ -14,9 +14,9 @@ import os import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_attribute_var import UnittestBase import paddle diff --git a/test/legacy_test/test_fake_dequantize_op.py b/test/legacy_test/test_fake_dequantize_op.py index d47ba3fd91b55..0aeffacc77e6a 100644 --- a/test/legacy_test/test_fake_dequantize_op.py +++ b/test/legacy_test/test_fake_dequantize_op.py @@ -14,9 +14,9 @@ import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def quantize_max_abs(x, max_range): diff --git a/test/legacy_test/test_fake_quantize_op.py b/test/legacy_test/test_fake_quantize_op.py index 9f89763731a38..f8fa40226fca2 100644 --- a/test/legacy_test/test_fake_quantize_op.py +++ b/test/legacy_test/test_fake_quantize_op.py @@ -15,9 +15,9 @@ import itertools import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def round_c_single_element(val): diff --git a/test/legacy_test/test_fc_op.py b/test/legacy_test/test_fc_op.py index a59720e9145c8..cc1c82604f014 100644 --- a/test/legacy_test/test_fc_op.py +++ b/test/legacy_test/test_fc_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_fill_any_like_op.py b/test/legacy_test/test_fill_any_like_op.py index 8ee39a13abfa6..8c6a999145713 100644 --- a/test/legacy_test/test_fill_any_like_op.py +++ b/test/legacy_test/test_fill_any_like_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle import paddle.framework.dtype as dtypes diff --git a/test/legacy_test/test_fill_any_op.py b/test/legacy_test/test_fill_any_op.py index b2325d06dfa37..4b9e0d87ac304 100644 --- a/test/legacy_test/test_fill_any_op.py +++ b/test/legacy_test/test_fill_any_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_fill_constant_op.py b/test/legacy_test/test_fill_constant_op.py index ee9d5e058c1e0..6e73d865dda5e 100644 --- a/test/legacy_test/test_fill_constant_op.py +++ b/test/legacy_test/test_fill_constant_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from op import Operator import paddle diff --git a/test/legacy_test/test_fill_diagonal_tensor_op.py b/test/legacy_test/test_fill_diagonal_tensor_op.py index be5f435b001ea..4fba4c01f9eee 100644 --- a/test/legacy_test/test_fill_diagonal_tensor_op.py +++ b/test/legacy_test/test_fill_diagonal_tensor_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_fill_op.py b/test/legacy_test/test_fill_op.py index 7c44c63662486..5b2dd642c9e96 100644 --- a/test/legacy_test/test_fill_op.py +++ b/test/legacy_test/test_fill_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from op import Operator import paddle diff --git a/test/legacy_test/test_fill_zeros_like2_op.py b/test/legacy_test/test_fill_zeros_like2_op.py index cbacc81d3985b..db33f5aef5e5b 100644 --- a/test/legacy_test/test_fill_zeros_like2_op.py +++ b/test/legacy_test/test_fill_zeros_like2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle.base.framework import convert_np_dtype_to_dtype_ diff --git a/test/legacy_test/test_fill_zeros_like_op.py b/test/legacy_test/test_fill_zeros_like_op.py index 3d88f679e2709..10ca1c1e80725 100644 --- a/test/legacy_test/test_fill_zeros_like_op.py +++ b/test/legacy_test/test_fill_zeros_like_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestFillZerosLikeOp(OpTest): diff --git a/test/legacy_test/test_filter_by_instag_op.py b/test/legacy_test/test_filter_by_instag_op.py index 1c8d4fc6ca8e2..ba07fa8c2c33f 100644 --- a/test/legacy_test/test_filter_by_instag_op.py +++ b/test/legacy_test/test_filter_by_instag_op.py @@ -14,9 +14,9 @@ """This is unit test of Test filter_instag Op.""" import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest """This is Test Case 1""" diff --git a/test/legacy_test/test_flatten2_op.py b/test/legacy_test/test_flatten2_op.py index 1981b3f4ab3b7..20e6ab2c882d1 100644 --- a/test/legacy_test/test_flatten2_op.py +++ b/test/legacy_test/test_flatten2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestFlattenOp(OpTest): diff --git a/test/legacy_test/test_flatten_contiguous_range_op.py b/test/legacy_test/test_flatten_contiguous_range_op.py index f8b76771b4e65..021c65831133b 100644 --- a/test/legacy_test/test_flatten_contiguous_range_op.py +++ b/test/legacy_test/test_flatten_contiguous_range_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_flatten_op.py b/test/legacy_test/test_flatten_op.py index d3756946b1d89..82af04efee16e 100644 --- a/test/legacy_test/test_flatten_op.py +++ b/test/legacy_test/test_flatten_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle diff --git a/test/legacy_test/test_flip.py b/test/legacy_test/test_flip.py index d4125049f90eb..bdc8f7f406c87 100644 --- a/test/legacy_test/test_flip.py +++ b/test/legacy_test/test_flip.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_fmax_op.py b/test/legacy_test/test_fmax_op.py index 0ea78cb41cc5e..5aba58228be20 100644 --- a/test/legacy_test/test_fmax_op.py +++ b/test/legacy_test/test_fmax_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_fmin_op.py b/test/legacy_test/test_fmin_op.py index 26e2c585355ca..1ed9cc6a06397 100644 --- a/test/legacy_test/test_fmin_op.py +++ b/test/legacy_test/test_fmin_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_fold_op.py b/test/legacy_test/test_fold_op.py index d47f32f32443e..e5f2213c7df0e 100644 --- a/test/legacy_test/test_fold_op.py +++ b/test/legacy_test/test_fold_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_frame_op.py b/test/legacy_test/test_frame_op.py index 6f96d952cc63e..dbde977bc47be 100644 --- a/test/legacy_test/test_frame_op.py +++ b/test/legacy_test/test_frame_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from numpy.lib.stride_tricks import as_strided import paddle diff --git a/test/legacy_test/test_fsp_op.py b/test/legacy_test/test_fsp_op.py index 5628e5a52dcaf..d56d5a6fb891e 100644 --- a/test/legacy_test/test_fsp_op.py +++ b/test/legacy_test/test_fsp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def fsp_matrix(a, b): diff --git a/test/legacy_test/test_ftrl_op.py b/test/legacy_test/test_ftrl_op.py index 2659eb423905f..43ea434570d70 100644 --- a/test/legacy_test/test_ftrl_op.py +++ b/test/legacy_test/test_ftrl_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from op import Operator from paddle.base import core diff --git a/test/legacy_test/test_full_like_op.py b/test/legacy_test/test_full_like_op.py index aabc5d642f9c2..0e2f09b940156 100644 --- a/test/legacy_test/test_full_like_op.py +++ b/test/legacy_test/test_full_like_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle import paddle.framework.dtype as dtypes diff --git a/test/legacy_test/test_fused_adam_op.py b/test/legacy_test/test_fused_adam_op.py index 27829957962a7..d833438cb1535 100644 --- a/test/legacy_test/test_fused_adam_op.py +++ b/test/legacy_test/test_fused_adam_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_fused_attention_op.py b/test/legacy_test/test_fused_attention_op.py index 271b4ab6bec33..6c73b0fc15208 100644 --- a/test/legacy_test/test_fused_attention_op.py +++ b/test/legacy_test/test_fused_attention_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle import paddle.incubate.nn.functional as incubate_f diff --git a/test/legacy_test/test_fused_bias_act_op.py b/test/legacy_test/test_fused_bias_act_op.py index 054932f13f57d..3aed655c66360 100644 --- a/test/legacy_test/test_fused_bias_act_op.py +++ b/test/legacy_test/test_fused_bias_act_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import convert_float_to_uint16 import numpy as np -from eager_op_test import convert_float_to_uint16 from scipy.special import erf, expit import paddle diff --git a/test/legacy_test/test_fused_bias_dropout_residual_layer_norm_op.py b/test/legacy_test/test_fused_bias_dropout_residual_layer_norm_op.py index 87c7bcf4db908..4435c2262b8a6 100644 --- a/test/legacy_test/test_fused_bias_dropout_residual_layer_norm_op.py +++ b/test/legacy_test/test_fused_bias_dropout_residual_layer_norm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle import paddle.incubate.nn.functional as incubate_f diff --git a/test/legacy_test/test_fused_ec_moe_op.py b/test/legacy_test/test_fused_ec_moe_op.py index 3ac780806c911..64e459f5dd1c8 100644 --- a/test/legacy_test/test_fused_ec_moe_op.py +++ b/test/legacy_test/test_fused_ec_moe_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_fused_elemwise_activation_op.py b/test/legacy_test/test_fused_elemwise_activation_op.py index 28cffdcabd579..1b937f865ce0a 100644 --- a/test/legacy_test/test_fused_elemwise_activation_op.py +++ b/test/legacy_test/test_fused_elemwise_activation_op.py @@ -14,9 +14,9 @@ import unittest from functools import partial +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_fused_emb_seq_pool_op.py b/test/legacy_test/test_fused_emb_seq_pool_op.py index 4d2e774e5465c..5e4439d643a9d 100644 --- a/test/legacy_test/test_fused_emb_seq_pool_op.py +++ b/test/legacy_test/test_fused_emb_seq_pool_op.py @@ -14,9 +14,13 @@ import platform import unittest +from test.legacy_test.op_test import ( + OpTest, + paddle_static_guard, + skip_check_grad_ci, +) import numpy as np -from eager_op_test import OpTest, paddle_static_guard, skip_check_grad_ci import paddle import paddle.version as ver diff --git a/test/legacy_test/test_fused_embedding_fc_lstm_op.py b/test/legacy_test/test_fused_embedding_fc_lstm_op.py index cd44b1d74e772..cf6e1f6c32888 100644 --- a/test/legacy_test/test_fused_embedding_fc_lstm_op.py +++ b/test/legacy_test/test_fused_embedding_fc_lstm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_lstm_op import ACTIVATION, lstm diff --git a/test/legacy_test/test_fused_fc_elementwise_layernorm_op.py b/test/legacy_test/test_fused_fc_elementwise_layernorm_op.py index 330931fdc4170..174213ee40d09 100644 --- a/test/legacy_test/test_fused_fc_elementwise_layernorm_op.py +++ b/test/legacy_test/test_fused_fc_elementwise_layernorm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_fc_op import MatrixGenerate, fc_refer from test_layer_norm_op import _reference_layer_norm_naive diff --git a/test/legacy_test/test_fused_feedforward_op.py b/test/legacy_test/test_fused_feedforward_op.py index 6aba4784ff6f6..4b32535e6ab9e 100644 --- a/test/legacy_test/test_fused_feedforward_op.py +++ b/test/legacy_test/test_fused_feedforward_op.py @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle import paddle.incubate.nn.functional as incubate_f diff --git a/test/legacy_test/test_fused_gate_attention_op.py b/test/legacy_test/test_fused_gate_attention_op.py index 7bb5790f0c766..66b6babbdc1b3 100644 --- a/test/legacy_test/test_fused_gate_attention_op.py +++ b/test/legacy_test/test_fused_gate_attention_op.py @@ -18,13 +18,13 @@ os.environ['FLAGS_new_einsum'] = "0" import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, ) + +import numpy as np from test_sparse_attention_op import get_cuda_version import paddle diff --git a/test/legacy_test/test_fused_gemm_epilogue_grad_op.py b/test/legacy_test/test_fused_gemm_epilogue_grad_op.py index 0014f5a440cc9..9450d5b325c21 100644 --- a/test/legacy_test/test_fused_gemm_epilogue_grad_op.py +++ b/test/legacy_test/test_fused_gemm_epilogue_grad_op.py @@ -14,9 +14,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci import paddle from paddle.base import core diff --git a/test/legacy_test/test_fused_gemm_epilogue_op.py b/test/legacy_test/test_fused_gemm_epilogue_op.py index 6064536ec4a90..5cbfebd89c323 100644 --- a/test/legacy_test/test_fused_gemm_epilogue_op.py +++ b/test/legacy_test/test_fused_gemm_epilogue_op.py @@ -14,9 +14,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + skip_check_grad_ci, + skip_check_inplace_ci, +) import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci, skip_check_inplace_ci import paddle from paddle.base import core diff --git a/test/legacy_test/test_fused_multi_transformer_op.py b/test/legacy_test/test_fused_multi_transformer_op.py index dbe4fa6f014e8..20c0b7c28e353 100644 --- a/test/legacy_test/test_fused_multi_transformer_op.py +++ b/test/legacy_test/test_fused_multi_transformer_op.py @@ -14,9 +14,9 @@ import random import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_fused_multihead_matmul_op.py b/test/legacy_test/test_fused_multihead_matmul_op.py index ebf73fd6353fb..bec76fd04c35e 100644 --- a/test/legacy_test/test_fused_multihead_matmul_op.py +++ b/test/legacy_test/test_fused_multihead_matmul_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_fused_scale_bias_relu_conv_bnstats_op.py b/test/legacy_test/test_fused_scale_bias_relu_conv_bnstats_op.py index f8cbc8c387dc7..20de35a75ac52 100644 --- a/test/legacy_test/test_fused_scale_bias_relu_conv_bnstats_op.py +++ b/test/legacy_test/test_fused_scale_bias_relu_conv_bnstats_op.py @@ -14,9 +14,9 @@ import unittest +from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci import paddle from paddle import nn diff --git a/test/legacy_test/test_fused_token_prune_op.py b/test/legacy_test/test_fused_token_prune_op.py index 1b66830c1b15a..bc80681ae9f49 100644 --- a/test/legacy_test/test_fused_token_prune_op.py +++ b/test/legacy_test/test_fused_token_prune_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle.framework import core diff --git a/test/legacy_test/test_fusion_gru_op.py b/test/legacy_test/test_fusion_gru_op.py index 661b4b0eec0a7..6452901ee9074 100644 --- a/test/legacy_test/test_fusion_gru_op.py +++ b/test/legacy_test/test_fusion_gru_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_fusion_lstm_op import ACTIVATION, fc from test_gru_op import gru diff --git a/test/legacy_test/test_fusion_lstm_op.py b/test/legacy_test/test_fusion_lstm_op.py index b9cda032fd444..fd1ab8bb6f0c4 100644 --- a/test/legacy_test/test_fusion_lstm_op.py +++ b/test/legacy_test/test_fusion_lstm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_lstm_op import ACTIVATION, lstm diff --git a/test/legacy_test/test_fusion_repeated_fc_relu_op.py b/test/legacy_test/test_fusion_repeated_fc_relu_op.py index 03cb6bd3b822c..359915ab2b1d5 100644 --- a/test/legacy_test/test_fusion_repeated_fc_relu_op.py +++ b/test/legacy_test/test_fusion_repeated_fc_relu_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_fc_op import MatrixGenerate, fc_refer diff --git a/test/legacy_test/test_fusion_seqconv_eltadd_relu_op.py b/test/legacy_test/test_fusion_seqconv_eltadd_relu_op.py index 974aa1ba3a323..8566c8ff89810 100644 --- a/test/legacy_test/test_fusion_seqconv_eltadd_relu_op.py +++ b/test/legacy_test/test_fusion_seqconv_eltadd_relu_op.py @@ -14,9 +14,9 @@ import sys import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest sys.path.append("../../test/sequence") from test_sequence_conv import seqconv diff --git a/test/legacy_test/test_fusion_seqexpand_concat_fc_op.py b/test/legacy_test/test_fusion_seqexpand_concat_fc_op.py index 4bf126100d336..2257c143940d2 100644 --- a/test/legacy_test/test_fusion_seqexpand_concat_fc_op.py +++ b/test/legacy_test/test_fusion_seqexpand_concat_fc_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_fusion_lstm_op import ACTIVATION, fc diff --git a/test/legacy_test/test_fusion_seqpool_concat_op.py b/test/legacy_test/test_fusion_seqpool_concat_op.py index e3cf2a54a93d5..9f24677c8f643 100644 --- a/test/legacy_test/test_fusion_seqpool_concat_op.py +++ b/test/legacy_test/test_fusion_seqpool_concat_op.py @@ -14,9 +14,9 @@ import sys import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest sys.path.append("../../test/sequence") from test_sequence_pool import ( diff --git a/test/legacy_test/test_fusion_seqpool_cvm_concat_op.py b/test/legacy_test/test_fusion_seqpool_cvm_concat_op.py index dc9efeec03790..ba1f44171b127 100644 --- a/test/legacy_test/test_fusion_seqpool_cvm_concat_op.py +++ b/test/legacy_test/test_fusion_seqpool_cvm_concat_op.py @@ -14,9 +14,9 @@ import sys import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest sys.path.append("../../test/sequence") from test_cvm_op import cvm_compute diff --git a/test/legacy_test/test_fusion_squared_mat_sub_op.py b/test/legacy_test/test_fusion_squared_mat_sub_op.py index ca58effebc2ef..d65c066b0263c 100644 --- a/test/legacy_test/test_fusion_squared_mat_sub_op.py +++ b/test/legacy_test/test_fusion_squared_mat_sub_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestFusionSquaredMatSubOp(OpTest): diff --git a/test/legacy_test/test_fusion_transpose_flatten_concat_op.py b/test/legacy_test/test_fusion_transpose_flatten_concat_op.py index cb461ec073651..99c9e370df5f6 100644 --- a/test/legacy_test/test_fusion_transpose_flatten_concat_op.py +++ b/test/legacy_test/test_fusion_transpose_flatten_concat_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_gather_nd_op.py b/test/legacy_test/test_gather_nd_op.py index d934b047ae149..73dc224c62d48 100644 --- a/test/legacy_test/test_gather_nd_op.py +++ b/test/legacy_test/test_gather_nd_op.py @@ -13,14 +13,14 @@ # limitations under the License. import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, ) +import numpy as np + import paddle from paddle import base from paddle.base import core diff --git a/test/legacy_test/test_gather_op.py b/test/legacy_test/test_gather_op.py index 8bc012883fc65..ac88bc72c4c37 100644 --- a/test/legacy_test/test_gather_op.py +++ b/test/legacy_test/test_gather_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_gather_tree_op.py b/test/legacy_test/test_gather_tree_op.py index b59e30098aecc..a11e9a8ee66ab 100644 --- a/test/legacy_test/test_gather_tree_op.py +++ b/test/legacy_test/test_gather_tree_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base.framework import Program, program_guard diff --git a/test/legacy_test/test_gaussian_random_op.py b/test/legacy_test/test_gaussian_random_op.py index 293e79d05fcea..f6b4ca1989f92 100644 --- a/test/legacy_test/test_gaussian_random_op.py +++ b/test/legacy_test/test_gaussian_random_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_uint16_to_float, + paddle_static_guard, +) import numpy as np -from eager_op_test import OpTest, convert_uint16_to_float, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_generate_proposal_labels_op.py b/test/legacy_test/test_generate_proposal_labels_op.py index f8cc3185fd43a..964f36086a421 100644 --- a/test/legacy_test/test_generate_proposal_labels_op.py +++ b/test/legacy_test/test_generate_proposal_labels_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def generate_proposal_labels_in_python( diff --git a/test/legacy_test/test_generate_proposals_op.py b/test/legacy_test/test_generate_proposals_op.py index 05e167d253018..087def7740a34 100644 --- a/test/legacy_test/test_generate_proposals_op.py +++ b/test/legacy_test/test_generate_proposals_op.py @@ -15,9 +15,9 @@ import copy import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_anchor_generator_op import anchor_generator_in_python import paddle diff --git a/test/legacy_test/test_generate_proposals_v2_op.py b/test/legacy_test/test_generate_proposals_v2_op.py index 48f00c57486b2..7474b5ea8fd5d 100644 --- a/test/legacy_test/test_generate_proposals_v2_op.py +++ b/test/legacy_test/test_generate_proposals_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_anchor_generator_op import anchor_generator_in_python from test_generate_proposals_op import box_coder, clip_tiled_boxes, nms diff --git a/test/legacy_test/test_graph_send_recv_op.py b/test/legacy_test/test_graph_send_recv_op.py index ec7b994eec4c0..03dd63539383d 100644 --- a/test/legacy_test/test_graph_send_recv_op.py +++ b/test/legacy_test/test_graph_send_recv_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_graph_send_ue_recv_op.py b/test/legacy_test/test_graph_send_ue_recv_op.py index 10ce31514df36..384a543b83fac 100644 --- a/test/legacy_test/test_graph_send_ue_recv_op.py +++ b/test/legacy_test/test_graph_send_ue_recv_op.py @@ -14,9 +14,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_graph_send_uv_op.py b/test/legacy_test/test_graph_send_uv_op.py index 914901146a96d..6285fe23af95d 100644 --- a/test/legacy_test/test_graph_send_uv_op.py +++ b/test/legacy_test/test_graph_send_uv_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_grid_sampler_op.py b/test/legacy_test/test_grid_sampler_op.py index cbc40b12f59ba..f1f5b651e4669 100644 --- a/test/legacy_test/test_grid_sampler_op.py +++ b/test/legacy_test/test_grid_sampler_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci import paddle from paddle.base import core diff --git a/test/legacy_test/test_group_norm_op.py b/test/legacy_test/test_group_norm_op.py index ef0c030f8f93e..2834b63436a4c 100644 --- a/test/legacy_test/test_group_norm_op.py +++ b/test/legacy_test/test_group_norm_op.py @@ -13,16 +13,16 @@ # limitations under the License. import unittest - -import numpy as np -import parameterized as param -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, paddle_static_guard, skip_check_grad_ci, ) + +import numpy as np +import parameterized as param from testsuite import create_op import paddle diff --git a/test/legacy_test/test_gru_op.py b/test/legacy_test/test_gru_op.py index 8c202d16359d8..5fd772eccc2e5 100644 --- a/test/legacy_test/test_gru_op.py +++ b/test/legacy_test/test_gru_op.py @@ -14,9 +14,9 @@ import functools import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_lstm_op import ACTIVATION diff --git a/test/legacy_test/test_gru_rnn_op.py b/test/legacy_test/test_gru_rnn_op.py index 4a4420a8c335d..166f17fe99c97 100644 --- a/test/legacy_test/test_gru_rnn_op.py +++ b/test/legacy_test/test_gru_rnn_op.py @@ -15,9 +15,9 @@ import random import sys import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_gru_unit_op.py b/test/legacy_test/test_gru_unit_op.py index 1359583ae1ade..6859faeb22d69 100644 --- a/test/legacy_test/test_gru_unit_op.py +++ b/test/legacy_test/test_gru_unit_op.py @@ -14,9 +14,9 @@ import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle import base diff --git a/test/legacy_test/test_gumbel_softmax_op.py b/test/legacy_test/test_gumbel_softmax_op.py index 608b73739c902..68a12ddbedecb 100644 --- a/test/legacy_test/test_gumbel_softmax_op.py +++ b/test/legacy_test/test_gumbel_softmax_op.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_hash_op.py b/test/legacy_test/test_hash_op.py index ad0e202b7904a..d438755f91575 100644 --- a/test/legacy_test/test_hash_op.py +++ b/test/legacy_test/test_hash_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestHashOp(OpTest): diff --git a/test/legacy_test/test_hinge_loss_op.py b/test/legacy_test/test_hinge_loss_op.py index b8c0fdb284a6c..a1c47d24f7bc9 100644 --- a/test/legacy_test/test_hinge_loss_op.py +++ b/test/legacy_test/test_hinge_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestHingeLossOp(OpTest): diff --git a/test/legacy_test/test_histogram_op.py b/test/legacy_test/test_histogram_op.py index 8ca5b4dd500da..b00f38ccbc6ef 100644 --- a/test/legacy_test/test_histogram_op.py +++ b/test/legacy_test/test_histogram_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_hsigmoid_op.py b/test/legacy_test/test_hsigmoid_op.py index 6144285586055..fe961f8004451 100644 --- a/test/legacy_test/test_hsigmoid_op.py +++ b/test/legacy_test/test_hsigmoid_op.py @@ -14,9 +14,9 @@ import math import unittest +from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_huber_loss_op.py b/test/legacy_test/test_huber_loss_op.py index 5b74de590dab9..62e9b91a9e3e8 100644 --- a/test/legacy_test/test_huber_loss_op.py +++ b/test/legacy_test/test_huber_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_i0_op.py b/test/legacy_test/test_i0_op.py index 6019a868cf0d2..30db2dc119c39 100644 --- a/test/legacy_test/test_i0_op.py +++ b/test/legacy_test/test_i0_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from scipy import special import paddle diff --git a/test/legacy_test/test_i0e_op.py b/test/legacy_test/test_i0e_op.py index 8a3df4ab77afd..283a742e6f742 100644 --- a/test/legacy_test/test_i0e_op.py +++ b/test/legacy_test/test_i0e_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from scipy import special import paddle diff --git a/test/legacy_test/test_i1_op.py b/test/legacy_test/test_i1_op.py index d4ab42cd4b4fa..7e138f36edeee 100644 --- a/test/legacy_test/test_i1_op.py +++ b/test/legacy_test/test_i1_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from scipy import special import paddle diff --git a/test/legacy_test/test_i1e_op.py b/test/legacy_test/test_i1e_op.py index 49379918b2666..9075fd5bfe290 100644 --- a/test/legacy_test/test_i1e_op.py +++ b/test/legacy_test/test_i1e_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from scipy import special import paddle diff --git a/test/legacy_test/test_identity_loss_op.py b/test/legacy_test/test_identity_loss_op.py index 6fc0ce658ff41..aa52210b69253 100644 --- a/test/legacy_test/test_identity_loss_op.py +++ b/test/legacy_test/test_identity_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_im2sequence_op.py b/test/legacy_test/test_im2sequence_op.py index a001c850f60d2..f60bdce148027 100644 --- a/test/legacy_test/test_im2sequence_op.py +++ b/test/legacy_test/test_im2sequence_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci def get_output_shape(attrs, in_shape, img_real_size): diff --git a/test/legacy_test/test_index_add_op.py b/test/legacy_test/test_index_add_op.py index 39279305a15c7..052e7b323bffa 100644 --- a/test/legacy_test/test_index_add_op.py +++ b/test/legacy_test/test_index_add_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import Program, core diff --git a/test/legacy_test/test_index_sample_op.py b/test/legacy_test/test_index_sample_op.py index 569e27203dd24..0c5bc08391b2e 100755 --- a/test/legacy_test/test_index_sample_op.py +++ b/test/legacy_test/test_index_sample_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_index_select_op.py b/test/legacy_test/test_index_select_op.py index 7f6eac1a9423d..7902ff96a3ded 100644 --- a/test/legacy_test/test_index_select_op.py +++ b/test/legacy_test/test_index_select_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_instance_norm_op.py b/test/legacy_test/test_instance_norm_op.py index b4bd1401ddea9..0ff8f863b5e64 100644 --- a/test/legacy_test/test_instance_norm_op.py +++ b/test/legacy_test/test_instance_norm_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np import parameterized as param -from eager_op_test import OpTest import paddle from paddle import base, nn diff --git a/test/legacy_test/test_instance_norm_op_v2.py b/test/legacy_test/test_instance_norm_op_v2.py index 9b59b2d813616..c7d829a0845d6 100644 --- a/test/legacy_test/test_instance_norm_op_v2.py +++ b/test/legacy_test/test_instance_norm_op_v2.py @@ -14,9 +14,9 @@ import os import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_inverse_op.py b/test/legacy_test/test_inverse_op.py index da4c74e62814f..482ce0b31f350 100644 --- a/test/legacy_test/test_inverse_op.py +++ b/test/legacy_test/test_inverse_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_iou_similarity_op.py b/test/legacy_test/test_iou_similarity_op.py index 8925a45614886..59c2f8bc6fcf2 100644 --- a/test/legacy_test/test_iou_similarity_op.py +++ b/test/legacy_test/test_iou_similarity_op.py @@ -13,8 +13,8 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest -from eager_op_test import OpTest from numpy import random diff --git a/test/legacy_test/test_is_empty_op.py b/test/legacy_test/test_is_empty_op.py index b1e212be74755..eabf9d1a297d8 100644 --- a/test/legacy_test/test_is_empty_op.py +++ b/test/legacy_test/test_is_empty_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_isclose_op.py b/test/legacy_test/test_isclose_op.py index 5f17a9b6e7055..006764fab8bfa 100644 --- a/test/legacy_test/test_isclose_op.py +++ b/test/legacy_test/test_isclose_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_isfinite_op.py b/test/legacy_test/test_isfinite_op.py index 74bb329a8df39..0b4d0e4954342 100755 --- a/test/legacy_test/test_isfinite_op.py +++ b/test/legacy_test/test_isfinite_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from paddle.base import core diff --git a/test/legacy_test/test_kldiv_loss_op.py b/test/legacy_test/test_kldiv_loss_op.py index 02dc6151d32b8..ca3d08aca426d 100644 --- a/test/legacy_test/test_kldiv_loss_op.py +++ b/test/legacy_test/test_kldiv_loss_op.py @@ -12,9 +12,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle from paddle.nn.functional import kl_div diff --git a/test/legacy_test/test_kron_op.py b/test/legacy_test/test_kron_op.py index d5eac58233f12..2d8c6d30e3842 100644 --- a/test/legacy_test/test_kron_op.py +++ b/test/legacy_test/test_kron_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle import paddle.base.dygraph as dg diff --git a/test/legacy_test/test_kthvalue_op.py b/test/legacy_test/test_kthvalue_op.py index 463ee34b880e8..7f1de918ccd20 100644 --- a/test/legacy_test/test_kthvalue_op.py +++ b/test/legacy_test/test_kthvalue_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_l1_norm_op.py b/test/legacy_test/test_l1_norm_op.py index 39e46bd2a9221..6d1866184ee62 100644 --- a/test/legacy_test/test_l1_norm_op.py +++ b/test/legacy_test/test_l1_norm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestL1NormOp(OpTest): diff --git a/test/legacy_test/test_label_smooth_op.py b/test/legacy_test/test_label_smooth_op.py index d7cd2169a8ba7..ac4aa603aed0e 100644 --- a/test/legacy_test/test_label_smooth_op.py +++ b/test/legacy_test/test_label_smooth_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_lamb_op.py b/test/legacy_test/test_lamb_op.py index 535b09bd8a448..08564db3e2e1d 100644 --- a/test/legacy_test/test_lamb_op.py +++ b/test/legacy_test/test_lamb_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from op import Operator import paddle diff --git a/test/legacy_test/test_layer_norm_op.py b/test/legacy_test/test_layer_norm_op.py index 3eb4dbe42cc01..785e4142af3e4 100644 --- a/test/legacy_test/test_layer_norm_op.py +++ b/test/legacy_test/test_layer_norm_op.py @@ -15,14 +15,14 @@ import unittest from functools import reduce from operator import mul - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, _set_use_system_allocator, convert_float_to_uint16, ) +import numpy as np + import paddle import paddle.nn.functional as F from paddle import base diff --git a/test/legacy_test/test_lerp_op.py b/test/legacy_test/test_lerp_op.py index f85062940e31d..4d4e9c706e24d 100644 --- a/test/legacy_test/test_lerp_op.py +++ b/test/legacy_test/test_lerp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_lgamma_op.py b/test/legacy_test/test_lgamma_op.py index 3fbbb45f235d6..eaabac71a2b0c 100644 --- a/test/legacy_test/test_lgamma_op.py +++ b/test/legacy_test/test_lgamma_op.py @@ -14,9 +14,9 @@ import math import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from scipy import special import paddle diff --git a/test/legacy_test/test_linear_chain_crf_op.py b/test/legacy_test/test_linear_chain_crf_op.py index da33c3cdc228c..064af1df856e6 100755 --- a/test/legacy_test/test_linear_chain_crf_op.py +++ b/test/legacy_test/test_linear_chain_crf_op.py @@ -14,9 +14,9 @@ import random import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class LinearChainCrfForward: diff --git a/test/legacy_test/test_linear_interp_op.py b/test/legacy_test/test_linear_interp_op.py index d7b6848c3cbe5..f944a0cc28d98 100755 --- a/test/legacy_test/test_linear_interp_op.py +++ b/test/legacy_test/test_linear_interp_op.py @@ -14,9 +14,9 @@ import platform import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_linear_interp_v2_op.py b/test/legacy_test/test_linear_interp_v2_op.py index 87cf56e3eb1b4..ef6e07420abd4 100755 --- a/test/legacy_test/test_linear_interp_v2_op.py +++ b/test/legacy_test/test_linear_interp_v2_op.py @@ -14,9 +14,13 @@ import platform import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + paddle_static_guard, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_linspace.py b/test/legacy_test/test_linspace.py index 88a2ef57acc5d..8f8df749252ac 100644 --- a/test/legacy_test/test_linspace.py +++ b/test/legacy_test/test_linspace.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + paddle_static_guard, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_locality_aware_nms_op.py b/test/legacy_test/test_locality_aware_nms_op.py index d08039ee44040..aba3eba8c7df4 100644 --- a/test/legacy_test/test_locality_aware_nms_op.py +++ b/test/legacy_test/test_locality_aware_nms_op.py @@ -14,9 +14,9 @@ import copy import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_multiclass_nms_op import iou diff --git a/test/legacy_test/test_lod_reset_op.py b/test/legacy_test/test_lod_reset_op.py index d0078653f9d78..85158eec68c94 100644 --- a/test/legacy_test/test_lod_reset_op.py +++ b/test/legacy_test/test_lod_reset_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestLodResetOpByAttr(OpTest): diff --git a/test/legacy_test/test_log_loss_op.py b/test/legacy_test/test_log_loss_op.py index cb1b50b49a853..3e2bd361da807 100644 --- a/test/legacy_test/test_log_loss_op.py +++ b/test/legacy_test/test_log_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle.nn import functional as F diff --git a/test/legacy_test/test_log_softmax.py b/test/legacy_test/test_log_softmax.py index 70da5577485ff..0ee243ffe6e70 100644 --- a/test/legacy_test/test_log_softmax.py +++ b/test/legacy_test/test_log_softmax.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_logcumsumexp_op.py b/test/legacy_test/test_logcumsumexp_op.py index ab0df6cf73a19..3dc5913c45ca3 100644 --- a/test/legacy_test/test_logcumsumexp_op.py +++ b/test/legacy_test/test_logcumsumexp_op.py @@ -14,14 +14,14 @@ import itertools import unittest -from typing import Optional - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, ) +from typing import Optional + +import numpy as np import paddle from paddle import base diff --git a/test/legacy_test/test_logical_op.py b/test/legacy_test/test_logical_op.py index 10bf33e40a5e0..067b352138aad 100755 --- a/test/legacy_test/test_logical_op.py +++ b/test/legacy_test/test_logical_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import convert_float_to_uint16 import numpy as np -from eager_op_test import convert_float_to_uint16 import paddle from paddle.framework import in_dynamic_mode diff --git a/test/legacy_test/test_logit_op.py b/test/legacy_test/test_logit_op.py index e2123bfa8f9c5..31b06dd8f2d40 100644 --- a/test/legacy_test/test_logit_op.py +++ b/test/legacy_test/test_logit_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_logspace.py b/test/legacy_test/test_logspace.py index 402442ca4bc06..11fcefacf4c67 100644 --- a/test/legacy_test/test_logspace.py +++ b/test/legacy_test/test_logspace.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_logsumexp.py b/test/legacy_test/test_logsumexp.py index 44c958fef6323..f2463e5e761a3 100644 --- a/test/legacy_test/test_logsumexp.py +++ b/test/legacy_test/test_logsumexp.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_lookup_table_bf16_op.py b/test/legacy_test/test_lookup_table_bf16_op.py index 942a9cc3ccd74..a2abe8428c793 100644 --- a/test/legacy_test/test_lookup_table_bf16_op.py +++ b/test/legacy_test/test_lookup_table_bf16_op.py @@ -13,14 +13,14 @@ # limitations under the License. import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, skip_check_grad_ci, ) + +import numpy as np from op import Operator import paddle diff --git a/test/legacy_test/test_lookup_table_dequant_op.py b/test/legacy_test/test_lookup_table_dequant_op.py index a2799ea3ca3fd..33fbf87016a23 100644 --- a/test/legacy_test/test_lookup_table_dequant_op.py +++ b/test/legacy_test/test_lookup_table_dequant_op.py @@ -14,9 +14,9 @@ import struct import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestLookupTableDequantOp(OpTest): diff --git a/test/legacy_test/test_lookup_table_op.py b/test/legacy_test/test_lookup_table_op.py index 8a3eb0ef2da1f..d64621cc1060e 100644 --- a/test/legacy_test/test_lookup_table_op.py +++ b/test/legacy_test/test_lookup_table_op.py @@ -13,14 +13,14 @@ # limitations under the License. import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, check_out_dtype, paddle_static_guard, skip_check_grad_ci, ) + +import numpy as np from op import Operator import paddle diff --git a/test/legacy_test/test_lookup_table_v2_bf16_op.py b/test/legacy_test/test_lookup_table_v2_bf16_op.py index 13b15053a6e67..c08423cc2fec6 100644 --- a/test/legacy_test/test_lookup_table_v2_bf16_op.py +++ b/test/legacy_test/test_lookup_table_v2_bf16_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import convert_uint16_to_float import numpy as np -from eager_op_test import convert_uint16_to_float from test_lookup_table_bf16_op import ( TestLookupTableBF16Op, TestLookupTableBF16OpIds4D, diff --git a/test/legacy_test/test_lookup_table_v2_op.py b/test/legacy_test/test_lookup_table_v2_op.py index 5000c3486b5e6..03e3a63147539 100644 --- a/test/legacy_test/test_lookup_table_v2_op.py +++ b/test/legacy_test/test_lookup_table_v2_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + skip_check_grad_ci, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci from op import Operator import paddle diff --git a/test/legacy_test/test_lrn_op.py b/test/legacy_test/test_lrn_op.py index 2e65b92ebe532..d957135c95078 100644 --- a/test/legacy_test/test_lrn_op.py +++ b/test/legacy_test/test_lrn_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_lstm_cudnn_op.py b/test/legacy_test/test_lstm_cudnn_op.py index 20b0066dd55a7..df94f8f312115 100644 --- a/test/legacy_test/test_lstm_cudnn_op.py +++ b/test/legacy_test/test_lstm_cudnn_op.py @@ -15,9 +15,9 @@ import math import random import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_lstm_op.py b/test/legacy_test/test_lstm_op.py index 833c4a311372d..1862871170ed6 100644 --- a/test/legacy_test/test_lstm_op.py +++ b/test/legacy_test/test_lstm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest SIGMOID_THRESHOLD_MIN = -40.0 SIGMOID_THRESHOLD_MAX = 13.0 diff --git a/test/legacy_test/test_lstm_unit_op.py b/test/legacy_test/test_lstm_unit_op.py index 99aff76e3c43f..f4821b01bdee6 100644 --- a/test/legacy_test/test_lstm_unit_op.py +++ b/test/legacy_test/test_lstm_unit_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def sigmoid_np(x): diff --git a/test/legacy_test/test_lu_op.py b/test/legacy_test/test_lu_op.py index f12d4ae6c893a..8ca6232838c3e 100644 --- a/test/legacy_test/test_lu_op.py +++ b/test/legacy_test/test_lu_op.py @@ -15,11 +15,11 @@ import copy import itertools import unittest +from test.legacy_test.op_test import OpTest import numpy as np import scipy import scipy.linalg -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_lu_unpack_op.py b/test/legacy_test/test_lu_unpack_op.py index bfac8781076bf..6844adb6b21f1 100644 --- a/test/legacy_test/test_lu_unpack_op.py +++ b/test/legacy_test/test_lu_unpack_op.py @@ -15,11 +15,11 @@ import copy import itertools import unittest +from test.legacy_test.op_test import OpTest import numpy as np import scipy import scipy.linalg -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_margin_cross_entropy_op.py b/test/legacy_test/test_margin_cross_entropy_op.py index 9c27be97fc577..f15a94fcad176 100644 --- a/test/legacy_test/test_margin_cross_entropy_op.py +++ b/test/legacy_test/test_margin_cross_entropy_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + paddle_static_guard, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle.base import Program, core, program_guard diff --git a/test/legacy_test/test_margin_rank_loss_op.py b/test/legacy_test/test_margin_rank_loss_op.py index ad40b546b81a5..5b34156160b34 100644 --- a/test/legacy_test/test_margin_rank_loss_op.py +++ b/test/legacy_test/test_margin_rank_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_marker_op.py b/test/legacy_test/test_marker_op.py index 08474d9803f57..dbf75832f1988 100644 --- a/test/legacy_test/test_marker_op.py +++ b/test/legacy_test/test_marker_op.py @@ -12,8 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import unittest - -from eager_op_test import OpTest +from test.legacy_test.op_test import OpTest from paddle.distributed.fleet.meta_optimizers.common import OpRole diff --git a/test/legacy_test/test_masked_select_op.py b/test/legacy_test/test_masked_select_op.py index 572e0ecb17583..1c891d95e9156 100644 --- a/test/legacy_test/test_masked_select_op.py +++ b/test/legacy_test/test_masked_select_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_match_matrix_tensor_op.py b/test/legacy_test/test_match_matrix_tensor_op.py index 8ae8baf1831fd..edf296a5319a7 100644 --- a/test/legacy_test/test_match_matrix_tensor_op.py +++ b/test/legacy_test/test_match_matrix_tensor_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestMatchMatrixTensorOp(OpTest): diff --git a/test/legacy_test/test_matmul_op.py b/test/legacy_test/test_matmul_op.py index cf2fd10d5dcf2..86c32b7d8b936 100644 --- a/test/legacy_test/test_matmul_op.py +++ b/test/legacy_test/test_matmul_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_matmul_op_with_head.py b/test/legacy_test/test_matmul_op_with_head.py index 475ede6fd05d7..763d05d3ad545 100644 --- a/test/legacy_test/test_matmul_op_with_head.py +++ b/test/legacy_test/test_matmul_op_with_head.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def generate_compatible_shapes_mul_head(dim_X, dim_Y, transpose_X, transpose_Y): diff --git a/test/legacy_test/test_matmul_v2_op.py b/test/legacy_test/test_matmul_v2_op.py index 681a24fd243c4..632426deeb3ed 100644 --- a/test/legacy_test/test_matmul_v2_op.py +++ b/test/legacy_test/test_matmul_v2_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + get_numeric_gradient, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, get_numeric_gradient from testsuite import create_op import paddle diff --git a/test/legacy_test/test_matrix_nms_op.py b/test/legacy_test/test_matrix_nms_op.py index 9500e6fbf6f06..f188e1f39ed63 100644 --- a/test/legacy_test/test_matrix_nms_op.py +++ b/test/legacy_test/test_matrix_nms_op.py @@ -14,9 +14,9 @@ import copy import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base import Program, program_guard diff --git a/test/legacy_test/test_matrix_power_op.py b/test/legacy_test/test_matrix_power_op.py index e9967a7ec3e1c..acd5a0069195a 100644 --- a/test/legacy_test/test_matrix_power_op.py +++ b/test/legacy_test/test_matrix_power_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_matrix_rank_op.py b/test/legacy_test/test_matrix_rank_op.py index 1a8bbb5b4636c..dc8735f6f21f6 100644 --- a/test/legacy_test/test_matrix_rank_op.py +++ b/test/legacy_test/test_matrix_rank_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_max_op.py b/test/legacy_test/test_max_op.py index 580b8423bffef..09a22513e39e2 100644 --- a/test/legacy_test/test_max_op.py +++ b/test/legacy_test/test_max_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import check_out_dtype import numpy as np -from eager_op_test import check_out_dtype from test_sum_op import TestReduceOPTensorAxisBase import paddle diff --git a/test/legacy_test/test_maxout_op.py b/test/legacy_test/test_maxout_op.py index 06b855ce2364a..6dad462f9b95e 100644 --- a/test/legacy_test/test_maxout_op.py +++ b/test/legacy_test/test_maxout_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_mean_iou.py b/test/legacy_test/test_mean_iou.py index 551bfeda62491..bdaa41e5cdec0 100644 --- a/test/legacy_test/test_mean_iou.py +++ b/test/legacy_test/test_mean_iou.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def compute_mean_iou( diff --git a/test/legacy_test/test_mean_op.py b/test/legacy_test/test_mean_op.py index 50be9eea9bda8..e211af71c99c5 100644 --- a/test/legacy_test/test_mean_op.py +++ b/test/legacy_test/test_mean_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, OpTestTool, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 from test_sum_op import TestReduceOPTensorAxisBase import paddle diff --git a/test/legacy_test/test_meshgrid_op.py b/test/legacy_test/test_meshgrid_op.py index 97c896e7cb8da..2a445ff3836ac 100644 --- a/test/legacy_test/test_meshgrid_op.py +++ b/test/legacy_test/test_meshgrid_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_min_op.py b/test/legacy_test/test_min_op.py index 4d51ce3fbbf28..8115cfe2208bd 100644 --- a/test/legacy_test/test_min_op.py +++ b/test/legacy_test/test_min_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import check_out_dtype import numpy as np -from eager_op_test import check_out_dtype from test_sum_op import TestReduceOPTensorAxisBase import paddle diff --git a/test/legacy_test/test_mine_hard_examples_op.py b/test/legacy_test/test_mine_hard_examples_op.py index 9cdaf582e89c1..c33763d20e30e 100644 --- a/test/legacy_test/test_mine_hard_examples_op.py +++ b/test/legacy_test/test_mine_hard_examples_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestMineHardExamplesOp(OpTest): diff --git a/test/legacy_test/test_minus_op.py b/test/legacy_test/test_minus_op.py index 44646ed3e892a..10804d2ba2dd5 100644 --- a/test/legacy_test/test_minus_op.py +++ b/test/legacy_test/test_minus_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_mode_op.py b/test/legacy_test/test_mode_op.py index 63e67882e23e1..7d32b21670a3d 100644 --- a/test/legacy_test/test_mode_op.py +++ b/test/legacy_test/test_mode_op.py @@ -13,14 +13,14 @@ # limitations under the License. import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, ) +import numpy as np + import paddle from paddle import base from paddle.base import core diff --git a/test/legacy_test/test_modified_huber_loss_op.py b/test/legacy_test/test_modified_huber_loss_op.py index 8f88db7768c2c..102ade8b823df 100644 --- a/test/legacy_test/test_modified_huber_loss_op.py +++ b/test/legacy_test/test_modified_huber_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def modified_huber_loss_forward(val): diff --git a/test/legacy_test/test_momentum_op.py b/test/legacy_test/test_momentum_op.py index 67296e516ab78..9f63244a27756 100644 --- a/test/legacy_test/test_momentum_op.py +++ b/test/legacy_test/test_momentum_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy import numpy as np -from eager_op_test import OpTest from op import Operator import paddle diff --git a/test/legacy_test/test_mul_op.py b/test/legacy_test/test_mul_op.py index d1b5d5f02843b..91bcc90efeca1 100644 --- a/test/legacy_test/test_mul_op.py +++ b/test/legacy_test/test_mul_op.py @@ -20,7 +20,7 @@ from paddle.base import core sys.path.append("..") -from eager_op_test import OpTest, convert_float_to_uint16 +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 class TestMulOp(OpTest): diff --git a/test/legacy_test/test_multi_dot_op.py b/test/legacy_test/test_multi_dot_op.py index 8a3557b6d7f14..789faf162a6f4 100644 --- a/test/legacy_test/test_multi_dot_op.py +++ b/test/legacy_test/test_multi_dot_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from numpy.linalg import multi_dot import paddle diff --git a/test/legacy_test/test_multiclass_nms_op.py b/test/legacy_test/test_multiclass_nms_op.py index 2059eff7d738b..36242bc3738c0 100644 --- a/test/legacy_test/test_multiclass_nms_op.py +++ b/test/legacy_test/test_multiclass_nms_op.py @@ -14,9 +14,9 @@ import copy import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import _C_ops diff --git a/test/legacy_test/test_multinomial_op.py b/test/legacy_test/test_multinomial_op.py index de58d6e8dd903..1d3c6aa360b26 100644 --- a/test/legacy_test/test_multinomial_op.py +++ b/test/legacy_test/test_multinomial_op.py @@ -14,9 +14,9 @@ import os import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from test_attribute_var import UnittestBase import paddle diff --git a/test/legacy_test/test_multiplex_op.py b/test/legacy_test/test_multiplex_op.py index c860825c66e40..acc1ab9ee07ce 100644 --- a/test/legacy_test/test_multiplex_op.py +++ b/test/legacy_test/test_multiplex_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_mv_op.py b/test/legacy_test/test_mv_op.py index 14a4ada5727e8..d228db8b9c52b 100644 --- a/test/legacy_test/test_mv_op.py +++ b/test/legacy_test/test_mv_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.static import Program, program_guard diff --git a/test/legacy_test/test_nan_to_num_op.py b/test/legacy_test/test_nan_to_num_op.py index c8a6d4fc67bef..aa50e7fe5c870 100644 --- a/test/legacy_test/test_nan_to_num_op.py +++ b/test/legacy_test/test_nan_to_num_op.py @@ -20,7 +20,7 @@ import paddle from paddle.base import core -# from eager_op_test import OpTest +# from op_test import OpTest def np_nan_to_num( diff --git a/test/legacy_test/test_nanmedian.py b/test/legacy_test/test_nanmedian.py index 9a55a91ac625b..1f212ca4f276e 100644 --- a/test/legacy_test/test_nanmedian.py +++ b/test/legacy_test/test_nanmedian.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_nce.py b/test/legacy_test/test_nce.py index 8332f07b85c3a..645b6007909fb 100644 --- a/test/legacy_test/test_nce.py +++ b/test/legacy_test/test_nce.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_nearest_interp_op.py b/test/legacy_test/test_nearest_interp_op.py index 6ef7c23589ed3..e474e19c6ffcb 100755 --- a/test/legacy_test/test_nearest_interp_op.py +++ b/test/legacy_test/test_nearest_interp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_nearest_interp_v2_op.py b/test/legacy_test/test_nearest_interp_v2_op.py index 15902efc28e53..4e818134e7e5d 100755 --- a/test/legacy_test/test_nearest_interp_v2_op.py +++ b/test/legacy_test/test_nearest_interp_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_nextafter_op.py b/test/legacy_test/test_nextafter_op.py index 5048778e1b7b7..81c557dc55d11 100644 --- a/test/legacy_test/test_nextafter_op.py +++ b/test/legacy_test/test_nextafter_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_nll_loss.py b/test/legacy_test/test_nll_loss.py index e225bbebd9a0d..6c1f738818132 100644 --- a/test/legacy_test/test_nll_loss.py +++ b/test/legacy_test/test_nll_loss.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_nms_op.py b/test/legacy_test/test_nms_op.py index 7c1e4dbcedcf1..fb61a1673b75c 100755 --- a/test/legacy_test/test_nms_op.py +++ b/test/legacy_test/test_nms_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_nn_functional_hot_op.py b/test/legacy_test/test_nn_functional_hot_op.py index e320a991c74bc..e013835bf69c7 100644 --- a/test/legacy_test/test_nn_functional_hot_op.py +++ b/test/legacy_test/test_nn_functional_hot_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_nonzero_api.py b/test/legacy_test/test_nonzero_api.py index 6dbe9cfed9de1..37a6b3a245529 100644 --- a/test/legacy_test/test_nonzero_api.py +++ b/test/legacy_test/test_nonzero_api.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_norm_all.py b/test/legacy_test/test_norm_all.py index 44001abdea81f..8d2429885d43d 100644 --- a/test/legacy_test/test_norm_all.py +++ b/test/legacy_test/test_norm_all.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import _C_ops, base diff --git a/test/legacy_test/test_norm_op.py b/test/legacy_test/test_norm_op.py index a486fba065e10..40873c4d775cb 100644 --- a/test/legacy_test/test_norm_op.py +++ b/test/legacy_test/test_norm_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + skip_check_grad_ci, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_number_count_op.py b/test/legacy_test/test_number_count_op.py index 2ea68fd82d7ec..2ea8b8358c2b7 100644 --- a/test/legacy_test/test_number_count_op.py +++ b/test/legacy_test/test_number_count_op.py @@ -13,8 +13,8 @@ # limitations under the License. import unittest +from test.legacy_test import op_test -import eager_op_test import numpy as np import paddle @@ -37,7 +37,7 @@ def number_count_wrapper(numbers, upper_num): @unittest.skipIf( not core.is_compiled_with_cuda(), "core is not compiled with CUDA" ) -class TestNumberCountOpInt64(eager_op_test.OpTest): +class TestNumberCountOpInt64(op_test.OpTest): def setUp(self): upper_num = 16 self.op_type = "number_count" diff --git a/test/legacy_test/test_numel_op.py b/test/legacy_test/test_numel_op.py index d04326971ed00..3dab1601e198d 100644 --- a/test/legacy_test/test_numel_op.py +++ b/test/legacy_test/test_numel_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_one_hot_v2_op.py b/test/legacy_test/test_one_hot_v2_op.py index f8a7c3a59140e..a7e557785344f 100644 --- a/test/legacy_test/test_one_hot_v2_op.py +++ b/test/legacy_test/test_one_hot_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_overlap_add_op.py b/test/legacy_test/test_overlap_add_op.py index 90b10c6b9a6c0..74cf12145143c 100644 --- a/test/legacy_test/test_overlap_add_op.py +++ b/test/legacy_test/test_overlap_add_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_pad2d_op.py b/test/legacy_test/test_pad2d_op.py index 9ceeb411444fa..dcae3313c3815 100644 --- a/test/legacy_test/test_pad2d_op.py +++ b/test/legacy_test/test_pad2d_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestPad2dOp(OpTest): diff --git a/test/legacy_test/test_pad3d_op.py b/test/legacy_test/test_pad3d_op.py index cbd8d142e6467..4339ac9e753bc 100644 --- a/test/legacy_test/test_pad3d_op.py +++ b/test/legacy_test/test_pad3d_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_pad_constant_like.py b/test/legacy_test/test_pad_constant_like.py index 9e2970cefa698..4375902329432 100644 --- a/test/legacy_test/test_pad_constant_like.py +++ b/test/legacy_test/test_pad_constant_like.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestPadConstantLikeOp(OpTest): diff --git a/test/legacy_test/test_pad_op.py b/test/legacy_test/test_pad_op.py index f33a317e944c6..219be3ef1fe7e 100644 --- a/test/legacy_test/test_pad_op.py +++ b/test/legacy_test/test_pad_op.py @@ -14,9 +14,9 @@ import os import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from test_attribute_var import UnittestBase import paddle diff --git a/test/legacy_test/test_partial_concat_op.py b/test/legacy_test/test_partial_concat_op.py index cc88320e1740b..34679a13cdcf0 100644 --- a/test/legacy_test/test_partial_concat_op.py +++ b/test/legacy_test/test_partial_concat_op.py @@ -14,9 +14,9 @@ import random import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def np_partial_concat(inputs, start, length): diff --git a/test/legacy_test/test_partial_sum_op.py b/test/legacy_test/test_partial_sum_op.py index 42dc497b92931..8d359696be650 100644 --- a/test/legacy_test/test_partial_sum_op.py +++ b/test/legacy_test/test_partial_sum_op.py @@ -14,9 +14,9 @@ import random import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestPartialSumOp(OpTest): diff --git a/test/legacy_test/test_pixel_shuffle_op.py b/test/legacy_test/test_pixel_shuffle_op.py index 7ab983476c5d6..23a3a98c7d0dc 100644 --- a/test/legacy_test/test_pixel_shuffle_op.py +++ b/test/legacy_test/test_pixel_shuffle_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_pixel_unshuffle.py b/test/legacy_test/test_pixel_unshuffle.py index dc982ded5b4ee..1aa38e1896af1 100644 --- a/test/legacy_test/test_pixel_unshuffle.py +++ b/test/legacy_test/test_pixel_unshuffle.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_poisson_op.py b/test/legacy_test/test_poisson_op.py index f6667407ed92e..8f54ca751f1eb 100644 --- a/test/legacy_test/test_poisson_op.py +++ b/test/legacy_test/test_poisson_op.py @@ -14,14 +14,14 @@ import math import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, ) +import numpy as np + import paddle from paddle.base import core diff --git a/test/legacy_test/test_polygamma_op.py b/test/legacy_test/test_polygamma_op.py index 88736f89173e0..f1dd4ac794e27 100644 --- a/test/legacy_test/test_polygamma_op.py +++ b/test/legacy_test/test_polygamma_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from scipy import special import paddle diff --git a/test/legacy_test/test_polygon_box_transform.py b/test/legacy_test/test_polygon_box_transform.py index 46c0f52cde61f..686fe78e956e3 100644 --- a/test/legacy_test/test_polygon_box_transform.py +++ b/test/legacy_test/test_polygon_box_transform.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def PolygonBoxRestore(input): diff --git a/test/legacy_test/test_pool2d_op.py b/test/legacy_test/test_pool2d_op.py index f55b1a9a9d02c..c4ddce3022b5f 100644 --- a/test/legacy_test/test_pool2d_op.py +++ b/test/legacy_test/test_pool2d_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_pool3d_op.py b/test/legacy_test/test_pool3d_op.py index 649e5cd255bd8..6df9df61f3bf1 100644 --- a/test/legacy_test/test_pool3d_op.py +++ b/test/legacy_test/test_pool3d_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_pool_max_op.py b/test/legacy_test/test_pool_max_op.py index e24a6a5f3bf5c..dc9907c95601a 100644 --- a/test/legacy_test/test_pool_max_op.py +++ b/test/legacy_test/test_pool_max_op.py @@ -13,14 +13,14 @@ # limitations under the License. import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, get_numeric_gradient, ) + +import numpy as np from testsuite import create_op import paddle diff --git a/test/legacy_test/test_positive_negative_pair_op.py b/test/legacy_test/test_positive_negative_pair_op.py index e01aa7fdbfb42..cf89ba2c8ae55 100644 --- a/test/legacy_test/test_positive_negative_pair_op.py +++ b/test/legacy_test/test_positive_negative_pair_op.py @@ -14,9 +14,9 @@ import itertools import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def py_pnpair_op(score, label, query, column=-1, weight=None): diff --git a/test/legacy_test/test_precision_recall_op.py b/test/legacy_test/test_precision_recall_op.py index d31a31bb9a469..9342e5433d1e4 100644 --- a/test/legacy_test/test_precision_recall_op.py +++ b/test/legacy_test/test_precision_recall_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def calc_precision(tp_count, fp_count): diff --git a/test/legacy_test/test_prelu_op.py b/test/legacy_test/test_prelu_op.py index 80772fdd671e5..7ca8e414b029f 100644 --- a/test/legacy_test/test_prelu_op.py +++ b/test/legacy_test/test_prelu_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + skip_check_grad_ci, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_prior_box_op.py b/test/legacy_test/test_prior_box_op.py index 7c071fb57cb6b..9f414b42b3378 100644 --- a/test/legacy_test/test_prior_box_op.py +++ b/test/legacy_test/test_prior_box_op.py @@ -14,9 +14,9 @@ import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_proximal_adagrad_op.py b/test/legacy_test/test_proximal_adagrad_op.py index 22f4a5839f0ef..319a1eb024f22 100644 --- a/test/legacy_test/test_proximal_adagrad_op.py +++ b/test/legacy_test/test_proximal_adagrad_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestProximalAdagradOp(OpTest): diff --git a/test/legacy_test/test_proximal_gd_op.py b/test/legacy_test/test_proximal_gd_op.py index e4b4342503b09..e400d3fc4941a 100644 --- a/test/legacy_test/test_proximal_gd_op.py +++ b/test/legacy_test/test_proximal_gd_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestProximalGDOp(OpTest): diff --git a/test/legacy_test/test_psroi_pool_op.py b/test/legacy_test/test_psroi_pool_op.py index fc4b513acfe72..9cef63ae6c710 100644 --- a/test/legacy_test/test_psroi_pool_op.py +++ b/test/legacy_test/test_psroi_pool_op.py @@ -14,9 +14,9 @@ import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_put_along_axis_op.py b/test/legacy_test/test_put_along_axis_op.py index 2834cda0be696..3fb39c8e650e2 100644 --- a/test/legacy_test/test_put_along_axis_op.py +++ b/test/legacy_test/test_put_along_axis_op.py @@ -14,9 +14,9 @@ import copy import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.framework import core diff --git a/test/legacy_test/test_qr_op.py b/test/legacy_test/test_qr_op.py index 7352e16bd65c3..12fe15c9c1587 100644 --- a/test/legacy_test/test_qr_op.py +++ b/test/legacy_test/test_qr_op.py @@ -14,9 +14,9 @@ import itertools import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_randint_op.py b/test/legacy_test/test_randint_op.py index 478b980ac1604..ba84e56aa7a52 100644 --- a/test/legacy_test/test_randint_op.py +++ b/test/legacy_test/test_randint_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_random_crop_op.py b/test/legacy_test/test_random_crop_op.py index 9881b590acc36..b8b499b311e7c 100644 --- a/test/legacy_test/test_random_crop_op.py +++ b/test/legacy_test/test_random_crop_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestRandomCropOp(OpTest): diff --git a/test/legacy_test/test_randperm_op.py b/test/legacy_test/test_randperm_op.py index bc14e4cbd4452..74cb29e632998 100644 --- a/test/legacy_test/test_randperm_op.py +++ b/test/legacy_test/test_randperm_op.py @@ -13,14 +13,14 @@ # limitations under the License. import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, ) +import numpy as np + import paddle from paddle.base import core from paddle.static import Program, program_guard diff --git a/test/legacy_test/test_range.py b/test/legacy_test/test_range.py index dafa42825f6bf..9b762571e16e0 100644 --- a/test/legacy_test/test_range.py +++ b/test/legacy_test/test_range.py @@ -14,9 +14,9 @@ import unittest from functools import partial +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_rank_attention_op.py b/test/legacy_test/test_rank_attention_op.py index f48fa41ba989a..c67a997ff06ef 100644 --- a/test/legacy_test/test_rank_attention_op.py +++ b/test/legacy_test/test_rank_attention_op.py @@ -14,9 +14,9 @@ import random import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_rank_loss_op.py b/test/legacy_test/test_rank_loss_op.py index 9fc57f13d5a14..18575888662f5 100644 --- a/test/legacy_test/test_rank_loss_op.py +++ b/test/legacy_test/test_rank_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestRankLossOp(OpTest): diff --git a/test/legacy_test/test_real_imag_op.py b/test/legacy_test/test_real_imag_op.py index 3da20edb1b726..facdbdad8a59a 100644 --- a/test/legacy_test/test_real_imag_op.py +++ b/test/legacy_test/test_real_imag_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base, static diff --git a/test/legacy_test/test_reduce_op.py b/test/legacy_test/test_reduce_op.py index 08fc8b7b3a6a6..a37748e3e25e4 100644 --- a/test/legacy_test/test_reduce_op.py +++ b/test/legacy_test/test_reduce_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + skip_check_grad_ci, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_repeat_interleave_op.py b/test/legacy_test/test_repeat_interleave_op.py index a0c1a3bad03d0..6148f147ca336 100644 --- a/test/legacy_test/test_repeat_interleave_op.py +++ b/test/legacy_test/test_repeat_interleave_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_reshape_op.py b/test/legacy_test/test_reshape_op.py index 5caaaae049b76..5b204bd97100d 100755 --- a/test/legacy_test/test_reshape_op.py +++ b/test/legacy_test/test_reshape_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_retinanet_detection_output.py b/test/legacy_test/test_retinanet_detection_output.py index 0f7202aab2457..cad14f7742c85 100644 --- a/test/legacy_test/test_retinanet_detection_output.py +++ b/test/legacy_test/test_retinanet_detection_output.py @@ -14,9 +14,9 @@ import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_anchor_generator_op import anchor_generator_in_python from test_multiclass_nms_op import nms diff --git a/test/legacy_test/test_reverse_op.py b/test/legacy_test/test_reverse_op.py index 91e90db95468c..6183f81f5da33 100644 --- a/test/legacy_test/test_reverse_op.py +++ b/test/legacy_test/test_reverse_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_rnn_op.py b/test/legacy_test/test_rnn_op.py index 4d7412f949786..00bb7dd5aaf2e 100644 --- a/test/legacy_test/test_rnn_op.py +++ b/test/legacy_test/test_rnn_op.py @@ -15,9 +15,9 @@ import random import sys import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_roi_align_op.py b/test/legacy_test/test_roi_align_op.py index 468411170d05a..dea797b0326ba 100644 --- a/test/legacy_test/test_roi_align_op.py +++ b/test/legacy_test/test_roi_align_op.py @@ -14,9 +14,9 @@ import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_roi_pool_op.py b/test/legacy_test/test_roi_pool_op.py index a3fd94a354815..209fff66511a3 100644 --- a/test/legacy_test/test_roi_pool_op.py +++ b/test/legacy_test/test_roi_pool_op.py @@ -16,9 +16,9 @@ import sys import unittest from decimal import ROUND_HALF_UP, Decimal +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_roll_op.py b/test/legacy_test/test_roll_op.py index b8aa8e28529bd..3abe28f1d3474 100644 --- a/test/legacy_test/test_roll_op.py +++ b/test/legacy_test/test_roll_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_row_conv_op.py b/test/legacy_test/test_row_conv_op.py index 595fb7b8b12aa..20ee0495b9497 100644 --- a/test/legacy_test/test_row_conv_op.py +++ b/test/legacy_test/test_row_conv_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_rpn_target_assign_op.py b/test/legacy_test/test_rpn_target_assign_op.py index 3df75b79c4add..eb153ea1dfd52 100644 --- a/test/legacy_test/test_rpn_target_assign_op.py +++ b/test/legacy_test/test_rpn_target_assign_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_anchor_generator_op import anchor_generator_in_python from test_generate_proposal_labels_op import ( _bbox_overlaps, diff --git a/test/legacy_test/test_rrelu_op.py b/test/legacy_test/test_rrelu_op.py index 851b90c44c7ba..b8346fb0b40c6 100644 --- a/test/legacy_test/test_rrelu_op.py +++ b/test/legacy_test/test_rrelu_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_sample_logits_op.py b/test/legacy_test/test_sample_logits_op.py index 809a6579fce46..020009eba328d 100644 --- a/test/legacy_test/test_sample_logits_op.py +++ b/test/legacy_test/test_sample_logits_op.py @@ -14,9 +14,9 @@ import collections import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestSampleLogitsOp(OpTest): diff --git a/test/legacy_test/test_scale_op.py b/test/legacy_test/test_scale_op.py index 9585357ce1b07..c53ba113e4e6a 100644 --- a/test/legacy_test/test_scale_op.py +++ b/test/legacy_test/test_scale_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope -from eager_op_test import OpTest, convert_float_to_uint16 from op import Operator import paddle diff --git a/test/legacy_test/test_scatter_nd_op.py b/test/legacy_test/test_scatter_nd_op.py index 9d8c7bf876773..8c93a38b050e8 100644 --- a/test/legacy_test/test_scatter_nd_op.py +++ b/test/legacy_test/test_scatter_nd_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_scatter_op.py b/test/legacy_test/test_scatter_op.py index 5c87f6aed919e..18effea8f87e3 100644 --- a/test/legacy_test/test_scatter_op.py +++ b/test/legacy_test/test_scatter_op.py @@ -14,9 +14,9 @@ import os import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_searchsorted_op.py b/test/legacy_test/test_searchsorted_op.py index 84fd7afac7aa0..fb346401ba65f 100644 --- a/test/legacy_test/test_searchsorted_op.py +++ b/test/legacy_test/test_searchsorted_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_seed_op.py b/test/legacy_test/test_seed_op.py index 9127d4cd0aecc..4ddc673ca81d6 100644 --- a/test/legacy_test/test_seed_op.py +++ b/test/legacy_test/test_seed_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import static diff --git a/test/legacy_test/test_segment_ops.py b/test/legacy_test/test_segment_ops.py index 00b4f403fc7a0..d7340093e1cff 100644 --- a/test/legacy_test/test_segment_ops.py +++ b/test/legacy_test/test_segment_ops.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_selu_op.py b/test/legacy_test/test_selu_op.py index 17e4311615145..72badf52d9267 100644 --- a/test/legacy_test/test_selu_op.py +++ b/test/legacy_test/test_selu_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_set_value_op.py b/test/legacy_test/test_set_value_op.py index c0aa623d0311e..9a4af4a6a7c4d 100644 --- a/test/legacy_test/test_set_value_op.py +++ b/test/legacy_test/test_set_value_op.py @@ -16,9 +16,9 @@ import unittest from functools import reduce +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_sgd_op.py b/test/legacy_test/test_sgd_op.py index 1d9cdb3ffa3f3..75d86389cbd0f 100644 --- a/test/legacy_test/test_sgd_op.py +++ b/test/legacy_test/test_sgd_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from op import Operator import paddle diff --git a/test/legacy_test/test_sgd_op_bf16.py b/test/legacy_test/test_sgd_op_bf16.py index 816ab3b6359d8..d5ba61234186e 100644 --- a/test/legacy_test/test_sgd_op_bf16.py +++ b/test/legacy_test/test_sgd_op_bf16.py @@ -14,14 +14,14 @@ import struct import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, OpTestTool, convert_float_to_uint16, convert_uint16_to_float, ) + +import numpy as np from op import Operator import paddle diff --git a/test/legacy_test/test_shape_op.py b/test/legacy_test/test_shape_op.py index e7e7f9b62110a..924a92abddb55 100644 --- a/test/legacy_test/test_shape_op.py +++ b/test/legacy_test/test_shape_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from op import Operator import paddle diff --git a/test/legacy_test/test_shard_index_op.py b/test/legacy_test/test_shard_index_op.py index 231518cd8ac50..5980090f6dae4 100644 --- a/test/legacy_test/test_shard_index_op.py +++ b/test/legacy_test/test_shard_index_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_share_data_op.py b/test/legacy_test/test_share_data_op.py index bf158beac1c97..f6b501b42689e 100644 --- a/test/legacy_test/test_share_data_op.py +++ b/test/legacy_test/test_share_data_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from op import Operator from paddle.base import core diff --git a/test/legacy_test/test_shuffle_batch_op.py b/test/legacy_test/test_shuffle_batch_op.py index 2bee79bda306d..ae3c9b3c55a26 100644 --- a/test/legacy_test/test_shuffle_batch_op.py +++ b/test/legacy_test/test_shuffle_batch_op.py @@ -15,9 +15,9 @@ import os import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle import base diff --git a/test/legacy_test/test_shuffle_channel_op.py b/test/legacy_test/test_shuffle_channel_op.py index 2b974004968aa..632ca86f0177b 100644 --- a/test/legacy_test/test_shuffle_channel_op.py +++ b/test/legacy_test/test_shuffle_channel_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestShuffleChannelOp(OpTest): diff --git a/test/legacy_test/test_sigmoid_cross_entropy_with_logits_op.py b/test/legacy_test/test_sigmoid_cross_entropy_with_logits_op.py index e0efedffc0043..c448fadcadc25 100644 --- a/test/legacy_test/test_sigmoid_cross_entropy_with_logits_op.py +++ b/test/legacy_test/test_sigmoid_cross_entropy_with_logits_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from scipy.special import expit, logit import paddle diff --git a/test/legacy_test/test_sigmoid_focal_loss_op.py b/test/legacy_test/test_sigmoid_focal_loss_op.py index abf4ba677ba86..4aa39227208e2 100644 --- a/test/legacy_test/test_sigmoid_focal_loss_op.py +++ b/test/legacy_test/test_sigmoid_focal_loss_op.py @@ -15,9 +15,9 @@ import copy import math import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_sign_op.py b/test/legacy_test/test_sign_op.py index 516330a58898a..bece86efdd5b8 100644 --- a/test/legacy_test/test_sign_op.py +++ b/test/legacy_test/test_sign_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_similarity_focus_op.py b/test/legacy_test/test_similarity_focus_op.py index f02a01e6253e6..d49a0de4b27d0 100755 --- a/test/legacy_test/test_similarity_focus_op.py +++ b/test/legacy_test/test_similarity_focus_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestSimilarityFocusOp(OpTest): diff --git a/test/legacy_test/test_simple_rnn_op.py b/test/legacy_test/test_simple_rnn_op.py index fb731f87e951a..b3660e50c9414 100644 --- a/test/legacy_test/test_simple_rnn_op.py +++ b/test/legacy_test/test_simple_rnn_op.py @@ -15,9 +15,9 @@ import random import sys import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_size_op.py b/test/legacy_test/test_size_op.py index 68ec73fb57ba4..93dce8644e05b 100644 --- a/test/legacy_test/test_size_op.py +++ b/test/legacy_test/test_size_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_slice_op.py b/test/legacy_test/test_slice_op.py index 0aa24c85b87b0..7aeb97069123d 100644 --- a/test/legacy_test/test_slice_op.py +++ b/test/legacy_test/test_slice_op.py @@ -13,11 +13,15 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + paddle_static_guard, +) import gradient_checker import numpy as np from decorator_helper import prog_scope -from eager_op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_smooth_l1_loss_op.py b/test/legacy_test/test_smooth_l1_loss_op.py index 7c19db6d7b5c0..47334912ad359 100644 --- a/test/legacy_test/test_smooth_l1_loss_op.py +++ b/test/legacy_test/test_smooth_l1_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def smooth_l1_loss_forward(val, sigma2): diff --git a/test/legacy_test/test_softmax_mask_fuse_op.py b/test/legacy_test/test_softmax_mask_fuse_op.py index 2adb2d4ce7029..acfa04458ae32 100644 --- a/test/legacy_test/test_softmax_mask_fuse_op.py +++ b/test/legacy_test/test_softmax_mask_fuse_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base, incubate diff --git a/test/legacy_test/test_softmax_mask_fuse_upper_triangle_op.py b/test/legacy_test/test_softmax_mask_fuse_upper_triangle_op.py index 67f2676a12885..559bd54843648 100644 --- a/test/legacy_test/test_softmax_mask_fuse_upper_triangle_op.py +++ b/test/legacy_test/test_softmax_mask_fuse_upper_triangle_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base, incubate diff --git a/test/legacy_test/test_softmax_op.py b/test/legacy_test/test_softmax_op.py index 6eb86b95fa620..86930409d51c8 100644 --- a/test/legacy_test/test_softmax_op.py +++ b/test/legacy_test/test_softmax_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_softmax_with_cross_entropy_op.py b/test/legacy_test/test_softmax_with_cross_entropy_op.py index 73828072e9661..cb4284b27a382 100644 --- a/test/legacy_test/test_softmax_with_cross_entropy_op.py +++ b/test/legacy_test/test_softmax_with_cross_entropy_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard from test_softmax_op import stable_softmax import paddle diff --git a/test/legacy_test/test_solve_op.py b/test/legacy_test/test_solve_op.py index ecb05b1d18a28..5a8e6ba3f1a35 100644 --- a/test/legacy_test/test_solve_op.py +++ b/test/legacy_test/test_solve_op.py @@ -21,7 +21,7 @@ from paddle.base import core sys.path.append("..") -from eager_op_test import OpTest +from test.legacy_test.op_test import OpTest from paddle import base from paddle.base import Program, program_guard diff --git a/test/legacy_test/test_space_to_depth_op.py b/test/legacy_test/test_space_to_depth_op.py index 3e37ccfb2e104..91adb3b64ef12 100644 --- a/test/legacy_test/test_space_to_depth_op.py +++ b/test/legacy_test/test_space_to_depth_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle import base diff --git a/test/legacy_test/test_sparse_attention_op.py b/test/legacy_test/test_sparse_attention_op.py index 2a80906ad74aa..73ffb15b3b0b6 100644 --- a/test/legacy_test/test_sparse_attention_op.py +++ b/test/legacy_test/test_sparse_attention_op.py @@ -16,9 +16,9 @@ import os import re import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_sparse_momentum_op.py b/test/legacy_test/test_sparse_momentum_op.py index a8dba1702e472..c924ee98a662e 100644 --- a/test/legacy_test/test_sparse_momentum_op.py +++ b/test/legacy_test/test_sparse_momentum_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def calculate_sparse_momentum_by_numpy( diff --git a/test/legacy_test/test_spectral_norm_op.py b/test/legacy_test/test_spectral_norm_op.py index d0b4b712ce087..5d303be8fbbe3 100644 --- a/test/legacy_test/test_spectral_norm_op.py +++ b/test/legacy_test/test_spectral_norm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci import paddle from paddle import _C_ops diff --git a/test/legacy_test/test_split_op.py b/test/legacy_test/test_split_op.py index 77a720ffc8d30..9a4beef7bc854 100644 --- a/test/legacy_test/test_split_op.py +++ b/test/legacy_test/test_split_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_spp_op.py b/test/legacy_test/test_spp_op.py index 2fca2f3fc845f..69533e1401333 100644 --- a/test/legacy_test/test_spp_op.py +++ b/test/legacy_test/test_spp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_pool2d_op import avg_pool2D_forward_naive, max_pool2D_forward_naive diff --git a/test/legacy_test/test_squared_l2_distance_op.py b/test/legacy_test/test_squared_l2_distance_op.py index 88c36f383501d..0e880aeb99e15 100644 --- a/test/legacy_test/test_squared_l2_distance_op.py +++ b/test/legacy_test/test_squared_l2_distance_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest class TestSquaredL2DistanceOp_f0(OpTest): diff --git a/test/legacy_test/test_squared_l2_norm_op.py b/test/legacy_test/test_squared_l2_norm_op.py index 96872b10f1295..33e44fd746395 100755 --- a/test/legacy_test/test_squared_l2_norm_op.py +++ b/test/legacy_test/test_squared_l2_norm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from numpy import linalg as LA import paddle diff --git a/test/legacy_test/test_squeeze2_op.py b/test/legacy_test/test_squeeze2_op.py index ec9b96aed46cc..f1c1ea8345658 100755 --- a/test/legacy_test/test_squeeze2_op.py +++ b/test/legacy_test/test_squeeze2_op.py @@ -14,9 +14,9 @@ import os import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from test_attribute_var import UnittestBase import paddle diff --git a/test/legacy_test/test_squeeze_op.py b/test/legacy_test/test_squeeze_op.py index 6cdfa5fec0f02..59b00d02a2c30 100755 --- a/test/legacy_test/test_squeeze_op.py +++ b/test/legacy_test/test_squeeze_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_stack_op.py b/test/legacy_test/test_stack_op.py index 5cc2234555853..ece8511b74b91 100644 --- a/test/legacy_test/test_stack_op.py +++ b/test/legacy_test/test_stack_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_stft_op.py b/test/legacy_test/test_stft_op.py index 8b672295d7cde..bc82d99e16b31 100644 --- a/test/legacy_test/test_stft_op.py +++ b/test/legacy_test/test_stft_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from numpy.lib.stride_tricks import as_strided import paddle diff --git a/test/legacy_test/test_strided_slice_op.py b/test/legacy_test/test_strided_slice_op.py index 9aca4ab961aa7..22445cd8a178d 100644 --- a/test/legacy_test/test_strided_slice_op.py +++ b/test/legacy_test/test_strided_slice_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_sum_op.py b/test/legacy_test/test_sum_op.py index fc37437409063..3eb37c07f075c 100644 --- a/test/legacy_test/test_sum_op.py +++ b/test/legacy_test/test_sum_op.py @@ -16,15 +16,15 @@ import tempfile import unittest import warnings - -import gradient_checker -import numpy as np -from decorator_helper import prog_scope -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, ) + +import gradient_checker +import numpy as np +from decorator_helper import prog_scope from op import Operator import paddle diff --git a/test/legacy_test/test_svd_op.py b/test/legacy_test/test_svd_op.py index 847a2e7e161cb..c96bf5e3f1ddb 100644 --- a/test/legacy_test/test_svd_op.py +++ b/test/legacy_test/test_svd_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_sync_batch_norm_op.py b/test/legacy_test/test_sync_batch_norm_op.py index d98aed3531689..2248512d2d0ee 100644 --- a/test/legacy_test/test_sync_batch_norm_op.py +++ b/test/legacy_test/test_sync_batch_norm_op.py @@ -23,15 +23,15 @@ import tempfile import unittest from shlex import quote - -import numpy as np -from decorator_helper import prog_scope -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, _set_use_system_allocator, convert_float_to_uint16, ) +import numpy as np +from decorator_helper import prog_scope + import paddle from paddle import base, nn from paddle.base import Program, core, program_guard diff --git a/test/legacy_test/test_take_along_axis_op.py b/test/legacy_test/test_take_along_axis_op.py index 6805b9b623406..d2f9b3ede7793 100644 --- a/test/legacy_test/test_take_along_axis_op.py +++ b/test/legacy_test/test_take_along_axis_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.framework import core diff --git a/test/legacy_test/test_target_assign_op.py b/test/legacy_test/test_target_assign_op.py index 8554fbbf5ff30..4b932f01ae096 100644 --- a/test/legacy_test/test_target_assign_op.py +++ b/test/legacy_test/test_target_assign_op.py @@ -14,9 +14,9 @@ import random import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def gen_match_and_neg_indices(num_prior, gt_lod, neg_lod): diff --git a/test/legacy_test/test_tdm_child_op.py b/test/legacy_test/test_tdm_child_op.py index 0bb0e38c6cde6..79ac6560f7b6f 100644 --- a/test/legacy_test/test_tdm_child_op.py +++ b/test/legacy_test/test_tdm_child_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_tdm_sampler_op.py b/test/legacy_test/test_tdm_sampler_op.py index 84d003ca323b0..3a8fcddfead5f 100644 --- a/test/legacy_test/test_tdm_sampler_op.py +++ b/test/legacy_test/test_tdm_sampler_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_teacher_student_sigmoid_loss_op.py b/test/legacy_test/test_teacher_student_sigmoid_loss_op.py index 2d056a02e0dff..aa5714f9bafa8 100644 --- a/test/legacy_test/test_teacher_student_sigmoid_loss_op.py +++ b/test/legacy_test/test_teacher_student_sigmoid_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. from math import exp, log +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from scipy.special import logit diff --git a/test/legacy_test/test_temporal_shift_op.py b/test/legacy_test/test_temporal_shift_op.py index 4c51cbefe7317..befa28e7b08c2 100644 --- a/test/legacy_test/test_temporal_shift_op.py +++ b/test/legacy_test/test_temporal_shift_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_tile_op.py b/test/legacy_test/test_tile_op.py index e64e7113653ec..1aaa7232d06de 100644 --- a/test/legacy_test/test_tile_op.py +++ b/test/legacy_test/test_tile_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_top_k_op.py b/test/legacy_test/test_top_k_op.py index 940db2bb899f8..8978cfc41cf1b 100644 --- a/test/legacy_test/test_top_k_op.py +++ b/test/legacy_test/test_top_k_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_top_k_v2_op.py b/test/legacy_test/test_top_k_v2_op.py index df4cd67b70753..7597ef45c32e1 100644 --- a/test/legacy_test/test_top_k_v2_op.py +++ b/test/legacy_test/test_top_k_v2_op.py @@ -13,14 +13,14 @@ # limitations under the License. import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, ) +import numpy as np + import paddle from paddle.base import core diff --git a/test/legacy_test/test_trace_op.py b/test/legacy_test/test_trace_op.py index 7b8f66b4bc35d..a894cf288f4f0 100644 --- a/test/legacy_test/test_trace_op.py +++ b/test/legacy_test/test_trace_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base, tensor diff --git a/test/legacy_test/test_trans_layout_op.py b/test/legacy_test/test_trans_layout_op.py index 3617cdb013b8a..1f13df9791af1 100644 --- a/test/legacy_test/test_trans_layout_op.py +++ b/test/legacy_test/test_trans_layout_op.py @@ -16,9 +16,9 @@ import os import tempfile import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_transfer_dtype_op.py b/test/legacy_test/test_transfer_dtype_op.py index 0a087b5d4f205..360d1114c807b 100644 --- a/test/legacy_test/test_transfer_dtype_op.py +++ b/test/legacy_test/test_transfer_dtype_op.py @@ -13,14 +13,14 @@ # limitations under the License. import unittest - -import numpy as np -from eager_op_test import ( +from test.legacy_test.op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, ) +import numpy as np + import paddle from paddle.base import core diff --git a/test/legacy_test/test_transfer_layout_op.py b/test/legacy_test/test_transfer_layout_op.py index ffcd979b0ba06..4b1a091d8f35c 100644 --- a/test/legacy_test/test_transfer_layout_op.py +++ b/test/legacy_test/test_transfer_layout_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_transpose_op.py b/test/legacy_test/test_transpose_op.py index adb0ca0779f87..713620ff72411 100644 --- a/test/legacy_test/test_transpose_op.py +++ b/test/legacy_test/test_transpose_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_tree_conv_op.py b/test/legacy_test/test_tree_conv_op.py index 997ffc74d0337..19f46e0a14e6c 100644 --- a/test/legacy_test/test_tree_conv_op.py +++ b/test/legacy_test/test_tree_conv_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest def collect_node_patch(og, max_depth): diff --git a/test/legacy_test/test_triangular_solve_op.py b/test/legacy_test/test_triangular_solve_op.py index 60f699d88822d..c47b13a453055 100644 --- a/test/legacy_test/test_triangular_solve_op.py +++ b/test/legacy_test/test_triangular_solve_op.py @@ -18,7 +18,7 @@ import numpy as np sys.path.append("..") -from eager_op_test import OpTest +from test.legacy_test.op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_tril_indices_op.py b/test/legacy_test/test_tril_indices_op.py index 26d19e44c2887..ab890e25e206b 100644 --- a/test/legacy_test/test_tril_indices_op.py +++ b/test/legacy_test/test_tril_indices_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_tril_triu_op.py b/test/legacy_test/test_tril_triu_op.py index c0304354a1bd5..f8f1b34c88151 100644 --- a/test/legacy_test/test_tril_triu_op.py +++ b/test/legacy_test/test_tril_triu_op.py @@ -12,9 +12,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base, tensor diff --git a/test/legacy_test/test_trilinear_interp_op.py b/test/legacy_test/test_trilinear_interp_op.py index bbdc14e434cfb..7efe53878114f 100755 --- a/test/legacy_test/test_trilinear_interp_op.py +++ b/test/legacy_test/test_trilinear_interp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_trilinear_interp_v2_op.py b/test/legacy_test/test_trilinear_interp_v2_op.py index 68101d5c5e0f7..60fca3c5150ec 100755 --- a/test/legacy_test/test_trilinear_interp_v2_op.py +++ b/test/legacy_test/test_trilinear_interp_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_triu_indices_op.py b/test/legacy_test/test_triu_indices_op.py index 4f5c7610ddd7e..acfe3bf6ea6d5 100644 --- a/test/legacy_test/test_triu_indices_op.py +++ b/test/legacy_test/test_triu_indices_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_trunc_op.py b/test/legacy_test/test_trunc_op.py index d1dae7c8f4081..10cc0def4f620 100644 --- a/test/legacy_test/test_trunc_op.py +++ b/test/legacy_test/test_trunc_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_unbind_op.py b/test/legacy_test/test_unbind_op.py index 45a4d92fef019..87e9c73dd7b21 100644 --- a/test/legacy_test/test_unbind_op.py +++ b/test/legacy_test/test_unbind_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base, tensor diff --git a/test/legacy_test/test_unfold_op.py b/test/legacy_test/test_unfold_op.py index 9e9c0806708de..079d28038c948 100644 --- a/test/legacy_test/test_unfold_op.py +++ b/test/legacy_test/test_unfold_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_uniform_random_bf16_op.py b/test/legacy_test/test_uniform_random_bf16_op.py index 2e92c2041107b..ba2a443e76afb 100644 --- a/test/legacy_test/test_uniform_random_bf16_op.py +++ b/test/legacy_test/test_uniform_random_bf16_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_uint16_to_float import numpy as np -from eager_op_test import OpTest, convert_uint16_to_float from op import Operator from test_uniform_random_op import output_hist, output_hist_diag diff --git a/test/legacy_test/test_uniform_random_inplace_op.py b/test/legacy_test/test_uniform_random_inplace_op.py index f022656d1ada6..cee9d243cfbf1 100644 --- a/test/legacy_test/test_uniform_random_inplace_op.py +++ b/test/legacy_test/test_uniform_random_inplace_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_uint16_to_float import numpy as np -from eager_op_test import OpTest, convert_uint16_to_float import paddle from paddle import base diff --git a/test/legacy_test/test_uniform_random_op.py b/test/legacy_test/test_uniform_random_op.py index 4cfafe4c7a84e..4f280a286ba9a 100644 --- a/test/legacy_test/test_uniform_random_op.py +++ b/test/legacy_test/test_uniform_random_op.py @@ -14,9 +14,9 @@ import os import unittest +from test.legacy_test.op_test import OpTest, convert_uint16_to_float import numpy as np -from eager_op_test import OpTest, convert_uint16_to_float from op import Operator from test_attribute_var import UnittestBase diff --git a/test/legacy_test/test_unique.py b/test/legacy_test/test_unique.py index cf1746a4fd1d4..e9b05ab9da488 100644 --- a/test/legacy_test/test_unique.py +++ b/test/legacy_test/test_unique.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + paddle_static_guard, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle.base import core diff --git a/test/legacy_test/test_unique_consecutive_op.py b/test/legacy_test/test_unique_consecutive_op.py index 587ef404b7c39..1af4171a80680 100644 --- a/test/legacy_test/test_unique_consecutive_op.py +++ b/test/legacy_test/test_unique_consecutive_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_unique_with_counts.py b/test/legacy_test/test_unique_with_counts.py index 364276a5e473d..90c41834975d2 100644 --- a/test/legacy_test/test_unique_with_counts.py +++ b/test/legacy_test/test_unique_with_counts.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np -from eager_op_test import OpTest, paddle_static_guard import paddle from paddle.base import core diff --git a/test/legacy_test/test_unpool3d_op.py b/test/legacy_test/test_unpool3d_op.py index f8404d9680985..fd235da6de4ce 100644 --- a/test/legacy_test/test_unpool3d_op.py +++ b/test/legacy_test/test_unpool3d_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_unpool_op.py b/test/legacy_test/test_unpool_op.py index 6020b7b87f17a..8baa72c1ab1fe 100644 --- a/test/legacy_test/test_unpool_op.py +++ b/test/legacy_test/test_unpool_op.py @@ -14,9 +14,9 @@ import os import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_attribute_var import UnittestBase import paddle diff --git a/test/legacy_test/test_unsqueeze2_op.py b/test/legacy_test/test_unsqueeze2_op.py index df4115eb0c57a..3410429a0c647 100755 --- a/test/legacy_test/test_unsqueeze2_op.py +++ b/test/legacy_test/test_unsqueeze2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_unsqueeze_op.py b/test/legacy_test/test_unsqueeze_op.py index 0fbc44a728eed..c26ea7cd46fe7 100755 --- a/test/legacy_test/test_unsqueeze_op.py +++ b/test/legacy_test/test_unsqueeze_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_unstack_op.py b/test/legacy_test/test_unstack_op.py index e07c96ce19019..0269f1b9dfda3 100755 --- a/test/legacy_test/test_unstack_op.py +++ b/test/legacy_test/test_unstack_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_update_loss_scaling_op.py b/test/legacy_test/test_update_loss_scaling_op.py index 32cee8125fc27..b130125a4a344 100644 --- a/test/legacy_test/test_update_loss_scaling_op.py +++ b/test/legacy_test/test_update_loss_scaling_op.py @@ -13,9 +13,13 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import ( + OpTest, + convert_float_to_uint16, + paddle_static_guard, +) import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_var_conv_2d.py b/test/legacy_test/test_var_conv_2d.py index df9c1d26c3e63..66ba78ccc94fe 100644 --- a/test/legacy_test/test_var_conv_2d.py +++ b/test/legacy_test/test_var_conv_2d.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci class TestVarConv2DOp(OpTest): diff --git a/test/legacy_test/test_viterbi_decode_op.py b/test/legacy_test/test_viterbi_decode_op.py index 3b62d035b64fd..d2a0d89bf8b5a 100644 --- a/test/legacy_test/test_viterbi_decode_op.py +++ b/test/legacy_test/test_viterbi_decode_op.py @@ -9,9 +9,9 @@ # See the License for the specific language governing permissions and # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_warpctc_op.py b/test/legacy_test/test_warpctc_op.py index e7c1ff28e1b5b..423edd33a8b36 100644 --- a/test/legacy_test/test_warpctc_op.py +++ b/test/legacy_test/test_warpctc_op.py @@ -14,9 +14,9 @@ import sys import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from test_softmax_op import stable_softmax import paddle diff --git a/test/legacy_test/test_warprnnt_op.py b/test/legacy_test/test_warprnnt_op.py index c5c2950cc7c24..00b279c1680d7 100644 --- a/test/legacy_test/test_warprnnt_op.py +++ b/test/legacy_test/test_warprnnt_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle from paddle import _C_ops diff --git a/test/legacy_test/test_where_op.py b/test/legacy_test/test_where_op.py index 3daa2fbbb6898..5158a5240e91f 100644 --- a/test/legacy_test/test_where_op.py +++ b/test/legacy_test/test_where_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_yolo_box_op.py b/test/legacy_test/test_yolo_box_op.py index 81445c081fea1..0ccd176c69501 100644 --- a/test/legacy_test/test_yolo_box_op.py +++ b/test/legacy_test/test_yolo_box_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest import paddle diff --git a/test/legacy_test/test_yolov3_loss_op.py b/test/legacy_test/test_yolov3_loss_op.py index c9a9779a2a984..c7760090c9bbd 100644 --- a/test/legacy_test/test_yolov3_loss_op.py +++ b/test/legacy_test/test_yolov3_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest +from test.legacy_test.op_test import OpTest import numpy as np -from eager_op_test import OpTest from scipy.special import expit, logit import paddle diff --git a/test/mkldnn/test_activation_bf16_mkldnn_op.py b/test/mkldnn/test_activation_bf16_mkldnn_op.py index 6e002222ae429..d1c5a7b313435 100644 --- a/test/mkldnn/test_activation_bf16_mkldnn_op.py +++ b/test/mkldnn/test_activation_bf16_mkldnn_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTestTool, convert_float_to_uint16 +from op_test import OpTestTool, convert_float_to_uint16 from scipy.special import erf from test_activation_op import TestActivation from test_gelu_op import gelu diff --git a/test/mkldnn/test_activation_mkldnn_op.py b/test/mkldnn/test_activation_mkldnn_op.py index 6887bd9059edd..e6ef8388f771d 100644 --- a/test/mkldnn/test_activation_mkldnn_op.py +++ b/test/mkldnn/test_activation_mkldnn_op.py @@ -15,8 +15,8 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 from mkldnn_op_test import check_if_mkldnn_primitives_exist_in_bwd +from op_test import OpTest, convert_float_to_uint16 from test_activation_op import ( TestAbs, TestAbs_ZeroDim, diff --git a/test/mkldnn/test_batch_norm_mkldnn_op.py b/test/mkldnn/test_batch_norm_mkldnn_op.py index a274990047f17..bdca10ff02d62 100644 --- a/test/mkldnn/test_batch_norm_mkldnn_op.py +++ b/test/mkldnn/test_batch_norm_mkldnn_op.py @@ -15,8 +15,8 @@ import unittest import numpy as np -from eager_op_test import _set_use_system_allocator from mkldnn_op_test import check_if_mkldnn_batchnorm_primitives_exist_in_bwd +from op_test import _set_use_system_allocator from test_batch_norm_op import ( TestBatchNormOpInference, TestBatchNormOpTraining, diff --git a/test/mkldnn/test_bilinear_interp_mkldnn_op.py b/test/mkldnn/test_bilinear_interp_mkldnn_op.py index f58e9c88fd6f5..023b07d9ef467 100644 --- a/test/mkldnn/test_bilinear_interp_mkldnn_op.py +++ b/test/mkldnn/test_bilinear_interp_mkldnn_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci +from op_test import OpTest, skip_check_grad_ci def bilinear_interp_mkldnn_np( diff --git a/test/mkldnn/test_bilinear_interp_v2_mkldnn_op.py b/test/mkldnn/test_bilinear_interp_v2_mkldnn_op.py index 99f20bf3c09a8..42a5751945a02 100644 --- a/test/mkldnn/test_bilinear_interp_v2_mkldnn_op.py +++ b/test/mkldnn/test_bilinear_interp_v2_mkldnn_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci def bilinear_interp_onednn_np( diff --git a/test/mkldnn/test_cast_mkldnn_op.py b/test/mkldnn/test_cast_mkldnn_op.py index edf484b8aa9cd..8856fd9071391 100644 --- a/test/mkldnn/test_cast_mkldnn_op.py +++ b/test/mkldnn/test_cast_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/mkldnn/test_clip_mkldnn_op.py b/test/mkldnn/test_clip_mkldnn_op.py index b7538cb45b18c..752193d35b64b 100644 --- a/test/mkldnn/test_clip_mkldnn_op.py +++ b/test/mkldnn/test_clip_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/mkldnn/test_concat_bf16_mkldnn_op.py b/test/mkldnn/test_concat_bf16_mkldnn_op.py index f62886aca8951..0e316b533ca02 100644 --- a/test/mkldnn/test_concat_bf16_mkldnn_op.py +++ b/test/mkldnn/test_concat_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 from paddle import enable_static from paddle.base import core diff --git a/test/mkldnn/test_concat_int8_mkldnn_op.py b/test/mkldnn/test_concat_int8_mkldnn_op.py index 8421ab47c0a1c..5ad5046f1c23e 100644 --- a/test/mkldnn/test_concat_int8_mkldnn_op.py +++ b/test/mkldnn/test_concat_int8_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest class TestConcatOp(OpTest): diff --git a/test/mkldnn/test_concat_mkldnn_op.py b/test/mkldnn/test_concat_mkldnn_op.py index 906bb4c731305..48b0244b8b077 100644 --- a/test/mkldnn/test_concat_mkldnn_op.py +++ b/test/mkldnn/test_concat_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest from paddle import enable_static from paddle.base import core diff --git a/test/mkldnn/test_conv2d_bf16_mkldnn_op.py b/test/mkldnn/test_conv2d_bf16_mkldnn_op.py index acaaa7406471c..a4526dcf0851a 100644 --- a/test/mkldnn/test_conv2d_bf16_mkldnn_op.py +++ b/test/mkldnn/test_conv2d_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 from test_conv2d_op import TestConv2DOp, conv2d_forward_naive from paddle.base import core diff --git a/test/mkldnn/test_conv2d_int8_mkldnn_op.py b/test/mkldnn/test_conv2d_int8_mkldnn_op.py index dc2fe60848148..981570cd5bb52 100644 --- a/test/mkldnn/test_conv2d_int8_mkldnn_op.py +++ b/test/mkldnn/test_conv2d_int8_mkldnn_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest from test_conv2d_op import TestConv2DOp, conv2d_forward_naive from paddle.base import core diff --git a/test/mkldnn/test_conv2d_mkldnn_op.py b/test/mkldnn/test_conv2d_mkldnn_op.py index 9fbd4ea46471c..3c77581acf80d 100644 --- a/test/mkldnn/test_conv2d_mkldnn_op.py +++ b/test/mkldnn/test_conv2d_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci +from op_test import OpTest, skip_check_grad_ci from test_conv2d_op import TestConv2DOp, TestConv2DOp_v2 diff --git a/test/mkldnn/test_conv2d_transpose_bf16_mkldnn_op.py b/test/mkldnn/test_conv2d_transpose_bf16_mkldnn_op.py index 53fa07cb42628..09c3c1172354f 100644 --- a/test/mkldnn/test_conv2d_transpose_bf16_mkldnn_op.py +++ b/test/mkldnn/test_conv2d_transpose_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 from test_conv2d_transpose_op import conv2dtranspose_forward_naive from paddle import enable_static diff --git a/test/mkldnn/test_conv2d_transpose_mkldnn_op.py b/test/mkldnn/test_conv2d_transpose_mkldnn_op.py index 6a1a012f4c8fa..55fdbefe16c0a 100644 --- a/test/mkldnn/test_conv2d_transpose_mkldnn_op.py +++ b/test/mkldnn/test_conv2d_transpose_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest from test_conv2d_transpose_op import TestConv2DTransposeOp from paddle import enable_static diff --git a/test/mkldnn/test_dequantize_mkldnn_op.py b/test/mkldnn/test_dequantize_mkldnn_op.py index e2a49d6d4754a..5b3b25d09c99c 100644 --- a/test/mkldnn/test_dequantize_mkldnn_op.py +++ b/test/mkldnn/test_dequantize_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 import paddle diff --git a/test/mkldnn/test_elementwise_add_bf16_mkldnn_op.py b/test/mkldnn/test_elementwise_add_bf16_mkldnn_op.py index d9d3bac981ced..645ec938b50cd 100644 --- a/test/mkldnn/test_elementwise_add_bf16_mkldnn_op.py +++ b/test/mkldnn/test_elementwise_add_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 from paddle import enable_static from paddle.base import core diff --git a/test/mkldnn/test_elementwise_add_mkldnn_op.py b/test/mkldnn/test_elementwise_add_mkldnn_op.py index 7b48c658e95e0..1d87cd065b370 100644 --- a/test/mkldnn/test_elementwise_add_mkldnn_op.py +++ b/test/mkldnn/test_elementwise_add_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import skip_check_grad_ci +from op_test import skip_check_grad_ci from test_elementwise_add_op import TestElementwiseAddOp from paddle import enable_static diff --git a/test/mkldnn/test_elementwise_div_mkldnn_op.py b/test/mkldnn/test_elementwise_div_mkldnn_op.py index d6c545cc017f5..bc3d340aba969 100644 --- a/test/mkldnn/test_elementwise_div_mkldnn_op.py +++ b/test/mkldnn/test_elementwise_div_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 from paddle import enable_static from paddle.base import core diff --git a/test/mkldnn/test_elementwise_mul_bf16_mkldnn_op.py b/test/mkldnn/test_elementwise_mul_bf16_mkldnn_op.py index ac1e47dd868d1..b339faa3093bd 100644 --- a/test/mkldnn/test_elementwise_mul_bf16_mkldnn_op.py +++ b/test/mkldnn/test_elementwise_mul_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 from paddle import enable_static from paddle.base import core diff --git a/test/mkldnn/test_elementwise_mul_onednn_op.py b/test/mkldnn/test_elementwise_mul_onednn_op.py index f8c38bf6d167a..ce5a7b58502f5 100644 --- a/test/mkldnn/test_elementwise_mul_onednn_op.py +++ b/test/mkldnn/test_elementwise_mul_onednn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import skip_check_grad_ci +from op_test import skip_check_grad_ci from test_elementwise_mul_op import ElementwiseMulOp from paddle import enable_static diff --git a/test/mkldnn/test_elementwise_sub_onednn_op.py b/test/mkldnn/test_elementwise_sub_onednn_op.py index 1340eac9c92b7..04097e035553a 100644 --- a/test/mkldnn/test_elementwise_sub_onednn_op.py +++ b/test/mkldnn/test_elementwise_sub_onednn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 from paddle import enable_static from paddle.base import core diff --git a/test/mkldnn/test_expand_v2_mkldnn_op.py b/test/mkldnn/test_expand_v2_mkldnn_op.py index 1ef44c8b27cb8..4c8b9d0221a4e 100644 --- a/test/mkldnn/test_expand_v2_mkldnn_op.py +++ b/test/mkldnn/test_expand_v2_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/mkldnn/test_fc_bf16_mkldnn_op.py b/test/mkldnn/test_fc_bf16_mkldnn_op.py index 7bc726e677693..f4a7f82232cd5 100644 --- a/test/mkldnn/test_fc_bf16_mkldnn_op.py +++ b/test/mkldnn/test_fc_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 from paddle import enable_static from paddle.base import core diff --git a/test/mkldnn/test_fc_int8_mkldnn_op.py b/test/mkldnn/test_fc_int8_mkldnn_op.py index 4d83ee1f008ba..2b0784f6d8252 100644 --- a/test/mkldnn/test_fc_int8_mkldnn_op.py +++ b/test/mkldnn/test_fc_int8_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool +from op_test import OpTest, OpTestTool @OpTestTool.skip_if_not_cpu() diff --git a/test/mkldnn/test_fc_mkldnn_op.py b/test/mkldnn/test_fc_mkldnn_op.py index 8373144a11cdd..7e61ef5984c60 100644 --- a/test/mkldnn/test_fc_mkldnn_op.py +++ b/test/mkldnn/test_fc_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest def fully_connected_naive(input, weights, bias_data): diff --git a/test/mkldnn/test_fill_constant_mkldnn_op.py b/test/mkldnn/test_fill_constant_mkldnn_op.py index c8b5e04979532..d293110ee7293 100644 --- a/test/mkldnn/test_fill_constant_mkldnn_op.py +++ b/test/mkldnn/test_fill_constant_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool +from op_test import OpTest, OpTestTool import paddle diff --git a/test/mkldnn/test_flatten_mkldnn_op.py b/test/mkldnn/test_flatten_mkldnn_op.py index b54a3974614f2..483262dee59dc 100644 --- a/test/mkldnn/test_flatten_mkldnn_op.py +++ b/test/mkldnn/test_flatten_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/mkldnn/test_fusion_gru_bf16_mkldnn_op.py b/test/mkldnn/test_fusion_gru_bf16_mkldnn_op.py index 0bac634467b5b..93b141f9eefca 100644 --- a/test/mkldnn/test_fusion_gru_bf16_mkldnn_op.py +++ b/test/mkldnn/test_fusion_gru_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 from test_fusion_gru_op import fusion_gru from test_fusion_lstm_op import ACTIVATION diff --git a/test/mkldnn/test_fusion_gru_int8_mkldnn_op.py b/test/mkldnn/test_fusion_gru_int8_mkldnn_op.py index a167fd40c8fc9..352ce5bc5db5f 100644 --- a/test/mkldnn/test_fusion_gru_int8_mkldnn_op.py +++ b/test/mkldnn/test_fusion_gru_int8_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest from test_fusion_gru_op import fusion_gru from test_fusion_lstm_op import ACTIVATION diff --git a/test/mkldnn/test_fusion_lstm_bf16_mkldnn_op.py b/test/mkldnn/test_fusion_lstm_bf16_mkldnn_op.py index 4ccd419d40731..12f0c54b40163 100644 --- a/test/mkldnn/test_fusion_lstm_bf16_mkldnn_op.py +++ b/test/mkldnn/test_fusion_lstm_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 from test_fusion_lstm_op import ACTIVATION, fusion_lstm from paddle.base import core diff --git a/test/mkldnn/test_fusion_lstm_int8_mkldnn_op.py b/test/mkldnn/test_fusion_lstm_int8_mkldnn_op.py index 546a30c3046ce..96bee8d9927bf 100644 --- a/test/mkldnn/test_fusion_lstm_int8_mkldnn_op.py +++ b/test/mkldnn/test_fusion_lstm_int8_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest from test_fusion_lstm_op import ACTIVATION, fusion_lstm diff --git a/test/mkldnn/test_gaussian_random_mkldnn_op.py b/test/mkldnn/test_gaussian_random_mkldnn_op.py index 133a01f593db9..d66212391ff0d 100644 --- a/test/mkldnn/test_gaussian_random_mkldnn_op.py +++ b/test/mkldnn/test_gaussian_random_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest from test_gaussian_random_op import TestGaussianRandomOp import paddle diff --git a/test/mkldnn/test_layer_norm_bf16_mkldnn_op.py b/test/mkldnn/test_layer_norm_bf16_mkldnn_op.py index 6e28472d5e9e0..a67dd64a4fbd4 100644 --- a/test/mkldnn/test_layer_norm_bf16_mkldnn_op.py +++ b/test/mkldnn/test_layer_norm_bf16_mkldnn_op.py @@ -18,7 +18,7 @@ from operator import mul import numpy as np -from eager_op_test import _set_use_system_allocator, convert_float_to_uint16 +from op_test import _set_use_system_allocator, convert_float_to_uint16 from test_layer_norm_mkldnn_op import ( TestLayerNormMKLDNNOp, _reference_layer_norm_naive, diff --git a/test/mkldnn/test_layer_norm_mkldnn_op.py b/test/mkldnn/test_layer_norm_mkldnn_op.py index 4533ccd05179d..4d0d7cce9c1dc 100644 --- a/test/mkldnn/test_layer_norm_mkldnn_op.py +++ b/test/mkldnn/test_layer_norm_mkldnn_op.py @@ -18,7 +18,7 @@ from operator import mul import numpy as np -from eager_op_test import OpTestTool, _set_use_system_allocator +from op_test import OpTestTool, _set_use_system_allocator from paddle import base, enable_static from paddle.base import core diff --git a/test/mkldnn/test_log_softmax_mkldnn_op.py b/test/mkldnn/test_log_softmax_mkldnn_op.py index 7bed35162cec6..8d4dff23a73e0 100644 --- a/test/mkldnn/test_log_softmax_mkldnn_op.py +++ b/test/mkldnn/test_log_softmax_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 from test_log_softmax import ref_log_softmax import paddle diff --git a/test/mkldnn/test_matmul_bf16_mkldnn_op.py b/test/mkldnn/test_matmul_bf16_mkldnn_op.py index 74b55b8db78bb..66650f2678463 100644 --- a/test/mkldnn/test_matmul_bf16_mkldnn_op.py +++ b/test/mkldnn/test_matmul_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 from paddle import enable_static from paddle.base import core diff --git a/test/mkldnn/test_matmul_mkldnn_op.py b/test/mkldnn/test_matmul_mkldnn_op.py index 43a3d6c304378..85a6d79de9759 100644 --- a/test/mkldnn/test_matmul_mkldnn_op.py +++ b/test/mkldnn/test_matmul_mkldnn_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest class TestDnnlMatMulOp(OpTest): diff --git a/test/mkldnn/test_matmul_v2_mkldnn_op.py b/test/mkldnn/test_matmul_v2_mkldnn_op.py index 97dab61f9dc0a..8c9fb2e092835 100644 --- a/test/mkldnn/test_matmul_v2_mkldnn_op.py +++ b/test/mkldnn/test_matmul_v2_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/mkldnn/test_mul_int8_mkldnn_op.py b/test/mkldnn/test_mul_int8_mkldnn_op.py index 4d3fd1afca472..75cb7eb9a604f 100644 --- a/test/mkldnn/test_mul_int8_mkldnn_op.py +++ b/test/mkldnn/test_mul_int8_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci +from op_test import OpTest, skip_check_grad_ci import paddle from paddle.base import core diff --git a/test/mkldnn/test_mul_mkldnn_op.py b/test/mkldnn/test_mul_mkldnn_op.py index 948addfc17751..5466267ad47a0 100644 --- a/test/mkldnn/test_mul_mkldnn_op.py +++ b/test/mkldnn/test_mul_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/mkldnn/test_multi_gru_mkldnn_op.py b/test/mkldnn/test_multi_gru_mkldnn_op.py index b52fe95ce2b52..afabd03a3a0dc 100644 --- a/test/mkldnn/test_multi_gru_mkldnn_op.py +++ b/test/mkldnn/test_multi_gru_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest from test_fusion_gru_op import ACTIVATION, fusion_gru diff --git a/test/mkldnn/test_nearest_interp_mkldnn_op.py b/test/mkldnn/test_nearest_interp_mkldnn_op.py index a3f6d85693e86..1e07a60568824 100644 --- a/test/mkldnn/test_nearest_interp_mkldnn_op.py +++ b/test/mkldnn/test_nearest_interp_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci +from op_test import OpTest, skip_check_grad_ci def nearest_neighbor_interp_mkldnn_np( diff --git a/test/mkldnn/test_nearest_interp_v2_mkldnn_op.py b/test/mkldnn/test_nearest_interp_v2_mkldnn_op.py index 0c7875dfb8b7a..ec3f40dfcd8f6 100644 --- a/test/mkldnn/test_nearest_interp_v2_mkldnn_op.py +++ b/test/mkldnn/test_nearest_interp_v2_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import ( +from op_test import ( OpTest, OpTestTool, convert_float_to_uint16, diff --git a/test/mkldnn/test_pool2d_bf16_mkldnn_op.py b/test/mkldnn/test_pool2d_bf16_mkldnn_op.py index 0a1b04d157a9b..0b510e5e7fa50 100644 --- a/test/mkldnn/test_pool2d_bf16_mkldnn_op.py +++ b/test/mkldnn/test_pool2d_bf16_mkldnn_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 from test_pool2d_op import ( TestPool2D_Op_Mixin, adaptive_end_index, diff --git a/test/mkldnn/test_pool2d_int8_mkldnn_op.py b/test/mkldnn/test_pool2d_int8_mkldnn_op.py index 47ed3728150be..5b41081821b3e 100644 --- a/test/mkldnn/test_pool2d_int8_mkldnn_op.py +++ b/test/mkldnn/test_pool2d_int8_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest from test_pool2d_op import TestPool2D_Op, max_pool2D_forward_naive from paddle.base import core diff --git a/test/mkldnn/test_prelu_mkldnn_op.py b/test/mkldnn/test_prelu_mkldnn_op.py index a3264c646bc3e..c32169bc9fe7f 100644 --- a/test/mkldnn/test_prelu_mkldnn_op.py +++ b/test/mkldnn/test_prelu_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/mkldnn/test_quantize_mkldnn_op.py b/test/mkldnn/test_quantize_mkldnn_op.py index 22324e4b035b3..12c10f4ae656a 100644 --- a/test/mkldnn/test_quantize_mkldnn_op.py +++ b/test/mkldnn/test_quantize_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest import paddle diff --git a/test/mkldnn/test_reduce_bf16_mkldnn_op.py b/test/mkldnn/test_reduce_bf16_mkldnn_op.py index 5407efd05a48d..187ce4cde4739 100644 --- a/test/mkldnn/test_reduce_bf16_mkldnn_op.py +++ b/test/mkldnn/test_reduce_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import ( +from op_test import ( OpTest, OpTestTool, convert_float_to_uint16, diff --git a/test/mkldnn/test_reduce_mkldnn_op.py b/test/mkldnn/test_reduce_mkldnn_op.py index 8e0ae6274d92a..3dce2c72e5568 100644 --- a/test/mkldnn/test_reduce_mkldnn_op.py +++ b/test/mkldnn/test_reduce_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, skip_check_grad_ci +from op_test import OpTest, OpTestTool, skip_check_grad_ci import paddle diff --git a/test/mkldnn/test_requantize_mkldnn_op.py b/test/mkldnn/test_requantize_mkldnn_op.py index fbe5d075422d1..3c5f3f1cf992d 100644 --- a/test/mkldnn/test_requantize_mkldnn_op.py +++ b/test/mkldnn/test_requantize_mkldnn_op.py @@ -15,8 +15,8 @@ import unittest import numpy as np -from eager_op_test import OpTest from mkldnn_op_test import format_reorder +from op_test import OpTest from paddle import base from paddle.base import core diff --git a/test/mkldnn/test_reshape_bf16_op.py b/test/mkldnn/test_reshape_bf16_op.py index 76b509219b105..245c47a327db7 100644 --- a/test/mkldnn/test_reshape_bf16_op.py +++ b/test/mkldnn/test_reshape_bf16_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 from paddle import enable_static from paddle.base import core diff --git a/test/mkldnn/test_reshape_mkldnn_op.py b/test/mkldnn/test_reshape_mkldnn_op.py index ca06b5fd4c748..f30fd939f3aae 100644 --- a/test/mkldnn/test_reshape_mkldnn_op.py +++ b/test/mkldnn/test_reshape_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/mkldnn/test_scale_bf16_mkldnn_op.py b/test/mkldnn/test_scale_bf16_mkldnn_op.py index a50e47a712cb4..3f0a2be49290c 100644 --- a/test/mkldnn/test_scale_bf16_mkldnn_op.py +++ b/test/mkldnn/test_scale_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/mkldnn/test_scale_mkldnn_op.py b/test/mkldnn/test_scale_mkldnn_op.py index f60b84ecd2b88..54b412bf8f155 100644 --- a/test/mkldnn/test_scale_mkldnn_op.py +++ b/test/mkldnn/test_scale_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest import paddle diff --git a/test/mkldnn/test_shape_mkldnn_op.py b/test/mkldnn/test_shape_mkldnn_op.py index 4325062628e95..ed9b81f8e3599 100644 --- a/test/mkldnn/test_shape_mkldnn_op.py +++ b/test/mkldnn/test_shape_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool +from op_test import OpTest, OpTestTool import paddle from paddle.base import core diff --git a/test/mkldnn/test_shuffle_channel_mkldnn_op.py b/test/mkldnn/test_shuffle_channel_mkldnn_op.py index d363bef88606b..90ca2e44ed986 100644 --- a/test/mkldnn/test_shuffle_channel_mkldnn_op.py +++ b/test/mkldnn/test_shuffle_channel_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool +from op_test import OpTest, OpTestTool import paddle from paddle.base import core diff --git a/test/mkldnn/test_slice_mkldnn_op.py b/test/mkldnn/test_slice_mkldnn_op.py index b733a11ca912c..66161dbad4908 100644 --- a/test/mkldnn/test_slice_mkldnn_op.py +++ b/test/mkldnn/test_slice_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/mkldnn/test_softmax_bf16_mkldnn_op.py b/test/mkldnn/test_softmax_bf16_mkldnn_op.py index 2e04100ec31ad..d8881af4e2956 100644 --- a/test/mkldnn/test_softmax_bf16_mkldnn_op.py +++ b/test/mkldnn/test_softmax_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import convert_float_to_uint16 +from op_test import convert_float_to_uint16 from test_softmax_op import ( TestSoftmaxOp, TestSoftmaxOp2, diff --git a/test/mkldnn/test_softmax_mkldnn_op.py b/test/mkldnn/test_softmax_mkldnn_op.py index 777dfb0cb02dc..d66ff320d9f26 100644 --- a/test/mkldnn/test_softmax_mkldnn_op.py +++ b/test/mkldnn/test_softmax_mkldnn_op.py @@ -15,8 +15,8 @@ import unittest import numpy as np -from eager_op_test import OpTest from mkldnn_op_test import check_if_mkldnn_primitives_exist_in_bwd +from op_test import OpTest from test_softmax_op import ( TestSoftmaxOp, TestSoftmaxOp2, diff --git a/test/mkldnn/test_softplus_mkldnn_op.py b/test/mkldnn/test_softplus_mkldnn_op.py index 65e29014cb6e9..58e4fafdf2698 100644 --- a/test/mkldnn/test_softplus_mkldnn_op.py +++ b/test/mkldnn/test_softplus_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 import paddle diff --git a/test/mkldnn/test_split_bf16_mkldnn_op.py b/test/mkldnn/test_split_bf16_mkldnn_op.py index 81e25ce43b9a9..6e8b1b56ebc07 100644 --- a/test/mkldnn/test_split_bf16_mkldnn_op.py +++ b/test/mkldnn/test_split_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/mkldnn/test_split_mkldnn_op.py b/test/mkldnn/test_split_mkldnn_op.py index 6a049de4f3551..15a24c3b4861f 100644 --- a/test/mkldnn/test_split_mkldnn_op.py +++ b/test/mkldnn/test_split_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest import paddle diff --git a/test/mkldnn/test_squeeze2_mkldnn_op.py b/test/mkldnn/test_squeeze2_mkldnn_op.py index b1efad9690bb6..61521ecf8bc80 100644 --- a/test/mkldnn/test_squeeze2_mkldnn_op.py +++ b/test/mkldnn/test_squeeze2_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool, convert_float_to_uint16 +from op_test import OpTest, OpTestTool, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/mkldnn/test_stack_mkldnn_op.py b/test/mkldnn/test_stack_mkldnn_op.py index 7a04ea38be9a5..82acf285ce16d 100644 --- a/test/mkldnn/test_stack_mkldnn_op.py +++ b/test/mkldnn/test_stack_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, OpTestTool +from op_test import OpTest, OpTestTool import paddle from paddle.base import core diff --git a/test/mkldnn/test_sum_bf16_mkldnn_op.py b/test/mkldnn/test_sum_bf16_mkldnn_op.py index af622b8cff5d4..8fbef74e38d2d 100644 --- a/test/mkldnn/test_sum_bf16_mkldnn_op.py +++ b/test/mkldnn/test_sum_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import convert_float_to_uint16 +from op_test import convert_float_to_uint16 from test_sum_op import TestSumOp from paddle import enable_static diff --git a/test/mkldnn/test_transpose_bf16_mkldnn_op.py b/test/mkldnn/test_transpose_bf16_mkldnn_op.py index d0817ab103db6..bd0f8473205d6 100644 --- a/test/mkldnn/test_transpose_bf16_mkldnn_op.py +++ b/test/mkldnn/test_transpose_bf16_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 from paddle import enable_static from paddle.base import core diff --git a/test/mkldnn/test_transpose_int8_mkldnn_op.py b/test/mkldnn/test_transpose_int8_mkldnn_op.py index 282c6dd94acea..b800d6b40c504 100644 --- a/test/mkldnn/test_transpose_int8_mkldnn_op.py +++ b/test/mkldnn/test_transpose_int8_mkldnn_op.py @@ -15,8 +15,8 @@ import unittest import numpy as np -from eager_op_test import OpTest from mkldnn_op_test import format_reorder +from op_test import OpTest from paddle.base import core diff --git a/test/mkldnn/test_transpose_mkldnn_op.py b/test/mkldnn/test_transpose_mkldnn_op.py index 5562cc7f5a1d8..5286c561e0861 100644 --- a/test/mkldnn/test_transpose_mkldnn_op.py +++ b/test/mkldnn/test_transpose_mkldnn_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest class TestTransposeMKLDNN(OpTest): diff --git a/test/sequence/test_sequence_concat.py b/test/sequence/test_sequence_concat.py index 513003c0df107..7eb37e7b3803b 100644 --- a/test/sequence/test_sequence_concat.py +++ b/test/sequence/test_sequence_concat.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest import paddle diff --git a/test/sequence/test_sequence_conv.py b/test/sequence/test_sequence_conv.py index 62ac526d61e0f..21644be661dde 100644 --- a/test/sequence/test_sequence_conv.py +++ b/test/sequence/test_sequence_conv.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest import paddle diff --git a/test/sequence/test_sequence_erase_op.py b/test/sequence/test_sequence_erase_op.py index 94aa4fde4d036..96f72b798e296 100644 --- a/test/sequence/test_sequence_erase_op.py +++ b/test/sequence/test_sequence_erase_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest def sequence_erase(in_seq, lod0, tokens): diff --git a/test/sequence/test_sequence_expand.py b/test/sequence/test_sequence_expand.py index 8a0553fb03054..edab321bccb91 100644 --- a/test/sequence/test_sequence_expand.py +++ b/test/sequence/test_sequence_expand.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest class TestSequenceExpand(OpTest): diff --git a/test/sequence/test_sequence_expand_as.py b/test/sequence/test_sequence_expand_as.py index 090a6242c003a..82d0e0c395522 100644 --- a/test/sequence/test_sequence_expand_as.py +++ b/test/sequence/test_sequence_expand_as.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest import paddle from paddle.base import Program, program_guard diff --git a/test/sequence/test_sequence_mask.py b/test/sequence/test_sequence_mask.py index 54d7a3c87dcad..9cd14490f43c0 100644 --- a/test/sequence/test_sequence_mask.py +++ b/test/sequence/test_sequence_mask.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest import paddle from paddle.base.framework import ( diff --git a/test/sequence/test_sequence_pad_op.py b/test/sequence/test_sequence_pad_op.py index b78ddf12eef9a..788671a51c3de 100644 --- a/test/sequence/test_sequence_pad_op.py +++ b/test/sequence/test_sequence_pad_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/sequence/test_sequence_pool.py b/test/sequence/test_sequence_pool.py index d25af65629a56..44727bd359c68 100644 --- a/test/sequence/test_sequence_pool.py +++ b/test/sequence/test_sequence_pool.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci +from op_test import OpTest, skip_check_grad_ci import paddle diff --git a/test/sequence/test_sequence_reshape.py b/test/sequence/test_sequence_reshape.py index 5fa6b443a11ce..1c4af6bf5a134 100644 --- a/test/sequence/test_sequence_reshape.py +++ b/test/sequence/test_sequence_reshape.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest import paddle diff --git a/test/sequence/test_sequence_reverse.py b/test/sequence/test_sequence_reverse.py index 7e3016a67e00a..f43c03018585f 100644 --- a/test/sequence/test_sequence_reverse.py +++ b/test/sequence/test_sequence_reverse.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest import paddle diff --git a/test/sequence/test_sequence_scatter_op.py b/test/sequence/test_sequence_scatter_op.py index 7363b3c34d4a5..626c5363552c9 100644 --- a/test/sequence/test_sequence_scatter_op.py +++ b/test/sequence/test_sequence_scatter_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest class TestSequenceScatterOp(OpTest): diff --git a/test/sequence/test_sequence_slice_op.py b/test/sequence/test_sequence_slice_op.py index a68087ff75fe4..22c276824c8a5 100644 --- a/test/sequence/test_sequence_slice_op.py +++ b/test/sequence/test_sequence_slice_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest class TestSequenceSliceOp(OpTest): diff --git a/test/sequence/test_sequence_softmax_op.py b/test/sequence/test_sequence_softmax_op.py index de6258bbc2612..10ce6a318f4f2 100644 --- a/test/sequence/test_sequence_softmax_op.py +++ b/test/sequence/test_sequence_softmax_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest from test_softmax_op import stable_softmax from paddle.base import core diff --git a/test/sequence/test_sequence_topk_avg_pooling.py b/test/sequence/test_sequence_topk_avg_pooling.py index 4d120b6be8afd..470b3029ab9ed 100644 --- a/test/sequence/test_sequence_topk_avg_pooling.py +++ b/test/sequence/test_sequence_topk_avg_pooling.py @@ -17,7 +17,7 @@ from copy import deepcopy import numpy as np -from eager_op_test import OpTest +from op_test import OpTest class TestSequenceTopkAvgPoolingOp(OpTest): diff --git a/test/sequence/test_sequence_unpad_op.py b/test/sequence/test_sequence_unpad_op.py index bc59fb9aa9471..9eaaff04e5fdf 100644 --- a/test/sequence/test_sequence_unpad_op.py +++ b/test/sequence/test_sequence_unpad_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest import paddle diff --git a/test/xpu/op_test_xpu.py b/test/xpu/op_test_xpu.py index b17561758ad2d..543465a7cc752 100644 --- a/test/xpu/op_test_xpu.py +++ b/test/xpu/op_test_xpu.py @@ -14,12 +14,12 @@ import numpy as np -from eager_op_test import OpTest from get_test_cover_info import ( get_xpu_op_support_types, is_empty_grad_op_type, type_dict_str_to_numpy, ) +from op_test import OpTest from testsuite import append_loss_ops, create_op, set_input from white_list import no_grad_set_white_list, op_threshold_white_list diff --git a/test/xpu/test_activation_op_xpu.py b/test/xpu/test_activation_op_xpu.py index b2a546542b91a..52a42cb4c3779 100644 --- a/test/xpu/test_activation_op_xpu.py +++ b/test/xpu/test_activation_op_xpu.py @@ -17,12 +17,12 @@ import unittest import numpy as np -from eager_op_test import OpTest from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import OpTest from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_bitwise_op_xpu.py b/test/xpu/test_bitwise_op_xpu.py index 1d261c95bb49a..d00b4c067da2b 100644 --- a/test/xpu/test_bitwise_op_xpu.py +++ b/test/xpu/test_bitwise_op_xpu.py @@ -16,12 +16,12 @@ import unittest import numpy as np -from eager_op_test import OpTest from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import OpTest from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_concat_op_xpu.py b/test/xpu/test_concat_op_xpu.py index 99e99bc9ec922..908f90c6c5b18 100644 --- a/test/xpu/test_concat_op_xpu.py +++ b/test/xpu/test_concat_op_xpu.py @@ -16,12 +16,12 @@ import unittest import numpy as np -from eager_op_test import skip_check_grad_ci from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import skip_check_grad_ci from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_diagonal_op_xpu.py b/test/xpu/test_diagonal_op_xpu.py index a4ea644cfb97c..9874d124e7388 100644 --- a/test/xpu/test_diagonal_op_xpu.py +++ b/test/xpu/test_diagonal_op_xpu.py @@ -16,12 +16,12 @@ import unittest import numpy as np -from eager_op_test import skip_check_grad_ci from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import skip_check_grad_ci from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_elementwise_add_op_xpu.py b/test/xpu/test_elementwise_add_op_xpu.py index 796f936c16f87..6c3b1e69abe36 100644 --- a/test/xpu/test_elementwise_add_op_xpu.py +++ b/test/xpu/test_elementwise_add_op_xpu.py @@ -16,12 +16,12 @@ import unittest import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import OpTest, skip_check_grad_ci from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_elementwise_add_op_xpu_kp.py b/test/xpu/test_elementwise_add_op_xpu_kp.py index ff5c1afeaa902..c551a538ce147 100644 --- a/test/xpu/test_elementwise_add_op_xpu_kp.py +++ b/test/xpu/test_elementwise_add_op_xpu_kp.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci +from op_test import OpTest, skip_check_grad_ci from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_elementwise_div_op_xpu.py b/test/xpu/test_elementwise_div_op_xpu.py index 481bb6c9c0d7c..52e2e62e067d2 100644 --- a/test/xpu/test_elementwise_div_op_xpu.py +++ b/test/xpu/test_elementwise_div_op_xpu.py @@ -15,12 +15,12 @@ import unittest import numpy as np -from eager_op_test import skip_check_grad_ci from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import skip_check_grad_ci from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_elementwise_floordiv_op_xpu.py b/test/xpu/test_elementwise_floordiv_op_xpu.py index 1fbe2b72f70b1..b2ad694f967de 100644 --- a/test/xpu/test_elementwise_floordiv_op_xpu.py +++ b/test/xpu/test_elementwise_floordiv_op_xpu.py @@ -15,12 +15,12 @@ import unittest import numpy as np -from eager_op_test import OpTest from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import OpTest from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_elementwise_max_op_xpu.py b/test/xpu/test_elementwise_max_op_xpu.py index d897cb8acaebc..f1a8ca8b57278 100644 --- a/test/xpu/test_elementwise_max_op_xpu.py +++ b/test/xpu/test_elementwise_max_op_xpu.py @@ -15,12 +15,12 @@ import unittest import numpy as np -from eager_op_test import skip_check_grad_ci from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import skip_check_grad_ci from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_elementwise_min_op_xpu.py b/test/xpu/test_elementwise_min_op_xpu.py index 0836fcf9f3085..3190c71e76fad 100644 --- a/test/xpu/test_elementwise_min_op_xpu.py +++ b/test/xpu/test_elementwise_min_op_xpu.py @@ -15,12 +15,12 @@ import unittest import numpy as np -from eager_op_test import skip_check_grad_ci from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import skip_check_grad_ci from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_elementwise_mod_op_xpu.py b/test/xpu/test_elementwise_mod_op_xpu.py index 06ed903b47201..0b80e8e5511f0 100644 --- a/test/xpu/test_elementwise_mod_op_xpu.py +++ b/test/xpu/test_elementwise_mod_op_xpu.py @@ -15,12 +15,12 @@ import unittest import numpy as np -from eager_op_test import OpTest from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import OpTest from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_elementwise_mul_op_xpu.py b/test/xpu/test_elementwise_mul_op_xpu.py index fdb9673cf1c72..6bd604df07e40 100644 --- a/test/xpu/test_elementwise_mul_op_xpu.py +++ b/test/xpu/test_elementwise_mul_op_xpu.py @@ -15,12 +15,12 @@ import unittest import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import OpTest, skip_check_grad_ci from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_elementwise_pow_op_xpu.py b/test/xpu/test_elementwise_pow_op_xpu.py index a757af81bf3cf..ddcf64fb9d405 100644 --- a/test/xpu/test_elementwise_pow_op_xpu.py +++ b/test/xpu/test_elementwise_pow_op_xpu.py @@ -15,12 +15,12 @@ import unittest import numpy as np -from eager_op_test import OpTest, skip_check_grad_ci from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import OpTest, skip_check_grad_ci from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_elementwise_sub_op_xpu.py b/test/xpu/test_elementwise_sub_op_xpu.py index 1c96f6b9441e6..8e595932eae29 100644 --- a/test/xpu/test_elementwise_sub_op_xpu.py +++ b/test/xpu/test_elementwise_sub_op_xpu.py @@ -16,12 +16,12 @@ import unittest import numpy as np -from eager_op_test import skip_check_grad_ci from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import skip_check_grad_ci from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_fill_constant_op_xpu.py b/test/xpu/test_fill_constant_op_xpu.py index 2467a03ce63c9..afd54cbd9ae48 100644 --- a/test/xpu/test_fill_constant_op_xpu.py +++ b/test/xpu/test_fill_constant_op_xpu.py @@ -16,12 +16,12 @@ import unittest import numpy as np -from eager_op_test import convert_float_to_uint16 from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import convert_float_to_uint16 from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_fill_diagonal_tensor_op_xpu.py b/test/xpu/test_fill_diagonal_tensor_op_xpu.py index eca8ab3352729..9d0f4f425fba1 100644 --- a/test/xpu/test_fill_diagonal_tensor_op_xpu.py +++ b/test/xpu/test_fill_diagonal_tensor_op_xpu.py @@ -16,12 +16,12 @@ import unittest import numpy as np -from eager_op_test import skip_check_grad_ci from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import skip_check_grad_ci from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_fused_resnet_basic_block_op_xpu.py b/test/xpu/test_fused_resnet_basic_block_op_xpu.py index 709222496fcde..c7500f8ea8a87 100644 --- a/test/xpu/test_fused_resnet_basic_block_op_xpu.py +++ b/test/xpu/test_fused_resnet_basic_block_op_xpu.py @@ -16,12 +16,12 @@ import unittest import numpy as np -from eager_op_test import OpTest from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import OpTest import paddle from paddle import base, nn diff --git a/test/xpu/test_group_norm_op_xpu.py b/test/xpu/test_group_norm_op_xpu.py index bf0b528b6e8a7..6c8a5a0e44280 100644 --- a/test/xpu/test_group_norm_op_xpu.py +++ b/test/xpu/test_group_norm_op_xpu.py @@ -16,12 +16,12 @@ import unittest import numpy as np -from eager_op_test import OpTest from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import OpTest from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_huber_loss_op_xpu.py b/test/xpu/test_huber_loss_op_xpu.py index a41d4a250327c..fc20d52efb682 100644 --- a/test/xpu/test_huber_loss_op_xpu.py +++ b/test/xpu/test_huber_loss_op_xpu.py @@ -16,12 +16,12 @@ import unittest import numpy as np -from eager_op_test import OpTest from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import OpTest from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_log_loss_op_xpu.py b/test/xpu/test_log_loss_op_xpu.py index 1262288166b59..6137d00ad3441 100644 --- a/test/xpu/test_log_loss_op_xpu.py +++ b/test/xpu/test_log_loss_op_xpu.py @@ -16,7 +16,7 @@ import unittest import numpy as np -from eager_op_test import OpTest +from op_test import OpTest import paddle diff --git a/test/xpu/test_logical_op_xpu.py b/test/xpu/test_logical_op_xpu.py index 90d6ba1c9335c..584e1afe2905a 100755 --- a/test/xpu/test_logical_op_xpu.py +++ b/test/xpu/test_logical_op_xpu.py @@ -16,12 +16,12 @@ import unittest import numpy as np -from eager_op_test import OpTest from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import OpTest from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_refactor_op_xpu.py b/test/xpu/test_refactor_op_xpu.py index 51bad8cec2e82..f0193fb1aad1a 100644 --- a/test/xpu/test_refactor_op_xpu.py +++ b/test/xpu/test_refactor_op_xpu.py @@ -16,12 +16,12 @@ import unittest import numpy as np -from eager_op_test import OpTest from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import OpTest from op_test_xpu import XPUOpTest import paddle diff --git a/test/xpu/test_stack_op_xpu.py b/test/xpu/test_stack_op_xpu.py index cf49dcabef471..8ed1b4c637abc 100644 --- a/test/xpu/test_stack_op_xpu.py +++ b/test/xpu/test_stack_op_xpu.py @@ -15,12 +15,12 @@ import unittest import numpy as np -from eager_op_test import skip_check_grad_ci from get_test_cover_info import ( XPUOpTestWrapper, create_test_class, get_xpu_op_support_types, ) +from op_test import skip_check_grad_ci from op_test_xpu import XPUOpTest import paddle diff --git a/tools/jetson_infer_op.py b/tools/jetson_infer_op.py index 80bf1555a3dfb..300d796ea9d44 100644 --- a/tools/jetson_infer_op.py +++ b/tools/jetson_infer_op.py @@ -156,8 +156,8 @@ def get_op_list(op_list_file='list_op.txt'): def set_diff_value(file, atol="1e-5", inplace_atol="1e-7"): """ - :param file: refer to eager_op_test.py - :param atol: refer to eager_op_test.py + :param file: refer to op_test.py + :param atol: refer to op_test.py :param inplace_atol: :return: """ @@ -269,8 +269,8 @@ def run_test_first(op_list_file): """ old_list = get_op_list(op_list_file) new_list = filter(lambda x: x not in black_list, old_list) - eager_op_test = transform_list_to_str(new_list) - os.system("ctest -R \"(" + eager_op_test + ")\" >& test_op_log.txt") + op_test = transform_list_to_str(new_list) + os.system("ctest -R \"(" + op_test + ")\" >& test_op_log.txt") def run_test_second(): From 0eabcfb408dcc920cd2f139e2a7aa12843c3853d Mon Sep 17 00:00:00 2001 From: chenzhiyang <1792266893@qq.com> Date: Tue, 12 Sep 2023 08:47:21 +0000 Subject: [PATCH 2/4] refine code --- test/legacy_test/benchmark.py | 2 +- test/legacy_test/c_embedding_op_base.py | 2 +- test/legacy_test/test_accuracy_op.py | 6 +----- test/legacy_test/test_activation_op.py | 2 +- test/legacy_test/test_adadelta_op.py | 2 +- test/legacy_test/test_adagrad_op.py | 2 +- test/legacy_test/test_adam_op.py | 2 +- test/legacy_test/test_adamax_op.py | 2 +- test/legacy_test/test_adamw_op.py | 2 +- test/legacy_test/test_adaptive_max_pool1d.py | 2 +- test/legacy_test/test_adaptive_max_pool2d.py | 2 +- test/legacy_test/test_adaptive_max_pool3d.py | 2 +- test/legacy_test/test_add_position_encoding_op.py | 2 +- test/legacy_test/test_addmm_op.py | 2 +- test/legacy_test/test_affine_channel_op.py | 2 +- test/legacy_test/test_affine_grid_op.py | 2 +- test/legacy_test/test_allclose_op.py | 2 +- test/legacy_test/test_amp_check_finite_and_scale_op.py | 2 +- test/legacy_test/test_anchor_generator_op.py | 2 +- test/legacy_test/test_angle_op.py | 2 +- test/legacy_test/test_arange.py | 2 +- test/legacy_test/test_arg_min_max_op.py | 2 +- test/legacy_test/test_arg_min_max_v2_op.py | 2 +- test/legacy_test/test_argsort_op.py | 2 +- test/legacy_test/test_assign_op.py | 7 ++----- test/legacy_test/test_assign_pos_op.py | 2 +- test/legacy_test/test_assign_value_op.py | 2 +- test/legacy_test/test_atan2_op.py | 2 +- test/legacy_test/test_attention_lstm_op.py | 2 +- test/legacy_test/test_auc_op.py | 2 +- test/legacy_test/test_auc_single_pred_op.py | 2 +- test/legacy_test/test_batch_fc_op.py | 2 +- test/legacy_test/test_batch_norm_op.py | 8 ++++---- test/legacy_test/test_batch_norm_op_prim_nchw.py | 6 +----- test/legacy_test/test_batch_norm_op_prim_nhwc.py | 2 +- test/legacy_test/test_bce_loss.py | 2 +- test/legacy_test/test_bernoulli_op.py | 2 +- test/legacy_test/test_bicubic_interp_op.py | 2 +- test/legacy_test/test_bicubic_interp_v2_op.py | 2 +- test/legacy_test/test_bilateral_slice_op.py | 2 +- test/legacy_test/test_bilinear_interp_op.py | 2 +- test/legacy_test/test_bilinear_interp_v2_op.py | 2 +- test/legacy_test/test_bilinear_tensor_product_op.py | 2 +- test/legacy_test/test_bincount_op.py | 2 +- test/legacy_test/test_bipartite_match_op.py | 2 +- test/legacy_test/test_bitwise_op.py | 2 +- test/legacy_test/test_bmm_op.py | 6 +----- test/legacy_test/test_box_clip_op.py | 2 +- test/legacy_test/test_box_coder_op.py | 2 +- test/legacy_test/test_box_decoder_and_assign_op.py | 2 +- test/legacy_test/test_bpr_loss_op.py | 2 +- test/legacy_test/test_broadcast_error.py | 2 +- test/legacy_test/test_broadcast_tensors_op.py | 2 +- test/legacy_test/test_cast_op.py | 6 +----- test/legacy_test/test_center_loss.py | 2 +- test/legacy_test/test_channel_shuffle.py | 2 +- test/legacy_test/test_cholesky_op.py | 2 +- test/legacy_test/test_cholesky_solve_op.py | 2 +- test/legacy_test/test_chunk_eval_op.py | 2 +- test/legacy_test/test_class_center_sample_op.py | 2 +- test/legacy_test/test_clip_by_norm_op.py | 2 +- test/legacy_test/test_clip_op.py | 2 +- test/legacy_test/test_coalesce_tensor_op.py | 2 +- test/legacy_test/test_collect_fpn_proposals_op.py | 2 +- test/legacy_test/test_collective_api_base.py | 6 +----- test/legacy_test/test_compare_op.py | 2 +- test/legacy_test/test_compare_reduce_op.py | 2 +- test/legacy_test/test_complex_abs.py | 2 +- test/legacy_test/test_complex_op.py | 2 +- test/legacy_test/test_complex_view_op.py | 2 +- test/legacy_test/test_concat_op.py | 6 +----- test/legacy_test/test_conj_op.py | 3 +-- test/legacy_test/test_conv2d_fusion_op.py | 2 +- test/legacy_test/test_conv2d_op.py | 6 +----- test/legacy_test/test_conv2d_op_depthwise_conv.py | 3 +-- test/legacy_test/test_conv2d_transpose_op.py | 7 +------ test/legacy_test/test_conv3d_op.py | 6 +++--- test/legacy_test/test_conv3d_transpose_op.py | 2 +- test/legacy_test/test_conv_shift_op.py | 2 +- test/legacy_test/test_cos_sim_op.py | 2 +- test/legacy_test/test_crf_decoding_op.py | 2 +- test/legacy_test/test_crop_op.py | 2 +- test/legacy_test/test_crop_tensor_op.py | 2 +- test/legacy_test/test_cross_entropy2_op.py | 2 +- test/legacy_test/test_cross_entropy_op.py | 6 +----- test/legacy_test/test_cross_op.py | 2 +- test/legacy_test/test_ctc_align.py | 2 +- test/legacy_test/test_cummax_op.py | 2 +- test/legacy_test/test_cummin_op.py | 2 +- test/legacy_test/test_cumprod_op.py | 2 +- test/legacy_test/test_cumsum_op.py | 2 +- test/legacy_test/test_cvm_op.py | 2 +- test/legacy_test/test_data_norm_op.py | 2 +- test/legacy_test/test_decayed_adagrad_op.py | 2 +- test/legacy_test/test_deformable_conv_op.py | 2 +- test/legacy_test/test_deformable_conv_v1_op.py | 2 +- test/legacy_test/test_density_prior_box_op.py | 2 +- test/legacy_test/test_dequantize_abs_max_op.py | 2 +- test/legacy_test/test_dequantize_log_op.py | 2 +- test/legacy_test/test_detection_map_op.py | 2 +- test/legacy_test/test_determinant_op.py | 2 +- test/legacy_test/test_diag.py | 2 +- test/legacy_test/test_diag_embed.py | 2 +- test/legacy_test/test_diag_v2.py | 2 +- test/legacy_test/test_diagonal_op.py | 2 +- test/legacy_test/test_digamma_op.py | 2 +- test/legacy_test/test_dist_op.py | 2 +- test/legacy_test/test_distribute_fpn_proposals_op.py | 2 +- test/legacy_test/test_dot_op.py | 2 +- test/legacy_test/test_dpsgd_op.py | 2 +- test/legacy_test/test_dropout_nd_op.py | 2 +- test/legacy_test/test_dropout_op.py | 6 +----- test/legacy_test/test_edit_distance_op.py | 2 +- test/legacy_test/test_eig_op.py | 2 +- test/legacy_test/test_eigh_op.py | 2 +- test/legacy_test/test_eigvals_op.py | 2 +- test/legacy_test/test_eigvalsh_op.py | 2 +- test/legacy_test/test_einsum_op.py | 2 +- test/legacy_test/test_elementwise_add_op.py | 6 +----- test/legacy_test/test_elementwise_div_op.py | 6 +----- test/legacy_test/test_elementwise_floordiv_op.py | 2 +- test/legacy_test/test_elementwise_heaviside_op.py | 2 +- test/legacy_test/test_elementwise_max_op.py | 6 +----- test/legacy_test/test_elementwise_min_op.py | 6 +----- test/legacy_test/test_elementwise_mod_op.py | 6 +----- test/legacy_test/test_elementwise_mul_op.py | 6 +----- test/legacy_test/test_elementwise_pow_op.py | 6 +----- test/legacy_test/test_elementwise_sub_op.py | 6 +----- test/legacy_test/test_empty_like_op.py | 2 +- test/legacy_test/test_empty_op.py | 2 +- test/legacy_test/test_erf_op.py | 2 +- test/legacy_test/test_erfinv_op.py | 6 +----- .../test_executor_return_tensor_not_overwriting.py | 2 +- test/legacy_test/test_expand_as_op.py | 2 +- test/legacy_test/test_expand_as_v2_op.py | 2 +- test/legacy_test/test_expand_op.py | 2 +- test/legacy_test/test_expand_v2_op.py | 2 +- test/legacy_test/test_exponential_op.py | 6 +----- test/legacy_test/test_eye_op.py | 2 +- test/legacy_test/test_fake_dequantize_op.py | 2 +- test/legacy_test/test_fake_quantize_op.py | 2 +- test/legacy_test/test_fc_op.py | 2 +- test/legacy_test/test_fill_any_like_op.py | 2 +- test/legacy_test/test_fill_any_op.py | 2 +- test/legacy_test/test_fill_constant_op.py | 2 +- test/legacy_test/test_fill_diagonal_tensor_op.py | 2 +- test/legacy_test/test_fill_op.py | 2 +- test/legacy_test/test_fill_zeros_like2_op.py | 2 +- test/legacy_test/test_fill_zeros_like_op.py | 2 +- test/legacy_test/test_filter_by_instag_op.py | 2 +- test/legacy_test/test_flatten2_op.py | 2 +- test/legacy_test/test_flatten_contiguous_range_op.py | 2 +- test/legacy_test/test_flatten_op.py | 2 +- test/legacy_test/test_flip.py | 2 +- test/legacy_test/test_fmax_op.py | 2 +- test/legacy_test/test_fmin_op.py | 2 +- test/legacy_test/test_fold_op.py | 2 +- test/legacy_test/test_frame_op.py | 2 +- test/legacy_test/test_fsp_op.py | 2 +- test/legacy_test/test_ftrl_op.py | 2 +- test/legacy_test/test_full_like_op.py | 2 +- test/legacy_test/test_fused_adam_op.py | 2 +- test/legacy_test/test_fused_attention_op.py | 2 +- test/legacy_test/test_fused_bias_act_op.py | 2 +- .../test_fused_bias_dropout_residual_layer_norm_op.py | 2 +- test/legacy_test/test_fused_ec_moe_op.py | 2 +- test/legacy_test/test_fused_elemwise_activation_op.py | 2 +- test/legacy_test/test_fused_emb_seq_pool_op.py | 6 +----- test/legacy_test/test_fused_embedding_fc_lstm_op.py | 2 +- .../legacy_test/test_fused_fc_elementwise_layernorm_op.py | 2 +- test/legacy_test/test_fused_feedforward_op.py | 2 +- test/legacy_test/test_fused_gate_attention_op.py | 6 +----- test/legacy_test/test_fused_gemm_epilogue_grad_op.py | 2 +- test/legacy_test/test_fused_gemm_epilogue_op.py | 6 +----- test/legacy_test/test_fused_multi_transformer_op.py | 2 +- test/legacy_test/test_fused_multihead_matmul_op.py | 2 +- .../test_fused_scale_bias_relu_conv_bnstats_op.py | 2 +- test/legacy_test/test_fused_token_prune_op.py | 2 +- test/legacy_test/test_fusion_gru_op.py | 2 +- test/legacy_test/test_fusion_lstm_op.py | 2 +- test/legacy_test/test_fusion_repeated_fc_relu_op.py | 2 +- test/legacy_test/test_fusion_seqconv_eltadd_relu_op.py | 2 +- test/legacy_test/test_fusion_seqexpand_concat_fc_op.py | 2 +- test/legacy_test/test_fusion_seqpool_concat_op.py | 2 +- test/legacy_test/test_fusion_seqpool_cvm_concat_op.py | 2 +- test/legacy_test/test_fusion_squared_mat_sub_op.py | 2 +- .../test_fusion_transpose_flatten_concat_op.py | 2 +- test/legacy_test/test_gather_nd_op.py | 6 +----- test/legacy_test/test_gather_op.py | 2 +- test/legacy_test/test_gather_tree_op.py | 2 +- test/legacy_test/test_gaussian_random_op.py | 6 +----- test/legacy_test/test_generate_proposal_labels_op.py | 2 +- test/legacy_test/test_generate_proposals_op.py | 2 +- test/legacy_test/test_generate_proposals_v2_op.py | 2 +- test/legacy_test/test_graph_send_recv_op.py | 2 +- test/legacy_test/test_graph_send_ue_recv_op.py | 2 +- test/legacy_test/test_graph_send_uv_op.py | 2 +- test/legacy_test/test_grid_sampler_op.py | 2 +- test/legacy_test/test_group_norm_op.py | 8 ++++---- test/legacy_test/test_gru_op.py | 2 +- test/legacy_test/test_gru_rnn_op.py | 2 +- test/legacy_test/test_gru_unit_op.py | 2 +- test/legacy_test/test_gumbel_softmax_op.py | 2 +- test/legacy_test/test_hash_op.py | 2 +- test/legacy_test/test_hinge_loss_op.py | 2 +- test/legacy_test/test_histogram_op.py | 2 +- test/legacy_test/test_hsigmoid_op.py | 2 +- test/legacy_test/test_huber_loss_op.py | 2 +- test/legacy_test/test_i0_op.py | 2 +- test/legacy_test/test_i0e_op.py | 2 +- test/legacy_test/test_i1_op.py | 2 +- test/legacy_test/test_i1e_op.py | 2 +- test/legacy_test/test_identity_loss_op.py | 2 +- test/legacy_test/test_im2sequence_op.py | 2 +- test/legacy_test/test_index_add_op.py | 2 +- test/legacy_test/test_index_sample_op.py | 2 +- test/legacy_test/test_index_select_op.py | 2 +- test/legacy_test/test_instance_norm_op.py | 2 +- test/legacy_test/test_instance_norm_op_v2.py | 2 +- test/legacy_test/test_inverse_op.py | 2 +- test/legacy_test/test_iou_similarity_op.py | 2 +- test/legacy_test/test_is_empty_op.py | 2 +- test/legacy_test/test_isclose_op.py | 2 +- test/legacy_test/test_isfinite_op.py | 2 +- test/legacy_test/test_kldiv_loss_op.py | 2 +- test/legacy_test/test_kron_op.py | 2 +- test/legacy_test/test_kthvalue_op.py | 2 +- test/legacy_test/test_l1_norm_op.py | 2 +- test/legacy_test/test_label_smooth_op.py | 2 +- test/legacy_test/test_lamb_op.py | 2 +- test/legacy_test/test_layer_norm_op.py | 6 +----- test/legacy_test/test_lerp_op.py | 2 +- test/legacy_test/test_lgamma_op.py | 2 +- test/legacy_test/test_linear_chain_crf_op.py | 2 +- test/legacy_test/test_linear_interp_op.py | 2 +- test/legacy_test/test_linear_interp_v2_op.py | 6 +----- test/legacy_test/test_linspace.py | 6 +----- test/legacy_test/test_locality_aware_nms_op.py | 2 +- test/legacy_test/test_lod_reset_op.py | 2 +- test/legacy_test/test_log_loss_op.py | 2 +- test/legacy_test/test_log_softmax.py | 2 +- test/legacy_test/test_logcumsumexp_op.py | 6 +----- test/legacy_test/test_logical_op.py | 2 +- test/legacy_test/test_logit_op.py | 2 +- test/legacy_test/test_logspace.py | 2 +- test/legacy_test/test_logsumexp.py | 2 +- test/legacy_test/test_lookup_table_bf16_op.py | 8 ++++---- test/legacy_test/test_lookup_table_dequant_op.py | 2 +- test/legacy_test/test_lookup_table_op.py | 8 ++++---- test/legacy_test/test_lookup_table_v2_bf16_op.py | 2 +- test/legacy_test/test_lookup_table_v2_op.py | 6 +----- test/legacy_test/test_lrn_op.py | 2 +- test/legacy_test/test_lstm_cudnn_op.py | 2 +- test/legacy_test/test_lstm_op.py | 2 +- test/legacy_test/test_lstm_unit_op.py | 2 +- test/legacy_test/test_lu_op.py | 2 +- test/legacy_test/test_lu_unpack_op.py | 2 +- test/legacy_test/test_margin_cross_entropy_op.py | 6 +----- test/legacy_test/test_margin_rank_loss_op.py | 2 +- test/legacy_test/test_marker_op.py | 3 ++- test/legacy_test/test_masked_select_op.py | 2 +- test/legacy_test/test_match_matrix_tensor_op.py | 2 +- test/legacy_test/test_matmul_op.py | 2 +- test/legacy_test/test_matmul_op_with_head.py | 2 +- test/legacy_test/test_matmul_v2_op.py | 6 +----- test/legacy_test/test_matrix_nms_op.py | 2 +- test/legacy_test/test_matrix_power_op.py | 2 +- test/legacy_test/test_matrix_rank_op.py | 2 +- test/legacy_test/test_max_op.py | 2 +- test/legacy_test/test_maxout_op.py | 2 +- test/legacy_test/test_mean_iou.py | 2 +- test/legacy_test/test_mean_op.py | 2 +- test/legacy_test/test_meshgrid_op.py | 2 +- test/legacy_test/test_min_op.py | 2 +- test/legacy_test/test_mine_hard_examples_op.py | 2 +- test/legacy_test/test_minus_op.py | 2 +- test/legacy_test/test_mode_op.py | 6 +----- test/legacy_test/test_modified_huber_loss_op.py | 2 +- test/legacy_test/test_momentum_op.py | 2 +- test/legacy_test/test_mul_op.py | 2 +- test/legacy_test/test_multi_dot_op.py | 2 +- test/legacy_test/test_multiclass_nms_op.py | 2 +- test/legacy_test/test_multinomial_op.py | 2 +- test/legacy_test/test_multiplex_op.py | 2 +- test/legacy_test/test_mv_op.py | 2 +- test/legacy_test/test_nanmedian.py | 2 +- test/legacy_test/test_nce.py | 2 +- test/legacy_test/test_nearest_interp_op.py | 2 +- test/legacy_test/test_nearest_interp_v2_op.py | 2 +- test/legacy_test/test_nextafter_op.py | 2 +- test/legacy_test/test_nll_loss.py | 2 +- test/legacy_test/test_nms_op.py | 2 +- test/legacy_test/test_nn_functional_hot_op.py | 2 +- test/legacy_test/test_nonzero_api.py | 2 +- test/legacy_test/test_norm_all.py | 2 +- test/legacy_test/test_norm_op.py | 6 +----- test/legacy_test/test_number_count_op.py | 2 +- test/legacy_test/test_numel_op.py | 2 +- test/legacy_test/test_one_hot_v2_op.py | 2 +- test/legacy_test/test_overlap_add_op.py | 2 +- test/legacy_test/test_pad2d_op.py | 2 +- test/legacy_test/test_pad3d_op.py | 2 +- test/legacy_test/test_pad_constant_like.py | 2 +- test/legacy_test/test_pad_op.py | 2 +- test/legacy_test/test_partial_concat_op.py | 2 +- test/legacy_test/test_partial_sum_op.py | 2 +- test/legacy_test/test_pixel_shuffle_op.py | 2 +- test/legacy_test/test_pixel_unshuffle.py | 2 +- test/legacy_test/test_poisson_op.py | 6 +----- test/legacy_test/test_polygamma_op.py | 2 +- test/legacy_test/test_polygon_box_transform.py | 2 +- test/legacy_test/test_pool2d_op.py | 2 +- test/legacy_test/test_pool3d_op.py | 2 +- test/legacy_test/test_pool_max_op.py | 6 +++--- test/legacy_test/test_positive_negative_pair_op.py | 2 +- test/legacy_test/test_precision_recall_op.py | 2 +- test/legacy_test/test_prelu_op.py | 6 +----- test/legacy_test/test_prior_box_op.py | 2 +- test/legacy_test/test_proximal_adagrad_op.py | 2 +- test/legacy_test/test_proximal_gd_op.py | 2 +- test/legacy_test/test_psroi_pool_op.py | 2 +- test/legacy_test/test_put_along_axis_op.py | 2 +- test/legacy_test/test_qr_op.py | 2 +- test/legacy_test/test_randint_op.py | 2 +- test/legacy_test/test_random_crop_op.py | 2 +- test/legacy_test/test_randperm_op.py | 6 +----- test/legacy_test/test_range.py | 2 +- test/legacy_test/test_rank_attention_op.py | 2 +- test/legacy_test/test_rank_loss_op.py | 2 +- test/legacy_test/test_real_imag_op.py | 2 +- test/legacy_test/test_reduce_op.py | 6 +----- test/legacy_test/test_repeat_interleave_op.py | 2 +- test/legacy_test/test_reshape_op.py | 2 +- test/legacy_test/test_retinanet_detection_output.py | 2 +- test/legacy_test/test_reverse_op.py | 2 +- test/legacy_test/test_rnn_op.py | 2 +- test/legacy_test/test_roi_align_op.py | 2 +- test/legacy_test/test_roi_pool_op.py | 2 +- test/legacy_test/test_roll_op.py | 2 +- test/legacy_test/test_row_conv_op.py | 2 +- test/legacy_test/test_rpn_target_assign_op.py | 2 +- test/legacy_test/test_rrelu_op.py | 2 +- test/legacy_test/test_sample_logits_op.py | 2 +- test/legacy_test/test_scale_op.py | 2 +- test/legacy_test/test_scatter_nd_op.py | 2 +- test/legacy_test/test_scatter_op.py | 2 +- test/legacy_test/test_searchsorted_op.py | 2 +- test/legacy_test/test_seed_op.py | 2 +- test/legacy_test/test_segment_ops.py | 2 +- test/legacy_test/test_selu_op.py | 2 +- test/legacy_test/test_set_value_op.py | 2 +- test/legacy_test/test_sgd_op.py | 2 +- test/legacy_test/test_sgd_op_bf16.py | 8 ++++---- test/legacy_test/test_shape_op.py | 2 +- test/legacy_test/test_shard_index_op.py | 2 +- test/legacy_test/test_share_data_op.py | 2 +- test/legacy_test/test_shuffle_batch_op.py | 2 +- test/legacy_test/test_shuffle_channel_op.py | 2 +- .../test_sigmoid_cross_entropy_with_logits_op.py | 2 +- test/legacy_test/test_sigmoid_focal_loss_op.py | 2 +- test/legacy_test/test_sign_op.py | 2 +- test/legacy_test/test_similarity_focus_op.py | 2 +- test/legacy_test/test_simple_rnn_op.py | 2 +- test/legacy_test/test_size_op.py | 2 +- test/legacy_test/test_slice_op.py | 6 +----- test/legacy_test/test_smooth_l1_loss_op.py | 2 +- test/legacy_test/test_softmax_mask_fuse_op.py | 2 +- .../test_softmax_mask_fuse_upper_triangle_op.py | 2 +- test/legacy_test/test_softmax_op.py | 2 +- test/legacy_test/test_softmax_with_cross_entropy_op.py | 2 +- test/legacy_test/test_solve_op.py | 2 +- test/legacy_test/test_space_to_depth_op.py | 2 +- test/legacy_test/test_sparse_attention_op.py | 2 +- test/legacy_test/test_sparse_momentum_op.py | 2 +- test/legacy_test/test_spectral_norm_op.py | 2 +- test/legacy_test/test_split_op.py | 2 +- test/legacy_test/test_spp_op.py | 2 +- test/legacy_test/test_squared_l2_distance_op.py | 2 +- test/legacy_test/test_squared_l2_norm_op.py | 2 +- test/legacy_test/test_squeeze2_op.py | 2 +- test/legacy_test/test_squeeze_op.py | 2 +- test/legacy_test/test_stack_op.py | 2 +- test/legacy_test/test_stft_op.py | 2 +- test/legacy_test/test_strided_slice_op.py | 2 +- test/legacy_test/test_sum_op.py | 6 +----- test/legacy_test/test_svd_op.py | 2 +- test/legacy_test/test_sync_batch_norm_op.py | 6 +----- test/legacy_test/test_take_along_axis_op.py | 2 +- test/legacy_test/test_target_assign_op.py | 2 +- test/legacy_test/test_tdm_child_op.py | 2 +- test/legacy_test/test_tdm_sampler_op.py | 2 +- test/legacy_test/test_teacher_student_sigmoid_loss_op.py | 2 +- test/legacy_test/test_temporal_shift_op.py | 2 +- test/legacy_test/test_tile_op.py | 2 +- test/legacy_test/test_top_k_op.py | 2 +- test/legacy_test/test_top_k_v2_op.py | 6 +----- test/legacy_test/test_trace_op.py | 2 +- test/legacy_test/test_trans_layout_op.py | 2 +- test/legacy_test/test_transfer_dtype_op.py | 6 +----- test/legacy_test/test_transfer_layout_op.py | 2 +- test/legacy_test/test_transpose_op.py | 2 +- test/legacy_test/test_tree_conv_op.py | 2 +- test/legacy_test/test_triangular_solve_op.py | 2 +- test/legacy_test/test_tril_indices_op.py | 2 +- test/legacy_test/test_tril_triu_op.py | 2 +- test/legacy_test/test_trilinear_interp_op.py | 2 +- test/legacy_test/test_trilinear_interp_v2_op.py | 2 +- test/legacy_test/test_triu_indices_op.py | 2 +- test/legacy_test/test_trunc_op.py | 2 +- test/legacy_test/test_unbind_op.py | 2 +- test/legacy_test/test_unfold_op.py | 2 +- test/legacy_test/test_uniform_random_bf16_op.py | 2 +- test/legacy_test/test_uniform_random_inplace_op.py | 2 +- test/legacy_test/test_uniform_random_op.py | 2 +- test/legacy_test/test_unique.py | 6 +----- test/legacy_test/test_unique_consecutive_op.py | 2 +- test/legacy_test/test_unique_with_counts.py | 2 +- test/legacy_test/test_unpool3d_op.py | 2 +- test/legacy_test/test_unpool_op.py | 2 +- test/legacy_test/test_unsqueeze2_op.py | 2 +- test/legacy_test/test_unsqueeze_op.py | 2 +- test/legacy_test/test_unstack_op.py | 2 +- test/legacy_test/test_update_loss_scaling_op.py | 6 +----- test/legacy_test/test_var_conv_2d.py | 2 +- test/legacy_test/test_viterbi_decode_op.py | 2 +- test/legacy_test/test_warpctc_op.py | 2 +- test/legacy_test/test_warprnnt_op.py | 2 +- test/legacy_test/test_where_op.py | 2 +- test/legacy_test/test_yolo_box_op.py | 2 +- test/legacy_test/test_yolov3_loss_op.py | 2 +- 430 files changed, 451 insertions(+), 636 deletions(-) diff --git a/test/legacy_test/benchmark.py b/test/legacy_test/benchmark.py index 8cbc429cc0d91..bc3f2ae7810fb 100644 --- a/test/legacy_test/benchmark.py +++ b/test/legacy_test/benchmark.py @@ -13,10 +13,10 @@ # limitations under the License. import time -from test.legacy_test.op_test import OpTest import numpy as np from op import Operator +from op_test import OpTest class BenchmarkSuite(OpTest): diff --git a/test/legacy_test/c_embedding_op_base.py b/test/legacy_test/c_embedding_op_base.py index abebefacea695..83758b6bb0bc9 100644 --- a/test/legacy_test/c_embedding_op_base.py +++ b/test/legacy_test/c_embedding_op_base.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.framework import core diff --git a/test/legacy_test/test_accuracy_op.py b/test/legacy_test/test_accuracy_op.py index 333acb87c47f6..2acb9aa121e18 100755 --- a/test/legacy_test/test_accuracy_op.py +++ b/test/legacy_test/test_accuracy_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - paddle_static_guard, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_activation_op.py b/test/legacy_test/test_activation_op.py index 0868948b3fddc..a3c9b86fff499 100644 --- a/test/legacy_test/test_activation_op.py +++ b/test/legacy_test/test_activation_op.py @@ -16,9 +16,9 @@ import unittest import warnings from contextlib import contextmanager -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 from scipy.special import erf, expit import paddle diff --git a/test/legacy_test/test_adadelta_op.py b/test/legacy_test/test_adadelta_op.py index ba7ae68077a12..9202d6e2aa80f 100644 --- a/test/legacy_test/test_adadelta_op.py +++ b/test/legacy_test/test_adadelta_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_adagrad_op.py b/test/legacy_test/test_adagrad_op.py index 0f7e99239d169..b1aab3c903248 100644 --- a/test/legacy_test/test_adagrad_op.py +++ b/test/legacy_test/test_adagrad_op.py @@ -14,10 +14,10 @@ import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np from op import Operator +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_adam_op.py b/test/legacy_test/test_adam_op.py index 0c1ebd1cb81ec..0789e08991e1a 100644 --- a/test/legacy_test/test_adam_op.py +++ b/test/legacy_test/test_adam_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np from op import Operator +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_adamax_op.py b/test/legacy_test/test_adamax_op.py index c30a7a7769773..4087e75398266 100644 --- a/test/legacy_test/test_adamax_op.py +++ b/test/legacy_test/test_adamax_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_adamw_op.py b/test/legacy_test/test_adamw_op.py index a56a01705ce70..f685ec4cd71eb 100644 --- a/test/legacy_test/test_adamw_op.py +++ b/test/legacy_test/test_adamw_op.py @@ -15,9 +15,9 @@ import random import unittest from functools import partial -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_adaptive_max_pool1d.py b/test/legacy_test/test_adaptive_max_pool1d.py index ed4e4715818d9..eb12c8d597ba9 100644 --- a/test/legacy_test/test_adaptive_max_pool1d.py +++ b/test/legacy_test/test_adaptive_max_pool1d.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import check_out_dtype, paddle_static_guard import numpy as np +from op_test import check_out_dtype, paddle_static_guard import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_adaptive_max_pool2d.py b/test/legacy_test/test_adaptive_max_pool2d.py index 89446dc4b1133..90f0f12e9303f 100644 --- a/test/legacy_test/test_adaptive_max_pool2d.py +++ b/test/legacy_test/test_adaptive_max_pool2d.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import check_out_dtype import numpy as np +from op_test import check_out_dtype import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_adaptive_max_pool3d.py b/test/legacy_test/test_adaptive_max_pool3d.py index 104e775943937..fbbf1d81588d6 100755 --- a/test/legacy_test/test_adaptive_max_pool3d.py +++ b/test/legacy_test/test_adaptive_max_pool3d.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import check_out_dtype import numpy as np +from op_test import check_out_dtype import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_add_position_encoding_op.py b/test/legacy_test/test_add_position_encoding_op.py index 2b229372b5464..e28a16eee678c 100644 --- a/test/legacy_test/test_add_position_encoding_op.py +++ b/test/legacy_test/test_add_position_encoding_op.py @@ -13,9 +13,9 @@ # limitations under the License. import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def add_position_encoding(input, alpha=1.0, beta=1.0): diff --git a/test/legacy_test/test_addmm_op.py b/test/legacy_test/test_addmm_op.py index 7903b7f9d6192..1e339ad1ceb68 100644 --- a/test/legacy_test/test_addmm_op.py +++ b/test/legacy_test/test_addmm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_affine_channel_op.py b/test/legacy_test/test_affine_channel_op.py index 36b699032fab8..17b8c1acb353b 100644 --- a/test/legacy_test/test_affine_channel_op.py +++ b/test/legacy_test/test_affine_channel_op.py @@ -16,9 +16,9 @@ """ import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def affine_channel(x, scale, bias, layout): diff --git a/test/legacy_test/test_affine_grid_op.py b/test/legacy_test/test_affine_grid_op.py index 9cbdb4ce8b7f4..d0a5b546d8be9 100644 --- a/test/legacy_test/test_affine_grid_op.py +++ b/test/legacy_test/test_affine_grid_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_allclose_op.py b/test/legacy_test/test_allclose_op.py index e7c391efcedfc..e263a4d517a1f 100644 --- a/test/legacy_test/test_allclose_op.py +++ b/test/legacy_test/test_allclose_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_amp_check_finite_and_scale_op.py b/test/legacy_test/test_amp_check_finite_and_scale_op.py index 7f4676367cc2d..3178adf47a6ec 100644 --- a/test/legacy_test/test_amp_check_finite_and_scale_op.py +++ b/test/legacy_test/test_amp_check_finite_and_scale_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle.static.amp import amp_nn diff --git a/test/legacy_test/test_anchor_generator_op.py b/test/legacy_test/test_anchor_generator_op.py index 551bef655da7d..ae13f7563ed20 100644 --- a/test/legacy_test/test_anchor_generator_op.py +++ b/test/legacy_test/test_anchor_generator_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def anchor_generator_in_python( diff --git a/test/legacy_test/test_angle_op.py b/test/legacy_test/test_angle_op.py index 3700ed64b339c..c4ec247b1677b 100644 --- a/test/legacy_test/test_angle_op.py +++ b/test/legacy_test/test_angle_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import static diff --git a/test/legacy_test/test_arange.py b/test/legacy_test/test_arange.py index 4fdf6f65ede82..9ca8eeee11277 100644 --- a/test/legacy_test/test_arange.py +++ b/test/legacy_test/test_arange.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_arg_min_max_op.py b/test/legacy_test/test_arg_min_max_op.py index 9a4fa37097bd1..09425be02fc53 100644 --- a/test/legacy_test/test_arg_min_max_op.py +++ b/test/legacy_test/test_arg_min_max_op.py @@ -14,9 +14,9 @@ import os import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 from test_attribute_var import UnittestBase import paddle diff --git a/test/legacy_test/test_arg_min_max_v2_op.py b/test/legacy_test/test_arg_min_max_v2_op.py index bf5c7b6a1e38e..46db83a72c788 100644 --- a/test/legacy_test/test_arg_min_max_v2_op.py +++ b/test/legacy_test/test_arg_min_max_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_argsort_op.py b/test/legacy_test/test_argsort_op.py index 33d6f6bc270d2..b73f50dc208a1 100644 --- a/test/legacy_test/test_argsort_op.py +++ b/test/legacy_test/test_argsort_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_assign_op.py b/test/legacy_test/test_assign_op.py index 5a37a939dac9e..991c96bdf7849 100644 --- a/test/legacy_test/test_assign_op.py +++ b/test/legacy_test/test_assign_op.py @@ -13,15 +13,12 @@ # limitations under the License. import unittest -from test.legacy_test import op_test -from test.legacy_test.op_test import ( - convert_float_to_uint16, - convert_uint16_to_float, -) import gradient_checker import numpy as np +import op_test from decorator_helper import prog_scope +from op_test import convert_float_to_uint16, convert_uint16_to_float import paddle from paddle import base diff --git a/test/legacy_test/test_assign_pos_op.py b/test/legacy_test/test_assign_pos_op.py index 24f2547a47f25..ff50a2310c8c5 100644 --- a/test/legacy_test/test_assign_pos_op.py +++ b/test/legacy_test/test_assign_pos_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test import op_test import numpy as np +import op_test import paddle from paddle.base import core diff --git a/test/legacy_test/test_assign_value_op.py b/test/legacy_test/test_assign_value_op.py index 8b883c311f757..88bb60edbbc3c 100644 --- a/test/legacy_test/test_assign_value_op.py +++ b/test/legacy_test/test_assign_value_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test import op_test import numpy as np +import op_test import paddle from paddle import base diff --git a/test/legacy_test/test_atan2_op.py b/test/legacy_test/test_atan2_op.py index 101382cd4f4c4..3d2abef9393d0 100644 --- a/test/legacy_test/test_atan2_op.py +++ b/test/legacy_test/test_atan2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_attention_lstm_op.py b/test/legacy_test/test_attention_lstm_op.py index e252ef2cbe4af..ba92837fa7136 100644 --- a/test/legacy_test/test_attention_lstm_op.py +++ b/test/legacy_test/test_attention_lstm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_fusion_lstm_op import ACTIVATION, fc from test_softmax_op import stable_softmax diff --git a/test/legacy_test/test_auc_op.py b/test/legacy_test/test_auc_op.py index 39b3b7d661799..691ee671d6fb6 100644 --- a/test/legacy_test/test_auc_op.py +++ b/test/legacy_test/test_auc_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_auc_single_pred_op.py b/test/legacy_test/test_auc_single_pred_op.py index 412bd9be896d9..a89fb29faaf0a 100644 --- a/test/legacy_test/test_auc_single_pred_op.py +++ b/test/legacy_test/test_auc_single_pred_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_batch_fc_op.py b/test/legacy_test/test_batch_fc_op.py index d77ed3d795859..f7a0249896e98 100644 --- a/test/legacy_test/test_batch_fc_op.py +++ b/test/legacy_test/test_batch_fc_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_batch_norm_op.py b/test/legacy_test/test_batch_norm_op.py index c038fae4bc10b..cfbb33c2a2933 100644 --- a/test/legacy_test/test_batch_norm_op.py +++ b/test/legacy_test/test_batch_norm_op.py @@ -14,16 +14,16 @@ import os import unittest -from test.legacy_test.op_test import ( + +import numpy as np +from op import Operator +from op_test import ( OpTest, _set_use_system_allocator, convert_float_to_uint16, convert_uint16_to_float, ) -import numpy as np -from op import Operator - import paddle from paddle import base from paddle.base import Program, core, program_guard diff --git a/test/legacy_test/test_batch_norm_op_prim_nchw.py b/test/legacy_test/test_batch_norm_op_prim_nchw.py index 1a309dd1ba004..88d02468e0400 100644 --- a/test/legacy_test/test_batch_norm_op_prim_nchw.py +++ b/test/legacy_test/test_batch_norm_op_prim_nchw.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - _set_use_system_allocator, - convert_float_to_uint16, -) import numpy as np +from op_test import OpTest, _set_use_system_allocator, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_batch_norm_op_prim_nhwc.py b/test/legacy_test/test_batch_norm_op_prim_nhwc.py index 4751ef72486f3..bfa104bcf73d4 100644 --- a/test/legacy_test/test_batch_norm_op_prim_nhwc.py +++ b/test/legacy_test/test_batch_norm_op_prim_nhwc.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import _set_use_system_allocator import numpy as np +from op_test import _set_use_system_allocator from test_batch_norm_op_prim_nchw import TestBatchNormOp import paddle diff --git a/test/legacy_test/test_bce_loss.py b/test/legacy_test/test_bce_loss.py index 03f5b10c29351..a9fe9cfa030d9 100644 --- a/test/legacy_test/test_bce_loss.py +++ b/test/legacy_test/test_bce_loss.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_bernoulli_op.py b/test/legacy_test/test_bernoulli_op.py index b290c4d43a2b1..0c68f143e6190 100644 --- a/test/legacy_test/test_bernoulli_op.py +++ b/test/legacy_test/test_bernoulli_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_bicubic_interp_op.py b/test/legacy_test/test_bicubic_interp_op.py index 97e3020f733f2..a1301bcd2242b 100644 --- a/test/legacy_test/test_bicubic_interp_op.py +++ b/test/legacy_test/test_bicubic_interp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_bicubic_interp_v2_op.py b/test/legacy_test/test_bicubic_interp_v2_op.py index d72d091d8d393..7aec439fb62ad 100644 --- a/test/legacy_test/test_bicubic_interp_v2_op.py +++ b/test/legacy_test/test_bicubic_interp_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_bilateral_slice_op.py b/test/legacy_test/test_bilateral_slice_op.py index 58611b88189ca..6de6bfc66beae 100644 --- a/test/legacy_test/test_bilateral_slice_op.py +++ b/test/legacy_test/test_bilateral_slice_op.py @@ -14,9 +14,9 @@ import math import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle from paddle.incubate.layers.nn import bilateral_slice diff --git a/test/legacy_test/test_bilinear_interp_op.py b/test/legacy_test/test_bilinear_interp_op.py index eb5629e4769a6..9409762d881c0 100755 --- a/test/legacy_test/test_bilinear_interp_op.py +++ b/test/legacy_test/test_bilinear_interp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_bilinear_interp_v2_op.py b/test/legacy_test/test_bilinear_interp_v2_op.py index 930068aedee55..7726d620c5d81 100755 --- a/test/legacy_test/test_bilinear_interp_v2_op.py +++ b/test/legacy_test/test_bilinear_interp_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_bilinear_tensor_product_op.py b/test/legacy_test/test_bilinear_tensor_product_op.py index cf125f83c5f8e..20dcc132e80d6 100644 --- a/test/legacy_test/test_bilinear_tensor_product_op.py +++ b/test/legacy_test/test_bilinear_tensor_product_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_bincount_op.py b/test/legacy_test/test_bincount_op.py index d03f193033d42..f388141671443 100644 --- a/test/legacy_test/test_bincount_op.py +++ b/test/legacy_test/test_bincount_op.py @@ -15,9 +15,9 @@ import os import tempfile import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle import paddle.inference as paddle_infer diff --git a/test/legacy_test/test_bipartite_match_op.py b/test/legacy_test/test_bipartite_match_op.py index 76cdcdd635ec3..954c47d068a11 100644 --- a/test/legacy_test/test_bipartite_match_op.py +++ b/test/legacy_test/test_bipartite_match_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def bipartite_match(distance, match_indices, match_dist): diff --git a/test/legacy_test/test_bitwise_op.py b/test/legacy_test/test_bitwise_op.py index 295ae7f549e8f..7f60c00901f92 100644 --- a/test/legacy_test/test_bitwise_op.py +++ b/test/legacy_test/test_bitwise_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_bmm_op.py b/test/legacy_test/test_bmm_op.py index 53bfe5b582fa3..7885faf6f8eb8 100644 --- a/test/legacy_test/test_bmm_op.py +++ b/test/legacy_test/test_bmm_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - paddle_static_guard, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_box_clip_op.py b/test/legacy_test/test_box_clip_op.py index c489543b7efe6..18050092d6af1 100644 --- a/test/legacy_test/test_box_clip_op.py +++ b/test/legacy_test/test_box_clip_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def box_clip(input_box, im_info, output_box): diff --git a/test/legacy_test/test_box_coder_op.py b/test/legacy_test/test_box_coder_op.py index b940b4519f51b..7221fb2ba73f6 100644 --- a/test/legacy_test/test_box_coder_op.py +++ b/test/legacy_test/test_box_coder_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_box_decoder_and_assign_op.py b/test/legacy_test/test_box_decoder_and_assign_op.py index 09393530499f8..555e5fbd2c6f7 100644 --- a/test/legacy_test/test_box_decoder_and_assign_op.py +++ b/test/legacy_test/test_box_decoder_and_assign_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def box_decoder_and_assign(deltas, weights, boxes, box_score, box_clip): diff --git a/test/legacy_test/test_bpr_loss_op.py b/test/legacy_test/test_bpr_loss_op.py index 571e6da2c5798..9f4bf31dc76d6 100644 --- a/test/legacy_test/test_bpr_loss_op.py +++ b/test/legacy_test/test_bpr_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, randomize_probability import numpy as np +from op_test import OpTest, randomize_probability import paddle diff --git a/test/legacy_test/test_broadcast_error.py b/test/legacy_test/test_broadcast_error.py index d86e30ce48431..d42cc6d9b8840 100644 --- a/test/legacy_test/test_broadcast_error.py +++ b/test/legacy_test/test_broadcast_error.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_broadcast_tensors_op.py b/test/legacy_test/test_broadcast_tensors_op.py index 43c1b9eae8ee9..15e42d48cebfd 100644 --- a/test/legacy_test/test_broadcast_tensors_op.py +++ b/test/legacy_test/test_broadcast_tensors_op.py @@ -14,9 +14,9 @@ import random import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_cast_op.py b/test/legacy_test/test_cast_op.py index f34f31c1db313..bc765658a503c 100644 --- a/test/legacy_test/test_cast_op.py +++ b/test/legacy_test/test_cast_op.py @@ -13,15 +13,11 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) import gradient_checker import numpy as np from decorator_helper import prog_scope +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float import paddle from paddle import base diff --git a/test/legacy_test/test_center_loss.py b/test/legacy_test/test_center_loss.py index 8e284adb2d8c1..31863cd93f767 100644 --- a/test/legacy_test/test_center_loss.py +++ b/test/legacy_test/test_center_loss.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_channel_shuffle.py b/test/legacy_test/test_channel_shuffle.py index b793f33f91bf6..e59a2c2de61e7 100644 --- a/test/legacy_test/test_channel_shuffle.py +++ b/test/legacy_test/test_channel_shuffle.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_cholesky_op.py b/test/legacy_test/test_cholesky_op.py index 1cfda81ba4cff..034cbb87366fa 100644 --- a/test/legacy_test/test_cholesky_op.py +++ b/test/legacy_test/test_cholesky_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np from decorator_helper import prog_scope from gradient_checker import grad_check +from op_test import OpTest, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_cholesky_solve_op.py b/test/legacy_test/test_cholesky_solve_op.py index 82aea825b21d7..c1c9e4e7400bc 100644 --- a/test/legacy_test/test_cholesky_solve_op.py +++ b/test/legacy_test/test_cholesky_solve_op.py @@ -20,7 +20,7 @@ import scipy.linalg sys.path.append("..") -from test.legacy_test.op_test import OpTest +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_chunk_eval_op.py b/test/legacy_test/test_chunk_eval_op.py index ef852167f5407..b059c04f8e0f4 100644 --- a/test/legacy_test/test_chunk_eval_op.py +++ b/test/legacy_test/test_chunk_eval_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class Segment: diff --git a/test/legacy_test/test_class_center_sample_op.py b/test/legacy_test/test_class_center_sample_op.py index 1136c92e95896..546a63faa200e 100644 --- a/test/legacy_test/test_class_center_sample_op.py +++ b/test/legacy_test/test_class_center_sample_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle from paddle.base import Program, core, program_guard diff --git a/test/legacy_test/test_clip_by_norm_op.py b/test/legacy_test/test_clip_by_norm_op.py index 7efb2a81990a9..f3c1336a18fc2 100644 --- a/test/legacy_test/test_clip_by_norm_op.py +++ b/test/legacy_test/test_clip_by_norm_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np from op import Operator +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_clip_op.py b/test/legacy_test/test_clip_op.py index 107ec882ff2c9..1c8366bbdf5ef 100644 --- a/test/legacy_test/test_clip_op.py +++ b/test/legacy_test/test_clip_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_coalesce_tensor_op.py b/test/legacy_test/test_coalesce_tensor_op.py index bb2958bcdb77f..cb22bc5f85092 100644 --- a/test/legacy_test/test_coalesce_tensor_op.py +++ b/test/legacy_test/test_coalesce_tensor_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_collect_fpn_proposals_op.py b/test/legacy_test/test_collect_fpn_proposals_op.py index b98863cf4c950..4898eeecfdc87 100644 --- a/test/legacy_test/test_collect_fpn_proposals_op.py +++ b/test/legacy_test/test_collect_fpn_proposals_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestCollectFPNProposalstOp(OpTest): diff --git a/test/legacy_test/test_collective_api_base.py b/test/legacy_test/test_collective_api_base.py index 337cf7d989dac..08de4a1be9a32 100644 --- a/test/legacy_test/test_collective_api_base.py +++ b/test/legacy_test/test_collective_api_base.py @@ -23,12 +23,8 @@ sys.path.append("../legacy_test") -from test.legacy_test.op_test import ( - convert_float_to_uint16, - convert_uint16_to_float, -) - import numpy as np +from op_test import convert_float_to_uint16, convert_uint16_to_float import paddle import paddle.distributed as dist diff --git a/test/legacy_test/test_compare_op.py b/test/legacy_test/test_compare_op.py index eef033d38f147..815febea2857e 100755 --- a/test/legacy_test/test_compare_op.py +++ b/test/legacy_test/test_compare_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test import op_test import numpy import numpy as np +import op_test import paddle from paddle import base diff --git a/test/legacy_test/test_compare_reduce_op.py b/test/legacy_test/test_compare_reduce_op.py index 194228b28f6a5..e281407c242b0 100644 --- a/test/legacy_test/test_compare_reduce_op.py +++ b/test/legacy_test/test_compare_reduce_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test import op_test import numpy as np +import op_test import paddle diff --git a/test/legacy_test/test_complex_abs.py b/test/legacy_test/test_complex_abs.py index 64fc1534b8cb1..81089949a47e4 100644 --- a/test/legacy_test/test_complex_abs.py +++ b/test/legacy_test/test_complex_abs.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle import paddle.base.dygraph as dg diff --git a/test/legacy_test/test_complex_op.py b/test/legacy_test/test_complex_op.py index 5300bb7daa0f8..151ecfbdb6524 100644 --- a/test/legacy_test/test_complex_op.py +++ b/test/legacy_test/test_complex_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import static diff --git a/test/legacy_test/test_complex_view_op.py b/test/legacy_test/test_complex_view_op.py index ef7c9b3344955..b747804ca65c5 100644 --- a/test/legacy_test/test_complex_view_op.py +++ b/test/legacy_test/test_complex_view_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import static diff --git a/test/legacy_test/test_concat_op.py b/test/legacy_test/test_concat_op.py index 1c5c8ddd48c2a..aa057011b209c 100644 --- a/test/legacy_test/test_concat_op.py +++ b/test/legacy_test/test_concat_op.py @@ -13,15 +13,11 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - skip_check_grad_ci, -) import gradient_checker import numpy as np from decorator_helper import prog_scope +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_conj_op.py b/test/legacy_test/test_conj_op.py index 9da9be7242e79..4f552a3801c85 100644 --- a/test/legacy_test/test_conj_op.py +++ b/test/legacy_test/test_conj_op.py @@ -20,9 +20,8 @@ import paddle sys.path.append("..") -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 - from numpy.random import random as rand +from op_test import OpTest, convert_float_to_uint16 import paddle.base.dygraph as dg from paddle import static diff --git a/test/legacy_test/test_conv2d_fusion_op.py b/test/legacy_test/test_conv2d_fusion_op.py index 2b1490e9fa700..accf4f6715399 100644 --- a/test/legacy_test/test_conv2d_fusion_op.py +++ b/test/legacy_test/test_conv2d_fusion_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_conv2d_op import conv2d_forward_naive from paddle.base import core diff --git a/test/legacy_test/test_conv2d_op.py b/test/legacy_test/test_conv2d_op.py index 27789e2da5410..88bfd4cb5c02f 100644 --- a/test/legacy_test/test_conv2d_op.py +++ b/test/legacy_test/test_conv2d_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - get_numeric_gradient, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, get_numeric_gradient from testsuite import create_op import paddle diff --git a/test/legacy_test/test_conv2d_op_depthwise_conv.py b/test/legacy_test/test_conv2d_op_depthwise_conv.py index 981c00ce7a838..c2e5451eb39df 100644 --- a/test/legacy_test/test_conv2d_op_depthwise_conv.py +++ b/test/legacy_test/test_conv2d_op_depthwise_conv.py @@ -19,8 +19,7 @@ import paddle paddle.enable_static() -from test.legacy_test.op_test import get_numeric_gradient - +from op_test import get_numeric_gradient from test_conv2d_op import ( TestConv2DOp, TestConv2DOp_v2, diff --git a/test/legacy_test/test_conv2d_transpose_op.py b/test/legacy_test/test_conv2d_transpose_op.py index dc7dc564761cb..ef610d3af0516 100644 --- a/test/legacy_test/test_conv2d_transpose_op.py +++ b/test/legacy_test/test_conv2d_transpose_op.py @@ -21,12 +21,7 @@ from paddle import nn paddle.enable_static() -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - get_numeric_gradient, -) - +from op_test import OpTest, convert_float_to_uint16, get_numeric_gradient from test_attribute_var import UnittestBase from testsuite import create_op diff --git a/test/legacy_test/test_conv3d_op.py b/test/legacy_test/test_conv3d_op.py index 98f5b071e6bef..14e7d9dc09930 100644 --- a/test/legacy_test/test_conv3d_op.py +++ b/test/legacy_test/test_conv3d_op.py @@ -13,14 +13,14 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( + +import numpy as np +from op_test import ( OpTest, convert_float_to_uint16, get_numeric_gradient, paddle_static_guard, ) - -import numpy as np from testsuite import create_op import paddle diff --git a/test/legacy_test/test_conv3d_transpose_op.py b/test/legacy_test/test_conv3d_transpose_op.py index 4ae08eae6369b..35f2967f5f5ba 100644 --- a/test/legacy_test/test_conv3d_transpose_op.py +++ b/test/legacy_test/test_conv3d_transpose_op.py @@ -19,7 +19,7 @@ import paddle paddle.enable_static() -from test.legacy_test.op_test import OpTest, copy_bits_from_float_to_uint16 +from op_test import OpTest, copy_bits_from_float_to_uint16 from paddle.base import core diff --git a/test/legacy_test/test_conv_shift_op.py b/test/legacy_test/test_conv_shift_op.py index 3e0fcc7032764..26965d9b393cb 100644 --- a/test/legacy_test/test_conv_shift_op.py +++ b/test/legacy_test/test_conv_shift_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def conv_shift_forward(x, y): diff --git a/test/legacy_test/test_cos_sim_op.py b/test/legacy_test/test_cos_sim_op.py index d10928c724d39..f9c761c9eedf3 100644 --- a/test/legacy_test/test_cos_sim_op.py +++ b/test/legacy_test/test_cos_sim_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestCosSimOp(OpTest): diff --git a/test/legacy_test/test_crf_decoding_op.py b/test/legacy_test/test_crf_decoding_op.py index f4480f44d0519..a18328a4038d2 100644 --- a/test/legacy_test/test_crf_decoding_op.py +++ b/test/legacy_test/test_crf_decoding_op.py @@ -14,9 +14,9 @@ import random import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class CRFDecoding: diff --git a/test/legacy_test/test_crop_op.py b/test/legacy_test/test_crop_op.py index 24c31ca25b654..858fd89fc7e99 100644 --- a/test/legacy_test/test_crop_op.py +++ b/test/legacy_test/test_crop_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_crop_tensor_op.py b/test/legacy_test/test_crop_tensor_op.py index 0946677cc0b4f..8d9743a55171c 100644 --- a/test/legacy_test/test_crop_tensor_op.py +++ b/test/legacy_test/test_crop_tensor_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_cross_entropy2_op.py b/test/legacy_test/test_cross_entropy2_op.py index a89a89c65bb95..1066f4d2c8305 100644 --- a/test/legacy_test/test_cross_entropy2_op.py +++ b/test/legacy_test/test_cross_entropy2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class CrossEntropy2OpTestBase(OpTest): diff --git a/test/legacy_test/test_cross_entropy_op.py b/test/legacy_test/test_cross_entropy_op.py index baa5046ef6d45..f4f25543b2bf5 100644 --- a/test/legacy_test/test_cross_entropy_op.py +++ b/test/legacy_test/test_cross_entropy_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - paddle_static_guard, - randomize_probability, -) import numpy as np +from op_test import OpTest, paddle_static_guard, randomize_probability import paddle from paddle import base diff --git a/test/legacy_test/test_cross_op.py b/test/legacy_test/test_cross_op.py index 79087cbc88744..cd13ea10f4510 100644 --- a/test/legacy_test/test_cross_op.py +++ b/test/legacy_test/test_cross_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_ctc_align.py b/test/legacy_test/test_ctc_align.py index 9808c9afb0ed2..699b176518be1 100644 --- a/test/legacy_test/test_ctc_align.py +++ b/test/legacy_test/test_ctc_align.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_cummax_op.py b/test/legacy_test/test_cummax_op.py index 2e2f2041e1c8d..91df4866a75a6 100644 --- a/test/legacy_test/test_cummax_op.py +++ b/test/legacy_test/test_cummax_op.py @@ -14,9 +14,9 @@ import sys import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_cummin_op.py b/test/legacy_test/test_cummin_op.py index eaf9404a39a57..416e4c48f0fc0 100644 --- a/test/legacy_test/test_cummin_op.py +++ b/test/legacy_test/test_cummin_op.py @@ -14,9 +14,9 @@ import sys import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_cumprod_op.py b/test/legacy_test/test_cumprod_op.py index dbfbec2c1aba7..da3db1ee1ef6f 100644 --- a/test/legacy_test/test_cumprod_op.py +++ b/test/legacy_test/test_cumprod_op.py @@ -14,9 +14,9 @@ import random import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_cumsum_op.py b/test/legacy_test/test_cumsum_op.py index 1c2ec36635799..be733d989a93f 100644 --- a/test/legacy_test/test_cumsum_op.py +++ b/test/legacy_test/test_cumsum_op.py @@ -15,9 +15,9 @@ import os import tempfile import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle import paddle.inference as paddle_infer diff --git a/test/legacy_test/test_cvm_op.py b/test/legacy_test/test_cvm_op.py index 569963aa7e858..282167e8050cf 100644 --- a/test/legacy_test/test_cvm_op.py +++ b/test/legacy_test/test_cvm_op.py @@ -14,9 +14,9 @@ import unittest from math import log -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def cvm_compute(X, item_width, use_cvm): diff --git a/test/legacy_test/test_data_norm_op.py b/test/legacy_test/test_data_norm_op.py index d37e4227b88bc..954c3da834fd7 100644 --- a/test/legacy_test/test_data_norm_op.py +++ b/test/legacy_test/test_data_norm_op.py @@ -14,10 +14,10 @@ """This is unit test of Test data_norm Op.""" import unittest -from test.legacy_test.op_test import OpTest import numpy as np from op import Operator +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_decayed_adagrad_op.py b/test/legacy_test/test_decayed_adagrad_op.py index a05938ba3ea88..f7174fbfb1e57 100644 --- a/test/legacy_test/test_decayed_adagrad_op.py +++ b/test/legacy_test/test_decayed_adagrad_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestDecayedAdagradOp1(OpTest): diff --git a/test/legacy_test/test_deformable_conv_op.py b/test/legacy_test/test_deformable_conv_op.py index 9bee738bcb180..ff816a16a7b32 100644 --- a/test/legacy_test/test_deformable_conv_op.py +++ b/test/legacy_test/test_deformable_conv_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_deformable_conv_v1_op.py b/test/legacy_test/test_deformable_conv_v1_op.py index d45381154a8f2..a5a8347829041 100644 --- a/test/legacy_test/test_deformable_conv_v1_op.py +++ b/test/legacy_test/test_deformable_conv_v1_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_density_prior_box_op.py b/test/legacy_test/test_density_prior_box_op.py index 59147d5ef22ed..9d621dc551111 100644 --- a/test/legacy_test/test_density_prior_box_op.py +++ b/test/legacy_test/test_density_prior_box_op.py @@ -14,9 +14,9 @@ import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestDensityPriorBoxOp(OpTest): diff --git a/test/legacy_test/test_dequantize_abs_max_op.py b/test/legacy_test/test_dequantize_abs_max_op.py index 9d4b8c450a940..0df5a3fda11c2 100644 --- a/test/legacy_test/test_dequantize_abs_max_op.py +++ b/test/legacy_test/test_dequantize_abs_max_op.py @@ -14,9 +14,9 @@ import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def quantize_max_abs(x, max_range): diff --git a/test/legacy_test/test_dequantize_log_op.py b/test/legacy_test/test_dequantize_log_op.py index 0540957adef2b..9db2aa6b918d1 100644 --- a/test/legacy_test/test_dequantize_log_op.py +++ b/test/legacy_test/test_dequantize_log_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def dequantize_log(x, dict_data): diff --git a/test/legacy_test/test_detection_map_op.py b/test/legacy_test/test_detection_map_op.py index 82baeeff7c5df..376b9876cd46a 100644 --- a/test/legacy_test/test_detection_map_op.py +++ b/test/legacy_test/test_detection_map_op.py @@ -15,9 +15,9 @@ import collections import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestDetectionMAPOp(OpTest): diff --git a/test/legacy_test/test_determinant_op.py b/test/legacy_test/test_determinant_op.py index b619aefcfa5d2..f0066edf10424 100644 --- a/test/legacy_test/test_determinant_op.py +++ b/test/legacy_test/test_determinant_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_diag.py b/test/legacy_test/test_diag.py index 4027188e4cebb..4f713488b8206 100644 --- a/test/legacy_test/test_diag.py +++ b/test/legacy_test/test_diag.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base import Program, core, program_guard diff --git a/test/legacy_test/test_diag_embed.py b/test/legacy_test/test_diag_embed.py index 28fbd255f5189..2f3869713f0e3 100644 --- a/test/legacy_test/test_diag_embed.py +++ b/test/legacy_test/test_diag_embed.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_diag_v2.py b/test/legacy_test/test_diag_v2.py index 22fa99d254098..2458a280ce039 100644 --- a/test/legacy_test/test_diag_v2.py +++ b/test/legacy_test/test_diag_v2.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_diagonal_op.py b/test/legacy_test/test_diagonal_op.py index ff87915324916..0e69b7cc4d26a 100644 --- a/test/legacy_test/test_diagonal_op.py +++ b/test/legacy_test/test_diagonal_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_digamma_op.py b/test/legacy_test/test_digamma_op.py index 4a3d428f50c2d..04bb768a5b179 100644 --- a/test/legacy_test/test_digamma_op.py +++ b/test/legacy_test/test_digamma_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 from scipy.special import psi import paddle diff --git a/test/legacy_test/test_dist_op.py b/test/legacy_test/test_dist_op.py index 581a6a0d62184..bd2e9c828e144 100644 --- a/test/legacy_test/test_dist_op.py +++ b/test/legacy_test/test_dist_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_distribute_fpn_proposals_op.py b/test/legacy_test/test_distribute_fpn_proposals_op.py index 3791d179a176a..956c435298781 100644 --- a/test/legacy_test/test_distribute_fpn_proposals_op.py +++ b/test/legacy_test/test_distribute_fpn_proposals_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_dot_op.py b/test/legacy_test/test_dot_op.py index 99295511c6b3e..17c928be25071 100644 --- a/test/legacy_test/test_dot_op.py +++ b/test/legacy_test/test_dot_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_dpsgd_op.py b/test/legacy_test/test_dpsgd_op.py index 553d941d621ed..f8a84f2f38572 100644 --- a/test/legacy_test/test_dpsgd_op.py +++ b/test/legacy_test/test_dpsgd_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestDpsgdOp(OpTest): diff --git a/test/legacy_test/test_dropout_nd_op.py b/test/legacy_test/test_dropout_nd_op.py index 43feb9f499e7b..02e160c091734 100644 --- a/test/legacy_test/test_dropout_nd_op.py +++ b/test/legacy_test/test_dropout_nd_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import _legacy_C_ops, base diff --git a/test/legacy_test/test_dropout_op.py b/test/legacy_test/test_dropout_op.py index dda614c459b55..e76f620512639 100644 --- a/test/legacy_test/test_dropout_op.py +++ b/test/legacy_test/test_dropout_op.py @@ -13,14 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - skip_check_grad_ci, -) import numpy as np import parameterized as param +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import _C_ops, base, static diff --git a/test/legacy_test/test_edit_distance_op.py b/test/legacy_test/test_edit_distance_op.py index 7ca24d18fff50..dba8891c7e445 100644 --- a/test/legacy_test/test_edit_distance_op.py +++ b/test/legacy_test/test_edit_distance_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_eig_op.py b/test/legacy_test/test_eig_op.py index 6de0f599d2b96..c5ba7262902c7 100644 --- a/test/legacy_test/test_eig_op.py +++ b/test/legacy_test/test_eig_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np +from op_test import OpTest, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_eigh_op.py b/test/legacy_test/test_eigh_op.py index 50d49daa904a7..12042b89a17f0 100644 --- a/test/legacy_test/test_eigh_op.py +++ b/test/legacy_test/test_eigh_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_eigvals_op.py b/test/legacy_test/test_eigvals_op.py index c4eb2c812fcad..6f3f126b2db3e 100644 --- a/test/legacy_test/test_eigvals_op.py +++ b/test/legacy_test/test_eigvals_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_eigvalsh_op.py b/test/legacy_test/test_eigvalsh_op.py index e0437ce522efc..654702f856188 100644 --- a/test/legacy_test/test_eigvalsh_op.py +++ b/test/legacy_test/test_eigvalsh_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_einsum_op.py b/test/legacy_test/test_einsum_op.py index a1bf8136dd4ba..86b1cff7ea9ff 100644 --- a/test/legacy_test/test_einsum_op.py +++ b/test/legacy_test/test_einsum_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_elementwise_add_op.py b/test/legacy_test/test_elementwise_add_op.py index a7693fa356c31..a9d7a3ad92006 100644 --- a/test/legacy_test/test_elementwise_add_op.py +++ b/test/legacy_test/test_elementwise_add_op.py @@ -16,13 +16,9 @@ import os import unittest import warnings -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - skip_check_grad_ci, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_elementwise_div_op.py b/test/legacy_test/test_elementwise_div_op.py index 5eb1534456d73..1f43162d242a5 100644 --- a/test/legacy_test/test_elementwise_div_op.py +++ b/test/legacy_test/test_elementwise_div_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - skip_check_grad_ci, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_elementwise_floordiv_op.py b/test/legacy_test/test_elementwise_floordiv_op.py index 1e83f5116a564..f85ffe2252e02 100644 --- a/test/legacy_test/test_elementwise_floordiv_op.py +++ b/test/legacy_test/test_elementwise_floordiv_op.py @@ -15,9 +15,9 @@ import random import unittest from contextlib import contextmanager -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_elementwise_heaviside_op.py b/test/legacy_test/test_elementwise_heaviside_op.py index 0357acfb6cd20..be1a241849e41 100644 --- a/test/legacy_test/test_elementwise_heaviside_op.py +++ b/test/legacy_test/test_elementwise_heaviside_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_elementwise_max_op.py b/test/legacy_test/test_elementwise_max_op.py index 9bb41356c46f4..80e35c1a171c6 100644 --- a/test/legacy_test/test_elementwise_max_op.py +++ b/test/legacy_test/test_elementwise_max_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - skip_check_grad_ci, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle.base import core diff --git a/test/legacy_test/test_elementwise_min_op.py b/test/legacy_test/test_elementwise_min_op.py index 38c741c9fde8b..4b839b4c8fc17 100644 --- a/test/legacy_test/test_elementwise_min_op.py +++ b/test/legacy_test/test_elementwise_min_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - skip_check_grad_ci, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle.base import core diff --git a/test/legacy_test/test_elementwise_mod_op.py b/test/legacy_test/test_elementwise_mod_op.py index c65fa75bbf57a..bb9348b358ebd 100644 --- a/test/legacy_test/test_elementwise_mod_op.py +++ b/test/legacy_test/test_elementwise_mod_op.py @@ -14,13 +14,9 @@ import random import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float import paddle from paddle import base diff --git a/test/legacy_test/test_elementwise_mul_op.py b/test/legacy_test/test_elementwise_mul_op.py index c0ac26235fd91..b03a9d0d2980f 100644 --- a/test/legacy_test/test_elementwise_mul_op.py +++ b/test/legacy_test/test_elementwise_mul_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - skip_check_grad_ci, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle.base import core diff --git a/test/legacy_test/test_elementwise_pow_op.py b/test/legacy_test/test_elementwise_pow_op.py index 4661608191ba5..8e64c45de27f6 100644 --- a/test/legacy_test/test_elementwise_pow_op.py +++ b/test/legacy_test/test_elementwise_pow_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - skip_check_grad_ci, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_elementwise_sub_op.py b/test/legacy_test/test_elementwise_sub_op.py index 91bb59095799f..d3e96d158d98c 100644 --- a/test/legacy_test/test_elementwise_sub_op.py +++ b/test/legacy_test/test_elementwise_sub_op.py @@ -15,13 +15,9 @@ import os import unittest import warnings -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - skip_check_grad_ci, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_empty_like_op.py b/test/legacy_test/test_empty_like_op.py index 2a111e5fd7bc0..f464388ae4720 100644 --- a/test/legacy_test/test_empty_like_op.py +++ b/test/legacy_test/test_empty_like_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import convert_uint16_to_float import numpy as np +from op_test import convert_uint16_to_float import paddle from paddle.base import core diff --git a/test/legacy_test/test_empty_op.py b/test/legacy_test/test_empty_op.py index 11f8f0e2891fc..6920ef42dc6c6 100644 --- a/test/legacy_test/test_empty_op.py +++ b/test/legacy_test/test_empty_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_erf_op.py b/test/legacy_test/test_erf_op.py index 39b6410b0e334..bb94e950d35e7 100644 --- a/test/legacy_test/test_erf_op.py +++ b/test/legacy_test/test_erf_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 from scipy.special import erf import paddle diff --git a/test/legacy_test/test_erfinv_op.py b/test/legacy_test/test_erfinv_op.py index a4a3783dff0f3..3108f8520d532 100644 --- a/test/legacy_test/test_erfinv_op.py +++ b/test/legacy_test/test_erfinv_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float from scipy.special import erfinv import paddle diff --git a/test/legacy_test/test_executor_return_tensor_not_overwriting.py b/test/legacy_test/test_executor_return_tensor_not_overwriting.py index 1a52eebcf4d9e..aa88d3d603f44 100644 --- a/test/legacy_test/test_executor_return_tensor_not_overwriting.py +++ b/test/legacy_test/test_executor_return_tensor_not_overwriting.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np +from op_test import OpTest, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_expand_as_op.py b/test/legacy_test/test_expand_as_op.py index c5ab5ed18f3a2..b5b8013a2c9c6 100755 --- a/test/legacy_test/test_expand_as_op.py +++ b/test/legacy_test/test_expand_as_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def bcast(x, target_tensor): diff --git a/test/legacy_test/test_expand_as_v2_op.py b/test/legacy_test/test_expand_as_v2_op.py index c1ff3299a4fc4..13aa6863b9bd6 100755 --- a/test/legacy_test/test_expand_as_v2_op.py +++ b/test/legacy_test/test_expand_as_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_expand_op.py b/test/legacy_test/test_expand_op.py index 6f579ac67defa..f86af46ba7e5d 100644 --- a/test/legacy_test/test_expand_op.py +++ b/test/legacy_test/test_expand_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle import base diff --git a/test/legacy_test/test_expand_v2_op.py b/test/legacy_test/test_expand_v2_op.py index 7fe48d9e18e0b..d76e97095253b 100644 --- a/test/legacy_test/test_expand_v2_op.py +++ b/test/legacy_test/test_expand_v2_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_exponential_op.py b/test/legacy_test/test_exponential_op.py index b919bdc55d493..a611b477f99ed 100644 --- a/test/legacy_test/test_exponential_op.py +++ b/test/legacy_test/test_exponential_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float import paddle from paddle.base import core diff --git a/test/legacy_test/test_eye_op.py b/test/legacy_test/test_eye_op.py index e78e84cf21c5c..bd1b42183364c 100644 --- a/test/legacy_test/test_eye_op.py +++ b/test/legacy_test/test_eye_op.py @@ -14,9 +14,9 @@ import os import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_attribute_var import UnittestBase import paddle diff --git a/test/legacy_test/test_fake_dequantize_op.py b/test/legacy_test/test_fake_dequantize_op.py index 0aeffacc77e6a..ee2f7f7b0820a 100644 --- a/test/legacy_test/test_fake_dequantize_op.py +++ b/test/legacy_test/test_fake_dequantize_op.py @@ -14,9 +14,9 @@ import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def quantize_max_abs(x, max_range): diff --git a/test/legacy_test/test_fake_quantize_op.py b/test/legacy_test/test_fake_quantize_op.py index f8fa40226fca2..8fdfd5f142c78 100644 --- a/test/legacy_test/test_fake_quantize_op.py +++ b/test/legacy_test/test_fake_quantize_op.py @@ -15,9 +15,9 @@ import itertools import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def round_c_single_element(val): diff --git a/test/legacy_test/test_fc_op.py b/test/legacy_test/test_fc_op.py index cc1c82604f014..1f41cf8d4afa6 100644 --- a/test/legacy_test/test_fc_op.py +++ b/test/legacy_test/test_fc_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_fill_any_like_op.py b/test/legacy_test/test_fill_any_like_op.py index 8c6a999145713..7b68285256bec 100644 --- a/test/legacy_test/test_fill_any_like_op.py +++ b/test/legacy_test/test_fill_any_like_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle import paddle.framework.dtype as dtypes diff --git a/test/legacy_test/test_fill_any_op.py b/test/legacy_test/test_fill_any_op.py index 4b9e0d87ac304..6752701dde91d 100644 --- a/test/legacy_test/test_fill_any_op.py +++ b/test/legacy_test/test_fill_any_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_fill_constant_op.py b/test/legacy_test/test_fill_constant_op.py index 6e73d865dda5e..e8027da2d0853 100644 --- a/test/legacy_test/test_fill_constant_op.py +++ b/test/legacy_test/test_fill_constant_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np from op import Operator +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_fill_diagonal_tensor_op.py b/test/legacy_test/test_fill_diagonal_tensor_op.py index 4fba4c01f9eee..5b8f5d69e5f5f 100644 --- a/test/legacy_test/test_fill_diagonal_tensor_op.py +++ b/test/legacy_test/test_fill_diagonal_tensor_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_fill_op.py b/test/legacy_test/test_fill_op.py index 5b2dd642c9e96..679ee25e041ab 100644 --- a/test/legacy_test/test_fill_op.py +++ b/test/legacy_test/test_fill_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np from op import Operator +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_fill_zeros_like2_op.py b/test/legacy_test/test_fill_zeros_like2_op.py index db33f5aef5e5b..8b00fc3a29fd7 100644 --- a/test/legacy_test/test_fill_zeros_like2_op.py +++ b/test/legacy_test/test_fill_zeros_like2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle.base.framework import convert_np_dtype_to_dtype_ diff --git a/test/legacy_test/test_fill_zeros_like_op.py b/test/legacy_test/test_fill_zeros_like_op.py index 10ca1c1e80725..805d9c88d6cb2 100644 --- a/test/legacy_test/test_fill_zeros_like_op.py +++ b/test/legacy_test/test_fill_zeros_like_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestFillZerosLikeOp(OpTest): diff --git a/test/legacy_test/test_filter_by_instag_op.py b/test/legacy_test/test_filter_by_instag_op.py index ba07fa8c2c33f..211889feaa06b 100644 --- a/test/legacy_test/test_filter_by_instag_op.py +++ b/test/legacy_test/test_filter_by_instag_op.py @@ -14,9 +14,9 @@ """This is unit test of Test filter_instag Op.""" import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest """This is Test Case 1""" diff --git a/test/legacy_test/test_flatten2_op.py b/test/legacy_test/test_flatten2_op.py index 20e6ab2c882d1..a60739210679f 100644 --- a/test/legacy_test/test_flatten2_op.py +++ b/test/legacy_test/test_flatten2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestFlattenOp(OpTest): diff --git a/test/legacy_test/test_flatten_contiguous_range_op.py b/test/legacy_test/test_flatten_contiguous_range_op.py index 021c65831133b..d497da1cd2758 100644 --- a/test/legacy_test/test_flatten_contiguous_range_op.py +++ b/test/legacy_test/test_flatten_contiguous_range_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_flatten_op.py b/test/legacy_test/test_flatten_op.py index 82af04efee16e..f59c6a91028d1 100644 --- a/test/legacy_test/test_flatten_op.py +++ b/test/legacy_test/test_flatten_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle diff --git a/test/legacy_test/test_flip.py b/test/legacy_test/test_flip.py index bdc8f7f406c87..4e5cc58ad3312 100644 --- a/test/legacy_test/test_flip.py +++ b/test/legacy_test/test_flip.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_fmax_op.py b/test/legacy_test/test_fmax_op.py index 5aba58228be20..bc5272134f238 100644 --- a/test/legacy_test/test_fmax_op.py +++ b/test/legacy_test/test_fmax_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_fmin_op.py b/test/legacy_test/test_fmin_op.py index 1ed9cc6a06397..88d4b8252f3d1 100644 --- a/test/legacy_test/test_fmin_op.py +++ b/test/legacy_test/test_fmin_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_fold_op.py b/test/legacy_test/test_fold_op.py index e5f2213c7df0e..8e4ab1971b7ae 100644 --- a/test/legacy_test/test_fold_op.py +++ b/test/legacy_test/test_fold_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_frame_op.py b/test/legacy_test/test_frame_op.py index dbde977bc47be..2b0263d08620f 100644 --- a/test/legacy_test/test_frame_op.py +++ b/test/legacy_test/test_frame_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np from numpy.lib.stride_tricks import as_strided +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_fsp_op.py b/test/legacy_test/test_fsp_op.py index d56d5a6fb891e..abeaae9f24d3d 100644 --- a/test/legacy_test/test_fsp_op.py +++ b/test/legacy_test/test_fsp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def fsp_matrix(a, b): diff --git a/test/legacy_test/test_ftrl_op.py b/test/legacy_test/test_ftrl_op.py index 43ea434570d70..489da7c4f0c8f 100644 --- a/test/legacy_test/test_ftrl_op.py +++ b/test/legacy_test/test_ftrl_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np from op import Operator +from op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_full_like_op.py b/test/legacy_test/test_full_like_op.py index 0e2f09b940156..43f3b8d586927 100644 --- a/test/legacy_test/test_full_like_op.py +++ b/test/legacy_test/test_full_like_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle import paddle.framework.dtype as dtypes diff --git a/test/legacy_test/test_fused_adam_op.py b/test/legacy_test/test_fused_adam_op.py index d833438cb1535..8bbc1fafef05b 100644 --- a/test/legacy_test/test_fused_adam_op.py +++ b/test/legacy_test/test_fused_adam_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_fused_attention_op.py b/test/legacy_test/test_fused_attention_op.py index 6c73b0fc15208..af734c96d19d8 100644 --- a/test/legacy_test/test_fused_attention_op.py +++ b/test/legacy_test/test_fused_attention_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle import paddle.incubate.nn.functional as incubate_f diff --git a/test/legacy_test/test_fused_bias_act_op.py b/test/legacy_test/test_fused_bias_act_op.py index 3aed655c66360..b82e99117653d 100644 --- a/test/legacy_test/test_fused_bias_act_op.py +++ b/test/legacy_test/test_fused_bias_act_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import convert_float_to_uint16 import numpy as np +from op_test import convert_float_to_uint16 from scipy.special import erf, expit import paddle diff --git a/test/legacy_test/test_fused_bias_dropout_residual_layer_norm_op.py b/test/legacy_test/test_fused_bias_dropout_residual_layer_norm_op.py index 4435c2262b8a6..e57ec58fb0ede 100644 --- a/test/legacy_test/test_fused_bias_dropout_residual_layer_norm_op.py +++ b/test/legacy_test/test_fused_bias_dropout_residual_layer_norm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle import paddle.incubate.nn.functional as incubate_f diff --git a/test/legacy_test/test_fused_ec_moe_op.py b/test/legacy_test/test_fused_ec_moe_op.py index 64e459f5dd1c8..68f436a62c5ae 100644 --- a/test/legacy_test/test_fused_ec_moe_op.py +++ b/test/legacy_test/test_fused_ec_moe_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_fused_elemwise_activation_op.py b/test/legacy_test/test_fused_elemwise_activation_op.py index 1b937f865ce0a..a71e449f75d3a 100644 --- a/test/legacy_test/test_fused_elemwise_activation_op.py +++ b/test/legacy_test/test_fused_elemwise_activation_op.py @@ -14,9 +14,9 @@ import unittest from functools import partial -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_fused_emb_seq_pool_op.py b/test/legacy_test/test_fused_emb_seq_pool_op.py index 5e4439d643a9d..0d7d5aab4401e 100644 --- a/test/legacy_test/test_fused_emb_seq_pool_op.py +++ b/test/legacy_test/test_fused_emb_seq_pool_op.py @@ -14,13 +14,9 @@ import platform import unittest -from test.legacy_test.op_test import ( - OpTest, - paddle_static_guard, - skip_check_grad_ci, -) import numpy as np +from op_test import OpTest, paddle_static_guard, skip_check_grad_ci import paddle import paddle.version as ver diff --git a/test/legacy_test/test_fused_embedding_fc_lstm_op.py b/test/legacy_test/test_fused_embedding_fc_lstm_op.py index cf6e1f6c32888..cc9dd6a17565d 100644 --- a/test/legacy_test/test_fused_embedding_fc_lstm_op.py +++ b/test/legacy_test/test_fused_embedding_fc_lstm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_lstm_op import ACTIVATION, lstm diff --git a/test/legacy_test/test_fused_fc_elementwise_layernorm_op.py b/test/legacy_test/test_fused_fc_elementwise_layernorm_op.py index 174213ee40d09..3284c4a46953f 100644 --- a/test/legacy_test/test_fused_fc_elementwise_layernorm_op.py +++ b/test/legacy_test/test_fused_fc_elementwise_layernorm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_fc_op import MatrixGenerate, fc_refer from test_layer_norm_op import _reference_layer_norm_naive diff --git a/test/legacy_test/test_fused_feedforward_op.py b/test/legacy_test/test_fused_feedforward_op.py index 4b32535e6ab9e..6ac4c8b09f63f 100644 --- a/test/legacy_test/test_fused_feedforward_op.py +++ b/test/legacy_test/test_fused_feedforward_op.py @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle import paddle.incubate.nn.functional as incubate_f diff --git a/test/legacy_test/test_fused_gate_attention_op.py b/test/legacy_test/test_fused_gate_attention_op.py index 66b6babbdc1b3..43ee9ab844ee0 100644 --- a/test/legacy_test/test_fused_gate_attention_op.py +++ b/test/legacy_test/test_fused_gate_attention_op.py @@ -18,13 +18,9 @@ os.environ['FLAGS_new_einsum'] = "0" import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float from test_sparse_attention_op import get_cuda_version import paddle diff --git a/test/legacy_test/test_fused_gemm_epilogue_grad_op.py b/test/legacy_test/test_fused_gemm_epilogue_grad_op.py index 9450d5b325c21..0e33518072cf8 100644 --- a/test/legacy_test/test_fused_gemm_epilogue_grad_op.py +++ b/test/legacy_test/test_fused_gemm_epilogue_grad_op.py @@ -14,9 +14,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np +from op_test import OpTest, skip_check_grad_ci import paddle from paddle.base import core diff --git a/test/legacy_test/test_fused_gemm_epilogue_op.py b/test/legacy_test/test_fused_gemm_epilogue_op.py index 5cbfebd89c323..7a3301a3981d5 100644 --- a/test/legacy_test/test_fused_gemm_epilogue_op.py +++ b/test/legacy_test/test_fused_gemm_epilogue_op.py @@ -14,13 +14,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - skip_check_grad_ci, - skip_check_inplace_ci, -) import numpy as np +from op_test import OpTest, skip_check_grad_ci, skip_check_inplace_ci import paddle from paddle.base import core diff --git a/test/legacy_test/test_fused_multi_transformer_op.py b/test/legacy_test/test_fused_multi_transformer_op.py index 20c0b7c28e353..d7bab80a41b80 100644 --- a/test/legacy_test/test_fused_multi_transformer_op.py +++ b/test/legacy_test/test_fused_multi_transformer_op.py @@ -14,9 +14,9 @@ import random import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_fused_multihead_matmul_op.py b/test/legacy_test/test_fused_multihead_matmul_op.py index bec76fd04c35e..e4ba1a346e453 100644 --- a/test/legacy_test/test_fused_multihead_matmul_op.py +++ b/test/legacy_test/test_fused_multihead_matmul_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_fused_scale_bias_relu_conv_bnstats_op.py b/test/legacy_test/test_fused_scale_bias_relu_conv_bnstats_op.py index 20de35a75ac52..4beef728d9e11 100644 --- a/test/legacy_test/test_fused_scale_bias_relu_conv_bnstats_op.py +++ b/test/legacy_test/test_fused_scale_bias_relu_conv_bnstats_op.py @@ -14,9 +14,9 @@ import unittest -from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np +from op_test import OpTest, skip_check_grad_ci import paddle from paddle import nn diff --git a/test/legacy_test/test_fused_token_prune_op.py b/test/legacy_test/test_fused_token_prune_op.py index bc80681ae9f49..c29766123d15e 100644 --- a/test/legacy_test/test_fused_token_prune_op.py +++ b/test/legacy_test/test_fused_token_prune_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle.framework import core diff --git a/test/legacy_test/test_fusion_gru_op.py b/test/legacy_test/test_fusion_gru_op.py index 6452901ee9074..a86fd9b1f7b7c 100644 --- a/test/legacy_test/test_fusion_gru_op.py +++ b/test/legacy_test/test_fusion_gru_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_fusion_lstm_op import ACTIVATION, fc from test_gru_op import gru diff --git a/test/legacy_test/test_fusion_lstm_op.py b/test/legacy_test/test_fusion_lstm_op.py index fd1ab8bb6f0c4..bbcb5e8a8396c 100644 --- a/test/legacy_test/test_fusion_lstm_op.py +++ b/test/legacy_test/test_fusion_lstm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_lstm_op import ACTIVATION, lstm diff --git a/test/legacy_test/test_fusion_repeated_fc_relu_op.py b/test/legacy_test/test_fusion_repeated_fc_relu_op.py index 359915ab2b1d5..b57cdfc1d4eb2 100644 --- a/test/legacy_test/test_fusion_repeated_fc_relu_op.py +++ b/test/legacy_test/test_fusion_repeated_fc_relu_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_fc_op import MatrixGenerate, fc_refer diff --git a/test/legacy_test/test_fusion_seqconv_eltadd_relu_op.py b/test/legacy_test/test_fusion_seqconv_eltadd_relu_op.py index 8566c8ff89810..7cfc0da1ebe47 100644 --- a/test/legacy_test/test_fusion_seqconv_eltadd_relu_op.py +++ b/test/legacy_test/test_fusion_seqconv_eltadd_relu_op.py @@ -14,9 +14,9 @@ import sys import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest sys.path.append("../../test/sequence") from test_sequence_conv import seqconv diff --git a/test/legacy_test/test_fusion_seqexpand_concat_fc_op.py b/test/legacy_test/test_fusion_seqexpand_concat_fc_op.py index 2257c143940d2..77bbb1e238767 100644 --- a/test/legacy_test/test_fusion_seqexpand_concat_fc_op.py +++ b/test/legacy_test/test_fusion_seqexpand_concat_fc_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_fusion_lstm_op import ACTIVATION, fc diff --git a/test/legacy_test/test_fusion_seqpool_concat_op.py b/test/legacy_test/test_fusion_seqpool_concat_op.py index 9f24677c8f643..3e136d94f4041 100644 --- a/test/legacy_test/test_fusion_seqpool_concat_op.py +++ b/test/legacy_test/test_fusion_seqpool_concat_op.py @@ -14,9 +14,9 @@ import sys import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest sys.path.append("../../test/sequence") from test_sequence_pool import ( diff --git a/test/legacy_test/test_fusion_seqpool_cvm_concat_op.py b/test/legacy_test/test_fusion_seqpool_cvm_concat_op.py index ba1f44171b127..86620eda0f69d 100644 --- a/test/legacy_test/test_fusion_seqpool_cvm_concat_op.py +++ b/test/legacy_test/test_fusion_seqpool_cvm_concat_op.py @@ -14,9 +14,9 @@ import sys import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest sys.path.append("../../test/sequence") from test_cvm_op import cvm_compute diff --git a/test/legacy_test/test_fusion_squared_mat_sub_op.py b/test/legacy_test/test_fusion_squared_mat_sub_op.py index d65c066b0263c..a9c692e538261 100644 --- a/test/legacy_test/test_fusion_squared_mat_sub_op.py +++ b/test/legacy_test/test_fusion_squared_mat_sub_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestFusionSquaredMatSubOp(OpTest): diff --git a/test/legacy_test/test_fusion_transpose_flatten_concat_op.py b/test/legacy_test/test_fusion_transpose_flatten_concat_op.py index 99c9e370df5f6..de557e4c4a52e 100644 --- a/test/legacy_test/test_fusion_transpose_flatten_concat_op.py +++ b/test/legacy_test/test_fusion_transpose_flatten_concat_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_gather_nd_op.py b/test/legacy_test/test_gather_nd_op.py index 73dc224c62d48..193a9856c9e67 100644 --- a/test/legacy_test/test_gather_nd_op.py +++ b/test/legacy_test/test_gather_nd_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float import paddle from paddle import base diff --git a/test/legacy_test/test_gather_op.py b/test/legacy_test/test_gather_op.py index ac88bc72c4c37..e845875394be6 100644 --- a/test/legacy_test/test_gather_op.py +++ b/test/legacy_test/test_gather_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_gather_tree_op.py b/test/legacy_test/test_gather_tree_op.py index a11e9a8ee66ab..2604d3e48e8da 100644 --- a/test/legacy_test/test_gather_tree_op.py +++ b/test/legacy_test/test_gather_tree_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base.framework import Program, program_guard diff --git a/test/legacy_test/test_gaussian_random_op.py b/test/legacy_test/test_gaussian_random_op.py index f6b4ca1989f92..f3f13e8b0c2b8 100644 --- a/test/legacy_test/test_gaussian_random_op.py +++ b/test/legacy_test/test_gaussian_random_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_uint16_to_float, - paddle_static_guard, -) import numpy as np +from op_test import OpTest, convert_uint16_to_float, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_generate_proposal_labels_op.py b/test/legacy_test/test_generate_proposal_labels_op.py index 964f36086a421..903201b9856a7 100644 --- a/test/legacy_test/test_generate_proposal_labels_op.py +++ b/test/legacy_test/test_generate_proposal_labels_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def generate_proposal_labels_in_python( diff --git a/test/legacy_test/test_generate_proposals_op.py b/test/legacy_test/test_generate_proposals_op.py index 087def7740a34..7ce1aa5e4666b 100644 --- a/test/legacy_test/test_generate_proposals_op.py +++ b/test/legacy_test/test_generate_proposals_op.py @@ -15,9 +15,9 @@ import copy import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_anchor_generator_op import anchor_generator_in_python import paddle diff --git a/test/legacy_test/test_generate_proposals_v2_op.py b/test/legacy_test/test_generate_proposals_v2_op.py index 7474b5ea8fd5d..568c466e06666 100644 --- a/test/legacy_test/test_generate_proposals_v2_op.py +++ b/test/legacy_test/test_generate_proposals_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_anchor_generator_op import anchor_generator_in_python from test_generate_proposals_op import box_coder, clip_tiled_boxes, nms diff --git a/test/legacy_test/test_graph_send_recv_op.py b/test/legacy_test/test_graph_send_recv_op.py index 03dd63539383d..31269a82b3faa 100644 --- a/test/legacy_test/test_graph_send_recv_op.py +++ b/test/legacy_test/test_graph_send_recv_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_graph_send_ue_recv_op.py b/test/legacy_test/test_graph_send_ue_recv_op.py index 384a543b83fac..cc8f6e188a863 100644 --- a/test/legacy_test/test_graph_send_ue_recv_op.py +++ b/test/legacy_test/test_graph_send_ue_recv_op.py @@ -14,9 +14,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_graph_send_uv_op.py b/test/legacy_test/test_graph_send_uv_op.py index 6285fe23af95d..ad32cbeea3952 100644 --- a/test/legacy_test/test_graph_send_uv_op.py +++ b/test/legacy_test/test_graph_send_uv_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_grid_sampler_op.py b/test/legacy_test/test_grid_sampler_op.py index f1f5b651e4669..c3bbbbf040b2c 100644 --- a/test/legacy_test/test_grid_sampler_op.py +++ b/test/legacy_test/test_grid_sampler_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np +from op_test import OpTest, skip_check_grad_ci import paddle from paddle.base import core diff --git a/test/legacy_test/test_group_norm_op.py b/test/legacy_test/test_group_norm_op.py index 2834b63436a4c..4d6a3fff923f6 100644 --- a/test/legacy_test/test_group_norm_op.py +++ b/test/legacy_test/test_group_norm_op.py @@ -13,16 +13,16 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( + +import numpy as np +import parameterized as param +from op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, paddle_static_guard, skip_check_grad_ci, ) - -import numpy as np -import parameterized as param from testsuite import create_op import paddle diff --git a/test/legacy_test/test_gru_op.py b/test/legacy_test/test_gru_op.py index 5fd772eccc2e5..cde8e2bec8baf 100644 --- a/test/legacy_test/test_gru_op.py +++ b/test/legacy_test/test_gru_op.py @@ -14,9 +14,9 @@ import functools import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_lstm_op import ACTIVATION diff --git a/test/legacy_test/test_gru_rnn_op.py b/test/legacy_test/test_gru_rnn_op.py index 166f17fe99c97..f3b87d2b8ac54 100644 --- a/test/legacy_test/test_gru_rnn_op.py +++ b/test/legacy_test/test_gru_rnn_op.py @@ -15,9 +15,9 @@ import random import sys import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_gru_unit_op.py b/test/legacy_test/test_gru_unit_op.py index 6859faeb22d69..ce176a0ba1c70 100644 --- a/test/legacy_test/test_gru_unit_op.py +++ b/test/legacy_test/test_gru_unit_op.py @@ -14,9 +14,9 @@ import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle import base diff --git a/test/legacy_test/test_gumbel_softmax_op.py b/test/legacy_test/test_gumbel_softmax_op.py index 68a12ddbedecb..6332dd695e551 100644 --- a/test/legacy_test/test_gumbel_softmax_op.py +++ b/test/legacy_test/test_gumbel_softmax_op.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_hash_op.py b/test/legacy_test/test_hash_op.py index d438755f91575..75ddd7bb89c8c 100644 --- a/test/legacy_test/test_hash_op.py +++ b/test/legacy_test/test_hash_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestHashOp(OpTest): diff --git a/test/legacy_test/test_hinge_loss_op.py b/test/legacy_test/test_hinge_loss_op.py index a1c47d24f7bc9..d87d9e43aa2d3 100644 --- a/test/legacy_test/test_hinge_loss_op.py +++ b/test/legacy_test/test_hinge_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestHingeLossOp(OpTest): diff --git a/test/legacy_test/test_histogram_op.py b/test/legacy_test/test_histogram_op.py index b00f38ccbc6ef..c482350536b6f 100644 --- a/test/legacy_test/test_histogram_op.py +++ b/test/legacy_test/test_histogram_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_hsigmoid_op.py b/test/legacy_test/test_hsigmoid_op.py index fe961f8004451..65cb8548e9eb8 100644 --- a/test/legacy_test/test_hsigmoid_op.py +++ b/test/legacy_test/test_hsigmoid_op.py @@ -14,9 +14,9 @@ import math import unittest -from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np +from op_test import OpTest, skip_check_grad_ci import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_huber_loss_op.py b/test/legacy_test/test_huber_loss_op.py index 62e9b91a9e3e8..52a06c12cd716 100644 --- a/test/legacy_test/test_huber_loss_op.py +++ b/test/legacy_test/test_huber_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_i0_op.py b/test/legacy_test/test_i0_op.py index 30db2dc119c39..4ff7514752e0b 100644 --- a/test/legacy_test/test_i0_op.py +++ b/test/legacy_test/test_i0_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from scipy import special import paddle diff --git a/test/legacy_test/test_i0e_op.py b/test/legacy_test/test_i0e_op.py index 283a742e6f742..692587bf86dbf 100644 --- a/test/legacy_test/test_i0e_op.py +++ b/test/legacy_test/test_i0e_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from scipy import special import paddle diff --git a/test/legacy_test/test_i1_op.py b/test/legacy_test/test_i1_op.py index 7e138f36edeee..0bb76a9bbf6ef 100644 --- a/test/legacy_test/test_i1_op.py +++ b/test/legacy_test/test_i1_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from scipy import special import paddle diff --git a/test/legacy_test/test_i1e_op.py b/test/legacy_test/test_i1e_op.py index 9075fd5bfe290..94f9b625dc95b 100644 --- a/test/legacy_test/test_i1e_op.py +++ b/test/legacy_test/test_i1e_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from scipy import special import paddle diff --git a/test/legacy_test/test_identity_loss_op.py b/test/legacy_test/test_identity_loss_op.py index aa52210b69253..f751aa8959309 100644 --- a/test/legacy_test/test_identity_loss_op.py +++ b/test/legacy_test/test_identity_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_im2sequence_op.py b/test/legacy_test/test_im2sequence_op.py index f60bdce148027..b118418711249 100644 --- a/test/legacy_test/test_im2sequence_op.py +++ b/test/legacy_test/test_im2sequence_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np +from op_test import OpTest, skip_check_grad_ci def get_output_shape(attrs, in_shape, img_real_size): diff --git a/test/legacy_test/test_index_add_op.py b/test/legacy_test/test_index_add_op.py index 052e7b323bffa..cf6a3d03245d2 100644 --- a/test/legacy_test/test_index_add_op.py +++ b/test/legacy_test/test_index_add_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import Program, core diff --git a/test/legacy_test/test_index_sample_op.py b/test/legacy_test/test_index_sample_op.py index 0c5bc08391b2e..f3424feba04aa 100755 --- a/test/legacy_test/test_index_sample_op.py +++ b/test/legacy_test/test_index_sample_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_index_select_op.py b/test/legacy_test/test_index_select_op.py index 7902ff96a3ded..d95295e8419b9 100644 --- a/test/legacy_test/test_index_select_op.py +++ b/test/legacy_test/test_index_select_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_instance_norm_op.py b/test/legacy_test/test_instance_norm_op.py index 0ff8f863b5e64..292e1c9881629 100644 --- a/test/legacy_test/test_instance_norm_op.py +++ b/test/legacy_test/test_instance_norm_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np import parameterized as param +from op_test import OpTest import paddle from paddle import base, nn diff --git a/test/legacy_test/test_instance_norm_op_v2.py b/test/legacy_test/test_instance_norm_op_v2.py index c7d829a0845d6..9dafce621ff9f 100644 --- a/test/legacy_test/test_instance_norm_op_v2.py +++ b/test/legacy_test/test_instance_norm_op_v2.py @@ -14,9 +14,9 @@ import os import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_inverse_op.py b/test/legacy_test/test_inverse_op.py index 482ce0b31f350..8e578746226ac 100644 --- a/test/legacy_test/test_inverse_op.py +++ b/test/legacy_test/test_inverse_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_iou_similarity_op.py b/test/legacy_test/test_iou_similarity_op.py index 59c2f8bc6fcf2..974bd0b362ada 100644 --- a/test/legacy_test/test_iou_similarity_op.py +++ b/test/legacy_test/test_iou_similarity_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest from numpy import random +from op_test import OpTest class TestIOUSimilarityOp(OpTest): diff --git a/test/legacy_test/test_is_empty_op.py b/test/legacy_test/test_is_empty_op.py index eabf9d1a297d8..eb2e99d750eac 100644 --- a/test/legacy_test/test_is_empty_op.py +++ b/test/legacy_test/test_is_empty_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_isclose_op.py b/test/legacy_test/test_isclose_op.py index 006764fab8bfa..db7d8e6c49b54 100644 --- a/test/legacy_test/test_isclose_op.py +++ b/test/legacy_test/test_isclose_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_isfinite_op.py b/test/legacy_test/test_isfinite_op.py index 0b4d0e4954342..94e52ee9f2e96 100755 --- a/test/legacy_test/test_isfinite_op.py +++ b/test/legacy_test/test_isfinite_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 from paddle.base import core diff --git a/test/legacy_test/test_kldiv_loss_op.py b/test/legacy_test/test_kldiv_loss_op.py index ca3d08aca426d..ea93d0e4dd607 100644 --- a/test/legacy_test/test_kldiv_loss_op.py +++ b/test/legacy_test/test_kldiv_loss_op.py @@ -12,9 +12,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle from paddle.nn.functional import kl_div diff --git a/test/legacy_test/test_kron_op.py b/test/legacy_test/test_kron_op.py index 2d8c6d30e3842..be91861825a74 100644 --- a/test/legacy_test/test_kron_op.py +++ b/test/legacy_test/test_kron_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle import paddle.base.dygraph as dg diff --git a/test/legacy_test/test_kthvalue_op.py b/test/legacy_test/test_kthvalue_op.py index 7f1de918ccd20..d361e33e0dab7 100644 --- a/test/legacy_test/test_kthvalue_op.py +++ b/test/legacy_test/test_kthvalue_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_l1_norm_op.py b/test/legacy_test/test_l1_norm_op.py index 6d1866184ee62..7ca647da0a3b7 100644 --- a/test/legacy_test/test_l1_norm_op.py +++ b/test/legacy_test/test_l1_norm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestL1NormOp(OpTest): diff --git a/test/legacy_test/test_label_smooth_op.py b/test/legacy_test/test_label_smooth_op.py index ac4aa603aed0e..763cbd676c169 100644 --- a/test/legacy_test/test_label_smooth_op.py +++ b/test/legacy_test/test_label_smooth_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_lamb_op.py b/test/legacy_test/test_lamb_op.py index 08564db3e2e1d..225c9c690053f 100644 --- a/test/legacy_test/test_lamb_op.py +++ b/test/legacy_test/test_lamb_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np from op import Operator +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_layer_norm_op.py b/test/legacy_test/test_layer_norm_op.py index 785e4142af3e4..fafa9ed017e38 100644 --- a/test/legacy_test/test_layer_norm_op.py +++ b/test/legacy_test/test_layer_norm_op.py @@ -15,13 +15,9 @@ import unittest from functools import reduce from operator import mul -from test.legacy_test.op_test import ( - OpTest, - _set_use_system_allocator, - convert_float_to_uint16, -) import numpy as np +from op_test import OpTest, _set_use_system_allocator, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_lerp_op.py b/test/legacy_test/test_lerp_op.py index 4d4e9c706e24d..9fc3ada88a4e8 100644 --- a/test/legacy_test/test_lerp_op.py +++ b/test/legacy_test/test_lerp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_lgamma_op.py b/test/legacy_test/test_lgamma_op.py index eaabac71a2b0c..375f7e87a7c78 100644 --- a/test/legacy_test/test_lgamma_op.py +++ b/test/legacy_test/test_lgamma_op.py @@ -14,9 +14,9 @@ import math import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 from scipy import special import paddle diff --git a/test/legacy_test/test_linear_chain_crf_op.py b/test/legacy_test/test_linear_chain_crf_op.py index 064af1df856e6..6899a34063378 100755 --- a/test/legacy_test/test_linear_chain_crf_op.py +++ b/test/legacy_test/test_linear_chain_crf_op.py @@ -14,9 +14,9 @@ import random import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class LinearChainCrfForward: diff --git a/test/legacy_test/test_linear_interp_op.py b/test/legacy_test/test_linear_interp_op.py index f944a0cc28d98..c2854d99173ce 100755 --- a/test/legacy_test/test_linear_interp_op.py +++ b/test/legacy_test/test_linear_interp_op.py @@ -14,9 +14,9 @@ import platform import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_linear_interp_v2_op.py b/test/legacy_test/test_linear_interp_v2_op.py index ef6e07420abd4..acd7d0fed0919 100755 --- a/test/legacy_test/test_linear_interp_v2_op.py +++ b/test/legacy_test/test_linear_interp_v2_op.py @@ -14,13 +14,9 @@ import platform import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - paddle_static_guard, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_linspace.py b/test/legacy_test/test_linspace.py index 8f8df749252ac..d45463cd3d826 100644 --- a/test/legacy_test/test_linspace.py +++ b/test/legacy_test/test_linspace.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - paddle_static_guard, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_locality_aware_nms_op.py b/test/legacy_test/test_locality_aware_nms_op.py index aba3eba8c7df4..fd2e64e90c77f 100644 --- a/test/legacy_test/test_locality_aware_nms_op.py +++ b/test/legacy_test/test_locality_aware_nms_op.py @@ -14,9 +14,9 @@ import copy import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_multiclass_nms_op import iou diff --git a/test/legacy_test/test_lod_reset_op.py b/test/legacy_test/test_lod_reset_op.py index 85158eec68c94..28548b2eb22af 100644 --- a/test/legacy_test/test_lod_reset_op.py +++ b/test/legacy_test/test_lod_reset_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestLodResetOpByAttr(OpTest): diff --git a/test/legacy_test/test_log_loss_op.py b/test/legacy_test/test_log_loss_op.py index 3e2bd361da807..f96095482c199 100644 --- a/test/legacy_test/test_log_loss_op.py +++ b/test/legacy_test/test_log_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle.nn import functional as F diff --git a/test/legacy_test/test_log_softmax.py b/test/legacy_test/test_log_softmax.py index 0ee243ffe6e70..1c11d1096f0b4 100644 --- a/test/legacy_test/test_log_softmax.py +++ b/test/legacy_test/test_log_softmax.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_logcumsumexp_op.py b/test/legacy_test/test_logcumsumexp_op.py index 3dc5913c45ca3..373548f679b88 100644 --- a/test/legacy_test/test_logcumsumexp_op.py +++ b/test/legacy_test/test_logcumsumexp_op.py @@ -14,14 +14,10 @@ import itertools import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) from typing import Optional import numpy as np +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float import paddle from paddle import base diff --git a/test/legacy_test/test_logical_op.py b/test/legacy_test/test_logical_op.py index 067b352138aad..98e15878cdfb6 100755 --- a/test/legacy_test/test_logical_op.py +++ b/test/legacy_test/test_logical_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import convert_float_to_uint16 import numpy as np +from op_test import convert_float_to_uint16 import paddle from paddle.framework import in_dynamic_mode diff --git a/test/legacy_test/test_logit_op.py b/test/legacy_test/test_logit_op.py index 31b06dd8f2d40..b2f2e21af25ee 100644 --- a/test/legacy_test/test_logit_op.py +++ b/test/legacy_test/test_logit_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_logspace.py b/test/legacy_test/test_logspace.py index 11fcefacf4c67..9edd4aef71788 100644 --- a/test/legacy_test/test_logspace.py +++ b/test/legacy_test/test_logspace.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_logsumexp.py b/test/legacy_test/test_logsumexp.py index f2463e5e761a3..67cc953c5fdc5 100644 --- a/test/legacy_test/test_logsumexp.py +++ b/test/legacy_test/test_logsumexp.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_lookup_table_bf16_op.py b/test/legacy_test/test_lookup_table_bf16_op.py index a2abe8428c793..46cbfea6d0f6f 100644 --- a/test/legacy_test/test_lookup_table_bf16_op.py +++ b/test/legacy_test/test_lookup_table_bf16_op.py @@ -13,16 +13,16 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( + +import numpy as np +from op import Operator +from op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, skip_check_grad_ci, ) -import numpy as np -from op import Operator - import paddle from paddle import base, enable_static from paddle.base import core diff --git a/test/legacy_test/test_lookup_table_dequant_op.py b/test/legacy_test/test_lookup_table_dequant_op.py index 33fbf87016a23..19b7ca2597be5 100644 --- a/test/legacy_test/test_lookup_table_dequant_op.py +++ b/test/legacy_test/test_lookup_table_dequant_op.py @@ -14,9 +14,9 @@ import struct import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestLookupTableDequantOp(OpTest): diff --git a/test/legacy_test/test_lookup_table_op.py b/test/legacy_test/test_lookup_table_op.py index d64621cc1060e..b26dece197ebc 100644 --- a/test/legacy_test/test_lookup_table_op.py +++ b/test/legacy_test/test_lookup_table_op.py @@ -13,16 +13,16 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( + +import numpy as np +from op import Operator +from op_test import ( OpTest, check_out_dtype, paddle_static_guard, skip_check_grad_ci, ) -import numpy as np -from op import Operator - import paddle import paddle.nn.functional as F from paddle.base import Program, core, program_guard diff --git a/test/legacy_test/test_lookup_table_v2_bf16_op.py b/test/legacy_test/test_lookup_table_v2_bf16_op.py index c08423cc2fec6..04362fc7cffa0 100644 --- a/test/legacy_test/test_lookup_table_v2_bf16_op.py +++ b/test/legacy_test/test_lookup_table_v2_bf16_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import convert_uint16_to_float import numpy as np +from op_test import convert_uint16_to_float from test_lookup_table_bf16_op import ( TestLookupTableBF16Op, TestLookupTableBF16OpIds4D, diff --git a/test/legacy_test/test_lookup_table_v2_op.py b/test/legacy_test/test_lookup_table_v2_op.py index 03e3a63147539..0ac54e303b34b 100644 --- a/test/legacy_test/test_lookup_table_v2_op.py +++ b/test/legacy_test/test_lookup_table_v2_op.py @@ -13,14 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - skip_check_grad_ci, -) import numpy as np from op import Operator +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_lrn_op.py b/test/legacy_test/test_lrn_op.py index d957135c95078..34ceff298ec3d 100644 --- a/test/legacy_test/test_lrn_op.py +++ b/test/legacy_test/test_lrn_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_lstm_cudnn_op.py b/test/legacy_test/test_lstm_cudnn_op.py index df94f8f312115..2ac1457a59651 100644 --- a/test/legacy_test/test_lstm_cudnn_op.py +++ b/test/legacy_test/test_lstm_cudnn_op.py @@ -15,9 +15,9 @@ import math import random import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_lstm_op.py b/test/legacy_test/test_lstm_op.py index 1862871170ed6..a9b5c98f78daa 100644 --- a/test/legacy_test/test_lstm_op.py +++ b/test/legacy_test/test_lstm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest SIGMOID_THRESHOLD_MIN = -40.0 SIGMOID_THRESHOLD_MAX = 13.0 diff --git a/test/legacy_test/test_lstm_unit_op.py b/test/legacy_test/test_lstm_unit_op.py index f4821b01bdee6..8a1b2fc238b22 100644 --- a/test/legacy_test/test_lstm_unit_op.py +++ b/test/legacy_test/test_lstm_unit_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def sigmoid_np(x): diff --git a/test/legacy_test/test_lu_op.py b/test/legacy_test/test_lu_op.py index 8ca6232838c3e..7cd9244499290 100644 --- a/test/legacy_test/test_lu_op.py +++ b/test/legacy_test/test_lu_op.py @@ -15,11 +15,11 @@ import copy import itertools import unittest -from test.legacy_test.op_test import OpTest import numpy as np import scipy import scipy.linalg +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_lu_unpack_op.py b/test/legacy_test/test_lu_unpack_op.py index 6844adb6b21f1..ad5f809614c98 100644 --- a/test/legacy_test/test_lu_unpack_op.py +++ b/test/legacy_test/test_lu_unpack_op.py @@ -15,11 +15,11 @@ import copy import itertools import unittest -from test.legacy_test.op_test import OpTest import numpy as np import scipy import scipy.linalg +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_margin_cross_entropy_op.py b/test/legacy_test/test_margin_cross_entropy_op.py index f15a94fcad176..59d965456554c 100644 --- a/test/legacy_test/test_margin_cross_entropy_op.py +++ b/test/legacy_test/test_margin_cross_entropy_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - paddle_static_guard, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle.base import Program, core, program_guard diff --git a/test/legacy_test/test_margin_rank_loss_op.py b/test/legacy_test/test_margin_rank_loss_op.py index 5b34156160b34..a795bc23694b3 100644 --- a/test/legacy_test/test_margin_rank_loss_op.py +++ b/test/legacy_test/test_margin_rank_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_marker_op.py b/test/legacy_test/test_marker_op.py index dbf75832f1988..21895d962318f 100644 --- a/test/legacy_test/test_marker_op.py +++ b/test/legacy_test/test_marker_op.py @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest + +from op_test import OpTest from paddle.distributed.fleet.meta_optimizers.common import OpRole diff --git a/test/legacy_test/test_masked_select_op.py b/test/legacy_test/test_masked_select_op.py index 1c891d95e9156..954f3ffd1d9b6 100644 --- a/test/legacy_test/test_masked_select_op.py +++ b/test/legacy_test/test_masked_select_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_match_matrix_tensor_op.py b/test/legacy_test/test_match_matrix_tensor_op.py index edf296a5319a7..357a215caba69 100644 --- a/test/legacy_test/test_match_matrix_tensor_op.py +++ b/test/legacy_test/test_match_matrix_tensor_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestMatchMatrixTensorOp(OpTest): diff --git a/test/legacy_test/test_matmul_op.py b/test/legacy_test/test_matmul_op.py index 86c32b7d8b936..f907e7f7458bd 100644 --- a/test/legacy_test/test_matmul_op.py +++ b/test/legacy_test/test_matmul_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_matmul_op_with_head.py b/test/legacy_test/test_matmul_op_with_head.py index 763d05d3ad545..1c3cbe8d926c9 100644 --- a/test/legacy_test/test_matmul_op_with_head.py +++ b/test/legacy_test/test_matmul_op_with_head.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def generate_compatible_shapes_mul_head(dim_X, dim_Y, transpose_X, transpose_Y): diff --git a/test/legacy_test/test_matmul_v2_op.py b/test/legacy_test/test_matmul_v2_op.py index 632426deeb3ed..f867d4c959636 100644 --- a/test/legacy_test/test_matmul_v2_op.py +++ b/test/legacy_test/test_matmul_v2_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - get_numeric_gradient, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, get_numeric_gradient from testsuite import create_op import paddle diff --git a/test/legacy_test/test_matrix_nms_op.py b/test/legacy_test/test_matrix_nms_op.py index f188e1f39ed63..08d1ec20653c8 100644 --- a/test/legacy_test/test_matrix_nms_op.py +++ b/test/legacy_test/test_matrix_nms_op.py @@ -14,9 +14,9 @@ import copy import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base import Program, program_guard diff --git a/test/legacy_test/test_matrix_power_op.py b/test/legacy_test/test_matrix_power_op.py index acd5a0069195a..627f331cd1ceb 100644 --- a/test/legacy_test/test_matrix_power_op.py +++ b/test/legacy_test/test_matrix_power_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_matrix_rank_op.py b/test/legacy_test/test_matrix_rank_op.py index dc8735f6f21f6..f13d4e95dc0f7 100644 --- a/test/legacy_test/test_matrix_rank_op.py +++ b/test/legacy_test/test_matrix_rank_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_max_op.py b/test/legacy_test/test_max_op.py index 09a22513e39e2..cf924bb7f89eb 100644 --- a/test/legacy_test/test_max_op.py +++ b/test/legacy_test/test_max_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import check_out_dtype import numpy as np +from op_test import check_out_dtype from test_sum_op import TestReduceOPTensorAxisBase import paddle diff --git a/test/legacy_test/test_maxout_op.py b/test/legacy_test/test_maxout_op.py index 6dad462f9b95e..7f067ef62e058 100644 --- a/test/legacy_test/test_maxout_op.py +++ b/test/legacy_test/test_maxout_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_mean_iou.py b/test/legacy_test/test_mean_iou.py index bdaa41e5cdec0..f50a8beb010f9 100644 --- a/test/legacy_test/test_mean_iou.py +++ b/test/legacy_test/test_mean_iou.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def compute_mean_iou( diff --git a/test/legacy_test/test_mean_op.py b/test/legacy_test/test_mean_op.py index e211af71c99c5..b5da473062634 100644 --- a/test/legacy_test/test_mean_op.py +++ b/test/legacy_test/test_mean_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, OpTestTool, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope +from op_test import OpTest, OpTestTool, convert_float_to_uint16 from test_sum_op import TestReduceOPTensorAxisBase import paddle diff --git a/test/legacy_test/test_meshgrid_op.py b/test/legacy_test/test_meshgrid_op.py index 2a445ff3836ac..d8324612e78e4 100644 --- a/test/legacy_test/test_meshgrid_op.py +++ b/test/legacy_test/test_meshgrid_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_min_op.py b/test/legacy_test/test_min_op.py index 8115cfe2208bd..7de7108d7d1ad 100644 --- a/test/legacy_test/test_min_op.py +++ b/test/legacy_test/test_min_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import check_out_dtype import numpy as np +from op_test import check_out_dtype from test_sum_op import TestReduceOPTensorAxisBase import paddle diff --git a/test/legacy_test/test_mine_hard_examples_op.py b/test/legacy_test/test_mine_hard_examples_op.py index c33763d20e30e..f3f1ec4d76ad7 100644 --- a/test/legacy_test/test_mine_hard_examples_op.py +++ b/test/legacy_test/test_mine_hard_examples_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestMineHardExamplesOp(OpTest): diff --git a/test/legacy_test/test_minus_op.py b/test/legacy_test/test_minus_op.py index 10804d2ba2dd5..26d01a179ff46 100644 --- a/test/legacy_test/test_minus_op.py +++ b/test/legacy_test/test_minus_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_mode_op.py b/test/legacy_test/test_mode_op.py index 7d32b21670a3d..4f13158bb664d 100644 --- a/test/legacy_test/test_mode_op.py +++ b/test/legacy_test/test_mode_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float import paddle from paddle import base diff --git a/test/legacy_test/test_modified_huber_loss_op.py b/test/legacy_test/test_modified_huber_loss_op.py index 102ade8b823df..61eb0c3db25ef 100644 --- a/test/legacy_test/test_modified_huber_loss_op.py +++ b/test/legacy_test/test_modified_huber_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def modified_huber_loss_forward(val): diff --git a/test/legacy_test/test_momentum_op.py b/test/legacy_test/test_momentum_op.py index 9f63244a27756..6bc42d42a0c46 100644 --- a/test/legacy_test/test_momentum_op.py +++ b/test/legacy_test/test_momentum_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy import numpy as np from op import Operator +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_mul_op.py b/test/legacy_test/test_mul_op.py index 91bcc90efeca1..136e067baae3d 100644 --- a/test/legacy_test/test_mul_op.py +++ b/test/legacy_test/test_mul_op.py @@ -20,7 +20,7 @@ from paddle.base import core sys.path.append("..") -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 +from op_test import OpTest, convert_float_to_uint16 class TestMulOp(OpTest): diff --git a/test/legacy_test/test_multi_dot_op.py b/test/legacy_test/test_multi_dot_op.py index 789faf162a6f4..c18ee94fb01e6 100644 --- a/test/legacy_test/test_multi_dot_op.py +++ b/test/legacy_test/test_multi_dot_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np from numpy.linalg import multi_dot +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_multiclass_nms_op.py b/test/legacy_test/test_multiclass_nms_op.py index 36242bc3738c0..7262bf88f7a1a 100644 --- a/test/legacy_test/test_multiclass_nms_op.py +++ b/test/legacy_test/test_multiclass_nms_op.py @@ -14,9 +14,9 @@ import copy import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import _C_ops diff --git a/test/legacy_test/test_multinomial_op.py b/test/legacy_test/test_multinomial_op.py index 1d3c6aa360b26..2b9ae85ef318f 100644 --- a/test/legacy_test/test_multinomial_op.py +++ b/test/legacy_test/test_multinomial_op.py @@ -14,9 +14,9 @@ import os import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 from test_attribute_var import UnittestBase import paddle diff --git a/test/legacy_test/test_multiplex_op.py b/test/legacy_test/test_multiplex_op.py index acc1ab9ee07ce..97fa02c00f826 100644 --- a/test/legacy_test/test_multiplex_op.py +++ b/test/legacy_test/test_multiplex_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_mv_op.py b/test/legacy_test/test_mv_op.py index d228db8b9c52b..d687d0513cc08 100644 --- a/test/legacy_test/test_mv_op.py +++ b/test/legacy_test/test_mv_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.static import Program, program_guard diff --git a/test/legacy_test/test_nanmedian.py b/test/legacy_test/test_nanmedian.py index 1f212ca4f276e..6cf8d7316f615 100644 --- a/test/legacy_test/test_nanmedian.py +++ b/test/legacy_test/test_nanmedian.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_nce.py b/test/legacy_test/test_nce.py index 645b6007909fb..5593abf4deb56 100644 --- a/test/legacy_test/test_nce.py +++ b/test/legacy_test/test_nce.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_nearest_interp_op.py b/test/legacy_test/test_nearest_interp_op.py index e474e19c6ffcb..3b09cab3eacee 100755 --- a/test/legacy_test/test_nearest_interp_op.py +++ b/test/legacy_test/test_nearest_interp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_nearest_interp_v2_op.py b/test/legacy_test/test_nearest_interp_v2_op.py index 4e818134e7e5d..109943a7ec1be 100755 --- a/test/legacy_test/test_nearest_interp_v2_op.py +++ b/test/legacy_test/test_nearest_interp_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_nextafter_op.py b/test/legacy_test/test_nextafter_op.py index 81c557dc55d11..7b6c6039820de 100644 --- a/test/legacy_test/test_nextafter_op.py +++ b/test/legacy_test/test_nextafter_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_nll_loss.py b/test/legacy_test/test_nll_loss.py index 6c1f738818132..1703a13e4f8ed 100644 --- a/test/legacy_test/test_nll_loss.py +++ b/test/legacy_test/test_nll_loss.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_nms_op.py b/test/legacy_test/test_nms_op.py index fb61a1673b75c..68715db80d578 100755 --- a/test/legacy_test/test_nms_op.py +++ b/test/legacy_test/test_nms_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_nn_functional_hot_op.py b/test/legacy_test/test_nn_functional_hot_op.py index e013835bf69c7..1144c3062272a 100644 --- a/test/legacy_test/test_nn_functional_hot_op.py +++ b/test/legacy_test/test_nn_functional_hot_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_nonzero_api.py b/test/legacy_test/test_nonzero_api.py index 37a6b3a245529..a57e1d9803c22 100644 --- a/test/legacy_test/test_nonzero_api.py +++ b/test/legacy_test/test_nonzero_api.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_norm_all.py b/test/legacy_test/test_norm_all.py index 8d2429885d43d..58be677975742 100644 --- a/test/legacy_test/test_norm_all.py +++ b/test/legacy_test/test_norm_all.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import _C_ops, base diff --git a/test/legacy_test/test_norm_op.py b/test/legacy_test/test_norm_op.py index 40873c4d775cb..1f00d19601dfc 100644 --- a/test/legacy_test/test_norm_op.py +++ b/test/legacy_test/test_norm_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - skip_check_grad_ci, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_number_count_op.py b/test/legacy_test/test_number_count_op.py index 2ea8b8358c2b7..70c02e9e82348 100644 --- a/test/legacy_test/test_number_count_op.py +++ b/test/legacy_test/test_number_count_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test import op_test import numpy as np +import op_test import paddle from paddle.base import core diff --git a/test/legacy_test/test_numel_op.py b/test/legacy_test/test_numel_op.py index 3dab1601e198d..1f5642b95bfdb 100644 --- a/test/legacy_test/test_numel_op.py +++ b/test/legacy_test/test_numel_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_one_hot_v2_op.py b/test/legacy_test/test_one_hot_v2_op.py index a7e557785344f..40423dcb20f89 100644 --- a/test/legacy_test/test_one_hot_v2_op.py +++ b/test/legacy_test/test_one_hot_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_overlap_add_op.py b/test/legacy_test/test_overlap_add_op.py index 74cf12145143c..82c902dfdcaf5 100644 --- a/test/legacy_test/test_overlap_add_op.py +++ b/test/legacy_test/test_overlap_add_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_pad2d_op.py b/test/legacy_test/test_pad2d_op.py index dcae3313c3815..8c1545ec718bc 100644 --- a/test/legacy_test/test_pad2d_op.py +++ b/test/legacy_test/test_pad2d_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestPad2dOp(OpTest): diff --git a/test/legacy_test/test_pad3d_op.py b/test/legacy_test/test_pad3d_op.py index 4339ac9e753bc..a2fed2b033d85 100644 --- a/test/legacy_test/test_pad3d_op.py +++ b/test/legacy_test/test_pad3d_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_pad_constant_like.py b/test/legacy_test/test_pad_constant_like.py index 4375902329432..e304bdf29e4c2 100644 --- a/test/legacy_test/test_pad_constant_like.py +++ b/test/legacy_test/test_pad_constant_like.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestPadConstantLikeOp(OpTest): diff --git a/test/legacy_test/test_pad_op.py b/test/legacy_test/test_pad_op.py index 219be3ef1fe7e..2b920b7b9b43c 100644 --- a/test/legacy_test/test_pad_op.py +++ b/test/legacy_test/test_pad_op.py @@ -14,9 +14,9 @@ import os import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 from test_attribute_var import UnittestBase import paddle diff --git a/test/legacy_test/test_partial_concat_op.py b/test/legacy_test/test_partial_concat_op.py index 34679a13cdcf0..61a201970402a 100644 --- a/test/legacy_test/test_partial_concat_op.py +++ b/test/legacy_test/test_partial_concat_op.py @@ -14,9 +14,9 @@ import random import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def np_partial_concat(inputs, start, length): diff --git a/test/legacy_test/test_partial_sum_op.py b/test/legacy_test/test_partial_sum_op.py index 8d359696be650..86c952008c851 100644 --- a/test/legacy_test/test_partial_sum_op.py +++ b/test/legacy_test/test_partial_sum_op.py @@ -14,9 +14,9 @@ import random import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestPartialSumOp(OpTest): diff --git a/test/legacy_test/test_pixel_shuffle_op.py b/test/legacy_test/test_pixel_shuffle_op.py index 23a3a98c7d0dc..6d7cdab848623 100644 --- a/test/legacy_test/test_pixel_shuffle_op.py +++ b/test/legacy_test/test_pixel_shuffle_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_pixel_unshuffle.py b/test/legacy_test/test_pixel_unshuffle.py index 1aa38e1896af1..ec6ce803d1277 100644 --- a/test/legacy_test/test_pixel_unshuffle.py +++ b/test/legacy_test/test_pixel_unshuffle.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_poisson_op.py b/test/legacy_test/test_poisson_op.py index 8f54ca751f1eb..a60bd0c43a1cd 100644 --- a/test/legacy_test/test_poisson_op.py +++ b/test/legacy_test/test_poisson_op.py @@ -14,13 +14,9 @@ import math import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float import paddle from paddle.base import core diff --git a/test/legacy_test/test_polygamma_op.py b/test/legacy_test/test_polygamma_op.py index f1dd4ac794e27..9c9b0416ba4f2 100644 --- a/test/legacy_test/test_polygamma_op.py +++ b/test/legacy_test/test_polygamma_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from scipy import special import paddle diff --git a/test/legacy_test/test_polygon_box_transform.py b/test/legacy_test/test_polygon_box_transform.py index 686fe78e956e3..6e3f19927d5cc 100644 --- a/test/legacy_test/test_polygon_box_transform.py +++ b/test/legacy_test/test_polygon_box_transform.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def PolygonBoxRestore(input): diff --git a/test/legacy_test/test_pool2d_op.py b/test/legacy_test/test_pool2d_op.py index c4ddce3022b5f..1ea560e211f23 100644 --- a/test/legacy_test/test_pool2d_op.py +++ b/test/legacy_test/test_pool2d_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_pool3d_op.py b/test/legacy_test/test_pool3d_op.py index 6df9df61f3bf1..350d62098befa 100644 --- a/test/legacy_test/test_pool3d_op.py +++ b/test/legacy_test/test_pool3d_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_pool_max_op.py b/test/legacy_test/test_pool_max_op.py index dc9907c95601a..23740d39b8ef3 100644 --- a/test/legacy_test/test_pool_max_op.py +++ b/test/legacy_test/test_pool_max_op.py @@ -13,14 +13,14 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( + +import numpy as np +from op_test import ( OpTest, convert_float_to_uint16, convert_uint16_to_float, get_numeric_gradient, ) - -import numpy as np from testsuite import create_op import paddle diff --git a/test/legacy_test/test_positive_negative_pair_op.py b/test/legacy_test/test_positive_negative_pair_op.py index cf89ba2c8ae55..cf3440f365cd7 100644 --- a/test/legacy_test/test_positive_negative_pair_op.py +++ b/test/legacy_test/test_positive_negative_pair_op.py @@ -14,9 +14,9 @@ import itertools import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def py_pnpair_op(score, label, query, column=-1, weight=None): diff --git a/test/legacy_test/test_precision_recall_op.py b/test/legacy_test/test_precision_recall_op.py index 9342e5433d1e4..97f3d7e7724a4 100644 --- a/test/legacy_test/test_precision_recall_op.py +++ b/test/legacy_test/test_precision_recall_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def calc_precision(tp_count, fp_count): diff --git a/test/legacy_test/test_prelu_op.py b/test/legacy_test/test_prelu_op.py index 7ca8e414b029f..c287daec3b959 100644 --- a/test/legacy_test/test_prelu_op.py +++ b/test/legacy_test/test_prelu_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - skip_check_grad_ci, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_prior_box_op.py b/test/legacy_test/test_prior_box_op.py index 9f414b42b3378..733219b326a12 100644 --- a/test/legacy_test/test_prior_box_op.py +++ b/test/legacy_test/test_prior_box_op.py @@ -14,9 +14,9 @@ import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_proximal_adagrad_op.py b/test/legacy_test/test_proximal_adagrad_op.py index 319a1eb024f22..45d25d3a21350 100644 --- a/test/legacy_test/test_proximal_adagrad_op.py +++ b/test/legacy_test/test_proximal_adagrad_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestProximalAdagradOp(OpTest): diff --git a/test/legacy_test/test_proximal_gd_op.py b/test/legacy_test/test_proximal_gd_op.py index e400d3fc4941a..d55c1ffcc2d8d 100644 --- a/test/legacy_test/test_proximal_gd_op.py +++ b/test/legacy_test/test_proximal_gd_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestProximalGDOp(OpTest): diff --git a/test/legacy_test/test_psroi_pool_op.py b/test/legacy_test/test_psroi_pool_op.py index 9cef63ae6c710..24b6acbe25954 100644 --- a/test/legacy_test/test_psroi_pool_op.py +++ b/test/legacy_test/test_psroi_pool_op.py @@ -14,9 +14,9 @@ import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_put_along_axis_op.py b/test/legacy_test/test_put_along_axis_op.py index 3fb39c8e650e2..b8027137069ed 100644 --- a/test/legacy_test/test_put_along_axis_op.py +++ b/test/legacy_test/test_put_along_axis_op.py @@ -14,9 +14,9 @@ import copy import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.framework import core diff --git a/test/legacy_test/test_qr_op.py b/test/legacy_test/test_qr_op.py index 12fe15c9c1587..0e9f0df29fcc7 100644 --- a/test/legacy_test/test_qr_op.py +++ b/test/legacy_test/test_qr_op.py @@ -14,9 +14,9 @@ import itertools import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_randint_op.py b/test/legacy_test/test_randint_op.py index ba84e56aa7a52..e6bdff627face 100644 --- a/test/legacy_test/test_randint_op.py +++ b/test/legacy_test/test_randint_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_random_crop_op.py b/test/legacy_test/test_random_crop_op.py index b8b499b311e7c..08355378207c1 100644 --- a/test/legacy_test/test_random_crop_op.py +++ b/test/legacy_test/test_random_crop_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestRandomCropOp(OpTest): diff --git a/test/legacy_test/test_randperm_op.py b/test/legacy_test/test_randperm_op.py index 74cb29e632998..0a5bed32f6dee 100644 --- a/test/legacy_test/test_randperm_op.py +++ b/test/legacy_test/test_randperm_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float import paddle from paddle.base import core diff --git a/test/legacy_test/test_range.py b/test/legacy_test/test_range.py index 9b762571e16e0..b23de8726c80c 100644 --- a/test/legacy_test/test_range.py +++ b/test/legacy_test/test_range.py @@ -14,9 +14,9 @@ import unittest from functools import partial -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_rank_attention_op.py b/test/legacy_test/test_rank_attention_op.py index c67a997ff06ef..514463b0cbae4 100644 --- a/test/legacy_test/test_rank_attention_op.py +++ b/test/legacy_test/test_rank_attention_op.py @@ -14,9 +14,9 @@ import random import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_rank_loss_op.py b/test/legacy_test/test_rank_loss_op.py index 18575888662f5..e246310ddaaca 100644 --- a/test/legacy_test/test_rank_loss_op.py +++ b/test/legacy_test/test_rank_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestRankLossOp(OpTest): diff --git a/test/legacy_test/test_real_imag_op.py b/test/legacy_test/test_real_imag_op.py index facdbdad8a59a..f714cef69e6d4 100644 --- a/test/legacy_test/test_real_imag_op.py +++ b/test/legacy_test/test_real_imag_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base, static diff --git a/test/legacy_test/test_reduce_op.py b/test/legacy_test/test_reduce_op.py index a37748e3e25e4..319520a40dde3 100644 --- a/test/legacy_test/test_reduce_op.py +++ b/test/legacy_test/test_reduce_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - skip_check_grad_ci, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_repeat_interleave_op.py b/test/legacy_test/test_repeat_interleave_op.py index 6148f147ca336..ec6649039dd45 100644 --- a/test/legacy_test/test_repeat_interleave_op.py +++ b/test/legacy_test/test_repeat_interleave_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_reshape_op.py b/test/legacy_test/test_reshape_op.py index 5b204bd97100d..89308899ca03d 100755 --- a/test/legacy_test/test_reshape_op.py +++ b/test/legacy_test/test_reshape_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_retinanet_detection_output.py b/test/legacy_test/test_retinanet_detection_output.py index cad14f7742c85..a120dfd50eefc 100644 --- a/test/legacy_test/test_retinanet_detection_output.py +++ b/test/legacy_test/test_retinanet_detection_output.py @@ -14,9 +14,9 @@ import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_anchor_generator_op import anchor_generator_in_python from test_multiclass_nms_op import nms diff --git a/test/legacy_test/test_reverse_op.py b/test/legacy_test/test_reverse_op.py index 6183f81f5da33..ded51a261721e 100644 --- a/test/legacy_test/test_reverse_op.py +++ b/test/legacy_test/test_reverse_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_rnn_op.py b/test/legacy_test/test_rnn_op.py index 00bb7dd5aaf2e..4eb2d8332d9ec 100644 --- a/test/legacy_test/test_rnn_op.py +++ b/test/legacy_test/test_rnn_op.py @@ -15,9 +15,9 @@ import random import sys import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_roi_align_op.py b/test/legacy_test/test_roi_align_op.py index dea797b0326ba..f23542239b6fc 100644 --- a/test/legacy_test/test_roi_align_op.py +++ b/test/legacy_test/test_roi_align_op.py @@ -14,9 +14,9 @@ import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_roi_pool_op.py b/test/legacy_test/test_roi_pool_op.py index 209fff66511a3..4b5fec6203916 100644 --- a/test/legacy_test/test_roi_pool_op.py +++ b/test/legacy_test/test_roi_pool_op.py @@ -16,9 +16,9 @@ import sys import unittest from decimal import ROUND_HALF_UP, Decimal -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_roll_op.py b/test/legacy_test/test_roll_op.py index 3abe28f1d3474..dd88ab6e5c423 100644 --- a/test/legacy_test/test_roll_op.py +++ b/test/legacy_test/test_roll_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_row_conv_op.py b/test/legacy_test/test_row_conv_op.py index 20ee0495b9497..a3928521a9bed 100644 --- a/test/legacy_test/test_row_conv_op.py +++ b/test/legacy_test/test_row_conv_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_rpn_target_assign_op.py b/test/legacy_test/test_rpn_target_assign_op.py index eb153ea1dfd52..d0147d8b700f1 100644 --- a/test/legacy_test/test_rpn_target_assign_op.py +++ b/test/legacy_test/test_rpn_target_assign_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_anchor_generator_op import anchor_generator_in_python from test_generate_proposal_labels_op import ( _bbox_overlaps, diff --git a/test/legacy_test/test_rrelu_op.py b/test/legacy_test/test_rrelu_op.py index b8346fb0b40c6..e3b5e073d719a 100644 --- a/test/legacy_test/test_rrelu_op.py +++ b/test/legacy_test/test_rrelu_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_sample_logits_op.py b/test/legacy_test/test_sample_logits_op.py index 020009eba328d..4f29b62ae1744 100644 --- a/test/legacy_test/test_sample_logits_op.py +++ b/test/legacy_test/test_sample_logits_op.py @@ -14,9 +14,9 @@ import collections import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestSampleLogitsOp(OpTest): diff --git a/test/legacy_test/test_scale_op.py b/test/legacy_test/test_scale_op.py index c53ba113e4e6a..8621090aa1ea0 100644 --- a/test/legacy_test/test_scale_op.py +++ b/test/legacy_test/test_scale_op.py @@ -13,12 +13,12 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope from op import Operator +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_scatter_nd_op.py b/test/legacy_test/test_scatter_nd_op.py index 8c93a38b050e8..d9bd7365d4d0d 100644 --- a/test/legacy_test/test_scatter_nd_op.py +++ b/test/legacy_test/test_scatter_nd_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_scatter_op.py b/test/legacy_test/test_scatter_op.py index 18effea8f87e3..d0cd04903956a 100644 --- a/test/legacy_test/test_scatter_op.py +++ b/test/legacy_test/test_scatter_op.py @@ -14,9 +14,9 @@ import os import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_searchsorted_op.py b/test/legacy_test/test_searchsorted_op.py index fb346401ba65f..c3537fc4a47f4 100644 --- a/test/legacy_test/test_searchsorted_op.py +++ b/test/legacy_test/test_searchsorted_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_seed_op.py b/test/legacy_test/test_seed_op.py index 4ddc673ca81d6..a15b8099a5cf3 100644 --- a/test/legacy_test/test_seed_op.py +++ b/test/legacy_test/test_seed_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import static diff --git a/test/legacy_test/test_segment_ops.py b/test/legacy_test/test_segment_ops.py index d7340093e1cff..81c6b5845a03f 100644 --- a/test/legacy_test/test_segment_ops.py +++ b/test/legacy_test/test_segment_ops.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_selu_op.py b/test/legacy_test/test_selu_op.py index 72badf52d9267..52162111b85d8 100644 --- a/test/legacy_test/test_selu_op.py +++ b/test/legacy_test/test_selu_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_set_value_op.py b/test/legacy_test/test_set_value_op.py index 9a4af4a6a7c4d..65c9f69765d11 100644 --- a/test/legacy_test/test_set_value_op.py +++ b/test/legacy_test/test_set_value_op.py @@ -16,9 +16,9 @@ import unittest from functools import reduce -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_sgd_op.py b/test/legacy_test/test_sgd_op.py index 75d86389cbd0f..a69039baa2634 100644 --- a/test/legacy_test/test_sgd_op.py +++ b/test/legacy_test/test_sgd_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np from op import Operator +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_sgd_op_bf16.py b/test/legacy_test/test_sgd_op_bf16.py index d5ba61234186e..e7d0497fd7876 100644 --- a/test/legacy_test/test_sgd_op_bf16.py +++ b/test/legacy_test/test_sgd_op_bf16.py @@ -14,16 +14,16 @@ import struct import unittest -from test.legacy_test.op_test import ( + +import numpy as np +from op import Operator +from op_test import ( OpTest, OpTestTool, convert_float_to_uint16, convert_uint16_to_float, ) -import numpy as np -from op import Operator - import paddle from paddle import base from paddle.base import core diff --git a/test/legacy_test/test_shape_op.py b/test/legacy_test/test_shape_op.py index 924a92abddb55..f71df9cd3e8af 100644 --- a/test/legacy_test/test_shape_op.py +++ b/test/legacy_test/test_shape_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np from op import Operator +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_shard_index_op.py b/test/legacy_test/test_shard_index_op.py index 5980090f6dae4..ee49304adbbe8 100644 --- a/test/legacy_test/test_shard_index_op.py +++ b/test/legacy_test/test_shard_index_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_share_data_op.py b/test/legacy_test/test_share_data_op.py index f6b501b42689e..5a8d0e6178889 100644 --- a/test/legacy_test/test_share_data_op.py +++ b/test/legacy_test/test_share_data_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np from op import Operator +from op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_shuffle_batch_op.py b/test/legacy_test/test_shuffle_batch_op.py index ae3c9b3c55a26..f57728fe6fd7b 100644 --- a/test/legacy_test/test_shuffle_batch_op.py +++ b/test/legacy_test/test_shuffle_batch_op.py @@ -15,9 +15,9 @@ import os import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle import base diff --git a/test/legacy_test/test_shuffle_channel_op.py b/test/legacy_test/test_shuffle_channel_op.py index 632ca86f0177b..a93d830f98906 100644 --- a/test/legacy_test/test_shuffle_channel_op.py +++ b/test/legacy_test/test_shuffle_channel_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestShuffleChannelOp(OpTest): diff --git a/test/legacy_test/test_sigmoid_cross_entropy_with_logits_op.py b/test/legacy_test/test_sigmoid_cross_entropy_with_logits_op.py index c448fadcadc25..9bb0d805fba8e 100644 --- a/test/legacy_test/test_sigmoid_cross_entropy_with_logits_op.py +++ b/test/legacy_test/test_sigmoid_cross_entropy_with_logits_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from scipy.special import expit, logit import paddle diff --git a/test/legacy_test/test_sigmoid_focal_loss_op.py b/test/legacy_test/test_sigmoid_focal_loss_op.py index 4aa39227208e2..efe1922165fb4 100644 --- a/test/legacy_test/test_sigmoid_focal_loss_op.py +++ b/test/legacy_test/test_sigmoid_focal_loss_op.py @@ -15,9 +15,9 @@ import copy import math import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_sign_op.py b/test/legacy_test/test_sign_op.py index bece86efdd5b8..80dcc6909bfb7 100644 --- a/test/legacy_test/test_sign_op.py +++ b/test/legacy_test/test_sign_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_similarity_focus_op.py b/test/legacy_test/test_similarity_focus_op.py index d49a0de4b27d0..1227a48949341 100755 --- a/test/legacy_test/test_similarity_focus_op.py +++ b/test/legacy_test/test_similarity_focus_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestSimilarityFocusOp(OpTest): diff --git a/test/legacy_test/test_simple_rnn_op.py b/test/legacy_test/test_simple_rnn_op.py index b3660e50c9414..9d51758be1400 100644 --- a/test/legacy_test/test_simple_rnn_op.py +++ b/test/legacy_test/test_simple_rnn_op.py @@ -15,9 +15,9 @@ import random import sys import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle.base import core diff --git a/test/legacy_test/test_size_op.py b/test/legacy_test/test_size_op.py index 93dce8644e05b..6ad5f00741ed8 100644 --- a/test/legacy_test/test_size_op.py +++ b/test/legacy_test/test_size_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_slice_op.py b/test/legacy_test/test_slice_op.py index 7aeb97069123d..10a5ad1950c5b 100644 --- a/test/legacy_test/test_slice_op.py +++ b/test/legacy_test/test_slice_op.py @@ -13,15 +13,11 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - paddle_static_guard, -) import gradient_checker import numpy as np from decorator_helper import prog_scope +from op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_smooth_l1_loss_op.py b/test/legacy_test/test_smooth_l1_loss_op.py index 47334912ad359..fb3fd40c0a823 100644 --- a/test/legacy_test/test_smooth_l1_loss_op.py +++ b/test/legacy_test/test_smooth_l1_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def smooth_l1_loss_forward(val, sigma2): diff --git a/test/legacy_test/test_softmax_mask_fuse_op.py b/test/legacy_test/test_softmax_mask_fuse_op.py index acfa04458ae32..495876a850588 100644 --- a/test/legacy_test/test_softmax_mask_fuse_op.py +++ b/test/legacy_test/test_softmax_mask_fuse_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base, incubate diff --git a/test/legacy_test/test_softmax_mask_fuse_upper_triangle_op.py b/test/legacy_test/test_softmax_mask_fuse_upper_triangle_op.py index 559bd54843648..bd6a098690628 100644 --- a/test/legacy_test/test_softmax_mask_fuse_upper_triangle_op.py +++ b/test/legacy_test/test_softmax_mask_fuse_upper_triangle_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base, incubate diff --git a/test/legacy_test/test_softmax_op.py b/test/legacy_test/test_softmax_op.py index 86930409d51c8..33b6a104c21e4 100644 --- a/test/legacy_test/test_softmax_op.py +++ b/test/legacy_test/test_softmax_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_softmax_with_cross_entropy_op.py b/test/legacy_test/test_softmax_with_cross_entropy_op.py index cb4284b27a382..0515c7c78e9d7 100644 --- a/test/legacy_test/test_softmax_with_cross_entropy_op.py +++ b/test/legacy_test/test_softmax_with_cross_entropy_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard from test_softmax_op import stable_softmax import paddle diff --git a/test/legacy_test/test_solve_op.py b/test/legacy_test/test_solve_op.py index 5a8e6ba3f1a35..1d15da4019e65 100644 --- a/test/legacy_test/test_solve_op.py +++ b/test/legacy_test/test_solve_op.py @@ -21,7 +21,7 @@ from paddle.base import core sys.path.append("..") -from test.legacy_test.op_test import OpTest +from op_test import OpTest from paddle import base from paddle.base import Program, program_guard diff --git a/test/legacy_test/test_space_to_depth_op.py b/test/legacy_test/test_space_to_depth_op.py index 91adb3b64ef12..c7cd6cae179db 100644 --- a/test/legacy_test/test_space_to_depth_op.py +++ b/test/legacy_test/test_space_to_depth_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle import base diff --git a/test/legacy_test/test_sparse_attention_op.py b/test/legacy_test/test_sparse_attention_op.py index 73ffb15b3b0b6..48946522864aa 100644 --- a/test/legacy_test/test_sparse_attention_op.py +++ b/test/legacy_test/test_sparse_attention_op.py @@ -16,9 +16,9 @@ import os import re import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_sparse_momentum_op.py b/test/legacy_test/test_sparse_momentum_op.py index c924ee98a662e..4b3ea1d8d089c 100644 --- a/test/legacy_test/test_sparse_momentum_op.py +++ b/test/legacy_test/test_sparse_momentum_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def calculate_sparse_momentum_by_numpy( diff --git a/test/legacy_test/test_spectral_norm_op.py b/test/legacy_test/test_spectral_norm_op.py index 5d303be8fbbe3..912965f94755e 100644 --- a/test/legacy_test/test_spectral_norm_op.py +++ b/test/legacy_test/test_spectral_norm_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np +from op_test import OpTest, skip_check_grad_ci import paddle from paddle import _C_ops diff --git a/test/legacy_test/test_split_op.py b/test/legacy_test/test_split_op.py index 9a4beef7bc854..584ca0d6b2863 100644 --- a/test/legacy_test/test_split_op.py +++ b/test/legacy_test/test_split_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_spp_op.py b/test/legacy_test/test_spp_op.py index 69533e1401333..fbf3440352590 100644 --- a/test/legacy_test/test_spp_op.py +++ b/test/legacy_test/test_spp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_pool2d_op import avg_pool2D_forward_naive, max_pool2D_forward_naive diff --git a/test/legacy_test/test_squared_l2_distance_op.py b/test/legacy_test/test_squared_l2_distance_op.py index 0e880aeb99e15..579681ab0c098 100644 --- a/test/legacy_test/test_squared_l2_distance_op.py +++ b/test/legacy_test/test_squared_l2_distance_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest class TestSquaredL2DistanceOp_f0(OpTest): diff --git a/test/legacy_test/test_squared_l2_norm_op.py b/test/legacy_test/test_squared_l2_norm_op.py index 33e44fd746395..75a7a18e44d15 100755 --- a/test/legacy_test/test_squared_l2_norm_op.py +++ b/test/legacy_test/test_squared_l2_norm_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np from numpy import linalg as LA +from op_test import OpTest import paddle from paddle import _C_ops, _legacy_C_ops diff --git a/test/legacy_test/test_squeeze2_op.py b/test/legacy_test/test_squeeze2_op.py index f1c1ea8345658..b4723b415cccb 100755 --- a/test/legacy_test/test_squeeze2_op.py +++ b/test/legacy_test/test_squeeze2_op.py @@ -14,9 +14,9 @@ import os import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 from test_attribute_var import UnittestBase import paddle diff --git a/test/legacy_test/test_squeeze_op.py b/test/legacy_test/test_squeeze_op.py index 59b00d02a2c30..294a86db6dd04 100755 --- a/test/legacy_test/test_squeeze_op.py +++ b/test/legacy_test/test_squeeze_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_stack_op.py b/test/legacy_test/test_stack_op.py index ece8511b74b91..288b3f75fc214 100644 --- a/test/legacy_test/test_stack_op.py +++ b/test/legacy_test/test_stack_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_stft_op.py b/test/legacy_test/test_stft_op.py index bc82d99e16b31..665714f3e939e 100644 --- a/test/legacy_test/test_stft_op.py +++ b/test/legacy_test/test_stft_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np from numpy.lib.stride_tricks import as_strided +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_strided_slice_op.py b/test/legacy_test/test_strided_slice_op.py index 22445cd8a178d..c23eb18bc5647 100644 --- a/test/legacy_test/test_strided_slice_op.py +++ b/test/legacy_test/test_strided_slice_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_sum_op.py b/test/legacy_test/test_sum_op.py index 3eb37c07f075c..0738f52f2ba7d 100644 --- a/test/legacy_test/test_sum_op.py +++ b/test/legacy_test/test_sum_op.py @@ -16,16 +16,12 @@ import tempfile import unittest import warnings -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) import gradient_checker import numpy as np from decorator_helper import prog_scope from op import Operator +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float import paddle import paddle.inference as paddle_infer diff --git a/test/legacy_test/test_svd_op.py b/test/legacy_test/test_svd_op.py index c96bf5e3f1ddb..e74bd74fb5b4a 100644 --- a/test/legacy_test/test_svd_op.py +++ b/test/legacy_test/test_svd_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np +from op_test import OpTest, skip_check_grad_ci import paddle from paddle import base diff --git a/test/legacy_test/test_sync_batch_norm_op.py b/test/legacy_test/test_sync_batch_norm_op.py index 2248512d2d0ee..68cb93c31d91e 100644 --- a/test/legacy_test/test_sync_batch_norm_op.py +++ b/test/legacy_test/test_sync_batch_norm_op.py @@ -23,14 +23,10 @@ import tempfile import unittest from shlex import quote -from test.legacy_test.op_test import ( - OpTest, - _set_use_system_allocator, - convert_float_to_uint16, -) import numpy as np from decorator_helper import prog_scope +from op_test import OpTest, _set_use_system_allocator, convert_float_to_uint16 import paddle from paddle import base, nn diff --git a/test/legacy_test/test_take_along_axis_op.py b/test/legacy_test/test_take_along_axis_op.py index d2f9b3ede7793..b86bb0222ec7e 100644 --- a/test/legacy_test/test_take_along_axis_op.py +++ b/test/legacy_test/test_take_along_axis_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.framework import core diff --git a/test/legacy_test/test_target_assign_op.py b/test/legacy_test/test_target_assign_op.py index 4b932f01ae096..98369d62247df 100644 --- a/test/legacy_test/test_target_assign_op.py +++ b/test/legacy_test/test_target_assign_op.py @@ -14,9 +14,9 @@ import random import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def gen_match_and_neg_indices(num_prior, gt_lod, neg_lod): diff --git a/test/legacy_test/test_tdm_child_op.py b/test/legacy_test/test_tdm_child_op.py index 79ac6560f7b6f..b1c100a2a789f 100644 --- a/test/legacy_test/test_tdm_child_op.py +++ b/test/legacy_test/test_tdm_child_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_tdm_sampler_op.py b/test/legacy_test/test_tdm_sampler_op.py index 3a8fcddfead5f..e56496d9aa97b 100644 --- a/test/legacy_test/test_tdm_sampler_op.py +++ b/test/legacy_test/test_tdm_sampler_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_teacher_student_sigmoid_loss_op.py b/test/legacy_test/test_teacher_student_sigmoid_loss_op.py index aa5714f9bafa8..984a47831064e 100644 --- a/test/legacy_test/test_teacher_student_sigmoid_loss_op.py +++ b/test/legacy_test/test_teacher_student_sigmoid_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. from math import exp, log -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from scipy.special import logit diff --git a/test/legacy_test/test_temporal_shift_op.py b/test/legacy_test/test_temporal_shift_op.py index befa28e7b08c2..4d18daaf8f8fe 100644 --- a/test/legacy_test/test_temporal_shift_op.py +++ b/test/legacy_test/test_temporal_shift_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_tile_op.py b/test/legacy_test/test_tile_op.py index 1aaa7232d06de..6e0cea75b0c3c 100644 --- a/test/legacy_test/test_tile_op.py +++ b/test/legacy_test/test_tile_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_top_k_op.py b/test/legacy_test/test_top_k_op.py index 8978cfc41cf1b..5e5257e6cd229 100644 --- a/test/legacy_test/test_top_k_op.py +++ b/test/legacy_test/test_top_k_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_top_k_v2_op.py b/test/legacy_test/test_top_k_v2_op.py index 7597ef45c32e1..9ff5d03473afc 100644 --- a/test/legacy_test/test_top_k_v2_op.py +++ b/test/legacy_test/test_top_k_v2_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float import paddle from paddle.base import core diff --git a/test/legacy_test/test_trace_op.py b/test/legacy_test/test_trace_op.py index a894cf288f4f0..1d53c1180b836 100644 --- a/test/legacy_test/test_trace_op.py +++ b/test/legacy_test/test_trace_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base, tensor diff --git a/test/legacy_test/test_trans_layout_op.py b/test/legacy_test/test_trans_layout_op.py index 1f13df9791af1..da59301aacfc3 100644 --- a/test/legacy_test/test_trans_layout_op.py +++ b/test/legacy_test/test_trans_layout_op.py @@ -16,9 +16,9 @@ import os import tempfile import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_transfer_dtype_op.py b/test/legacy_test/test_transfer_dtype_op.py index 360d1114c807b..485efa5beecdf 100644 --- a/test/legacy_test/test_transfer_dtype_op.py +++ b/test/legacy_test/test_transfer_dtype_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - convert_uint16_to_float, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, convert_uint16_to_float import paddle from paddle.base import core diff --git a/test/legacy_test/test_transfer_layout_op.py b/test/legacy_test/test_transfer_layout_op.py index 4b1a091d8f35c..e09b73e904ead 100644 --- a/test/legacy_test/test_transfer_layout_op.py +++ b/test/legacy_test/test_transfer_layout_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_transpose_op.py b/test/legacy_test/test_transpose_op.py index 713620ff72411..5c4b4d6d16c8e 100644 --- a/test/legacy_test/test_transpose_op.py +++ b/test/legacy_test/test_transpose_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_tree_conv_op.py b/test/legacy_test/test_tree_conv_op.py index 19f46e0a14e6c..e05ee1a4d4cdf 100644 --- a/test/legacy_test/test_tree_conv_op.py +++ b/test/legacy_test/test_tree_conv_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest def collect_node_patch(og, max_depth): diff --git a/test/legacy_test/test_triangular_solve_op.py b/test/legacy_test/test_triangular_solve_op.py index c47b13a453055..abdc9d6fe1bd6 100644 --- a/test/legacy_test/test_triangular_solve_op.py +++ b/test/legacy_test/test_triangular_solve_op.py @@ -18,7 +18,7 @@ import numpy as np sys.path.append("..") -from test.legacy_test.op_test import OpTest +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_tril_indices_op.py b/test/legacy_test/test_tril_indices_op.py index ab890e25e206b..9cef30a02519f 100644 --- a/test/legacy_test/test_tril_indices_op.py +++ b/test/legacy_test/test_tril_indices_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_tril_triu_op.py b/test/legacy_test/test_tril_triu_op.py index f8f1b34c88151..fee9b6f95023a 100644 --- a/test/legacy_test/test_tril_triu_op.py +++ b/test/legacy_test/test_tril_triu_op.py @@ -12,9 +12,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base, tensor diff --git a/test/legacy_test/test_trilinear_interp_op.py b/test/legacy_test/test_trilinear_interp_op.py index 7efe53878114f..d83c1987e700c 100755 --- a/test/legacy_test/test_trilinear_interp_op.py +++ b/test/legacy_test/test_trilinear_interp_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from paddle.base import core diff --git a/test/legacy_test/test_trilinear_interp_v2_op.py b/test/legacy_test/test_trilinear_interp_v2_op.py index 60fca3c5150ec..d81b04ebdb181 100755 --- a/test/legacy_test/test_trilinear_interp_v2_op.py +++ b/test/legacy_test/test_trilinear_interp_v2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_triu_indices_op.py b/test/legacy_test/test_triu_indices_op.py index acfe3bf6ea6d5..37f02f64ee3f9 100644 --- a/test/legacy_test/test_triu_indices_op.py +++ b/test/legacy_test/test_triu_indices_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_trunc_op.py b/test/legacy_test/test_trunc_op.py index 10cc0def4f620..e67c0d94b78bc 100644 --- a/test/legacy_test/test_trunc_op.py +++ b/test/legacy_test/test_trunc_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle.base import core diff --git a/test/legacy_test/test_unbind_op.py b/test/legacy_test/test_unbind_op.py index 87e9c73dd7b21..bb04894d76b75 100644 --- a/test/legacy_test/test_unbind_op.py +++ b/test/legacy_test/test_unbind_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base, tensor diff --git a/test/legacy_test/test_unfold_op.py b/test/legacy_test/test_unfold_op.py index 079d28038c948..8a7f2aaf199f3 100644 --- a/test/legacy_test/test_unfold_op.py +++ b/test/legacy_test/test_unfold_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_uniform_random_bf16_op.py b/test/legacy_test/test_uniform_random_bf16_op.py index ba2a443e76afb..1c32b30bf6899 100644 --- a/test/legacy_test/test_uniform_random_bf16_op.py +++ b/test/legacy_test/test_uniform_random_bf16_op.py @@ -13,10 +13,10 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_uint16_to_float import numpy as np from op import Operator +from op_test import OpTest, convert_uint16_to_float from test_uniform_random_op import output_hist, output_hist_diag import paddle diff --git a/test/legacy_test/test_uniform_random_inplace_op.py b/test/legacy_test/test_uniform_random_inplace_op.py index cee9d243cfbf1..9e9e904e3e12d 100644 --- a/test/legacy_test/test_uniform_random_inplace_op.py +++ b/test/legacy_test/test_uniform_random_inplace_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_uint16_to_float import numpy as np +from op_test import OpTest, convert_uint16_to_float import paddle from paddle import base diff --git a/test/legacy_test/test_uniform_random_op.py b/test/legacy_test/test_uniform_random_op.py index 4f280a286ba9a..eca41e655f9a3 100644 --- a/test/legacy_test/test_uniform_random_op.py +++ b/test/legacy_test/test_uniform_random_op.py @@ -14,10 +14,10 @@ import os import unittest -from test.legacy_test.op_test import OpTest, convert_uint16_to_float import numpy as np from op import Operator +from op_test import OpTest, convert_uint16_to_float from test_attribute_var import UnittestBase import paddle diff --git a/test/legacy_test/test_unique.py b/test/legacy_test/test_unique.py index e9b05ab9da488..8fe9dfa9af635 100644 --- a/test/legacy_test/test_unique.py +++ b/test/legacy_test/test_unique.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - paddle_static_guard, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle.base import core diff --git a/test/legacy_test/test_unique_consecutive_op.py b/test/legacy_test/test_unique_consecutive_op.py index 1af4171a80680..36fd33490d18c 100644 --- a/test/legacy_test/test_unique_consecutive_op.py +++ b/test/legacy_test/test_unique_consecutive_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_unique_with_counts.py b/test/legacy_test/test_unique_with_counts.py index 90c41834975d2..4cc2879bfab7a 100644 --- a/test/legacy_test/test_unique_with_counts.py +++ b/test/legacy_test/test_unique_with_counts.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, paddle_static_guard import numpy as np +from op_test import OpTest, paddle_static_guard import paddle from paddle.base import core diff --git a/test/legacy_test/test_unpool3d_op.py b/test/legacy_test/test_unpool3d_op.py index fd235da6de4ce..eca6b989dbdbc 100644 --- a/test/legacy_test/test_unpool3d_op.py +++ b/test/legacy_test/test_unpool3d_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle import paddle.nn.functional as F diff --git a/test/legacy_test/test_unpool_op.py b/test/legacy_test/test_unpool_op.py index 8baa72c1ab1fe..2d76b32cde4b6 100644 --- a/test/legacy_test/test_unpool_op.py +++ b/test/legacy_test/test_unpool_op.py @@ -14,9 +14,9 @@ import os import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_attribute_var import UnittestBase import paddle diff --git a/test/legacy_test/test_unsqueeze2_op.py b/test/legacy_test/test_unsqueeze2_op.py index 3410429a0c647..3f7c43ef10a16 100755 --- a/test/legacy_test/test_unsqueeze2_op.py +++ b/test/legacy_test/test_unsqueeze2_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_unsqueeze_op.py b/test/legacy_test/test_unsqueeze_op.py index c26ea7cd46fe7..39aec97e23ecd 100755 --- a/test/legacy_test/test_unsqueeze_op.py +++ b/test/legacy_test/test_unsqueeze_op.py @@ -13,11 +13,11 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import gradient_checker import numpy as np from decorator_helper import prog_scope +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_unstack_op.py b/test/legacy_test/test_unstack_op.py index 0269f1b9dfda3..4bc980025fe33 100755 --- a/test/legacy_test/test_unstack_op.py +++ b/test/legacy_test/test_unstack_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_update_loss_scaling_op.py b/test/legacy_test/test_update_loss_scaling_op.py index b130125a4a344..e05bfa540d08d 100644 --- a/test/legacy_test/test_update_loss_scaling_op.py +++ b/test/legacy_test/test_update_loss_scaling_op.py @@ -13,13 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import ( - OpTest, - convert_float_to_uint16, - paddle_static_guard, -) import numpy as np +from op_test import OpTest, convert_float_to_uint16, paddle_static_guard import paddle from paddle import base diff --git a/test/legacy_test/test_var_conv_2d.py b/test/legacy_test/test_var_conv_2d.py index 66ba78ccc94fe..cb799784a7d6d 100644 --- a/test/legacy_test/test_var_conv_2d.py +++ b/test/legacy_test/test_var_conv_2d.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, skip_check_grad_ci import numpy as np +from op_test import OpTest, skip_check_grad_ci class TestVarConv2DOp(OpTest): diff --git a/test/legacy_test/test_viterbi_decode_op.py b/test/legacy_test/test_viterbi_decode_op.py index d2a0d89bf8b5a..f5b9c3677a7f4 100644 --- a/test/legacy_test/test_viterbi_decode_op.py +++ b/test/legacy_test/test_viterbi_decode_op.py @@ -9,9 +9,9 @@ # See the License for the specific language governing permissions and # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import base diff --git a/test/legacy_test/test_warpctc_op.py b/test/legacy_test/test_warpctc_op.py index 423edd33a8b36..cb60214bbc6d0 100644 --- a/test/legacy_test/test_warpctc_op.py +++ b/test/legacy_test/test_warpctc_op.py @@ -14,9 +14,9 @@ import sys import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from test_softmax_op import stable_softmax import paddle diff --git a/test/legacy_test/test_warprnnt_op.py b/test/legacy_test/test_warprnnt_op.py index 00b279c1680d7..ced735b4310ab 100644 --- a/test/legacy_test/test_warprnnt_op.py +++ b/test/legacy_test/test_warprnnt_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle from paddle import _C_ops diff --git a/test/legacy_test/test_where_op.py b/test/legacy_test/test_where_op.py index 5158a5240e91f..2c508ee0c556f 100644 --- a/test/legacy_test/test_where_op.py +++ b/test/legacy_test/test_where_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest, convert_float_to_uint16 import numpy as np +from op_test import OpTest, convert_float_to_uint16 import paddle from paddle import base diff --git a/test/legacy_test/test_yolo_box_op.py b/test/legacy_test/test_yolo_box_op.py index 0ccd176c69501..2059571ac4478 100644 --- a/test/legacy_test/test_yolo_box_op.py +++ b/test/legacy_test/test_yolo_box_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest import paddle diff --git a/test/legacy_test/test_yolov3_loss_op.py b/test/legacy_test/test_yolov3_loss_op.py index c7760090c9bbd..9eaf5e5579524 100644 --- a/test/legacy_test/test_yolov3_loss_op.py +++ b/test/legacy_test/test_yolov3_loss_op.py @@ -13,9 +13,9 @@ # limitations under the License. import unittest -from test.legacy_test.op_test import OpTest import numpy as np +from op_test import OpTest from scipy.special import expit, logit import paddle From a863b3773e17032fee3d647be2fb489d13b0a30e Mon Sep 17 00:00:00 2001 From: chenzhiyang <1792266893@qq.com> Date: Thu, 14 Sep 2023 08:27:38 +0000 Subject: [PATCH 3/4] rsqrt new ir op_test passed (4/4) --- python/paddle/tensor/ops.py | 4 ++-- test/legacy_test/test_activation_op.py | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/python/paddle/tensor/ops.py b/python/paddle/tensor/ops.py index 3585c48b0afff..aa2e1b493aaf5 100644 --- a/python/paddle/tensor/ops.py +++ b/python/paddle/tensor/ops.py @@ -17,7 +17,7 @@ from .. import _C_ops from ..base.data_feeder import check_variable_and_dtype -from ..framework import LayerHelper, in_dynamic_mode +from ..framework import LayerHelper, in_dynamic_mode, in_dynamic_or_new_ir_mode from .layer_function_generator import ( add_sample_code, generate_activation_fn, @@ -878,7 +878,7 @@ def rsqrt(x, name=None): Tensor(shape=[4], dtype=float32, place=Place(cpu), stop_gradient=True, [3.16227770, 2.23606801, 1.82574177, 1.58113885]) """ - if in_dynamic_mode(): + if in_dynamic_or_new_ir_mode(): return _C_ops.rsqrt(x) else: check_variable_and_dtype( diff --git a/test/legacy_test/test_activation_op.py b/test/legacy_test/test_activation_op.py index 295e1dfd9a8e8..8909c568eaf70 100644 --- a/test/legacy_test/test_activation_op.py +++ b/test/legacy_test/test_activation_op.py @@ -1578,7 +1578,7 @@ def if_enable_cinn(self): pass def test_check_output(self): - self.check_output(check_prim=True) + self.check_output(check_prim=True, check_new_ir=True) def test_check_grad(self): if self.dtype == np.float16: @@ -1588,6 +1588,7 @@ def test_check_grad(self): 'Out', max_relative_error=0.0005, check_prim=True, + check_new_ir=True, ) @@ -4507,7 +4508,9 @@ def test_check_grad(self): TestLeakyReluAlpha3, check_prim=True, enable_cinn=True ) create_test_act_fp16_class(TestLeakyRelu_ZeroDim, check_prim=True) -create_test_act_fp16_class(TestRsqrt, check_prim=True, enable_cinn=True) +create_test_act_fp16_class( + TestRsqrt, check_prim=True, enable_cinn=True, check_new_ir=True +) def create_test_act_bf16_class( @@ -4629,7 +4632,7 @@ def test_check_grad(self): create_test_act_bf16_class(TestLeakyReluAlpha2, check_prim=True) create_test_act_bf16_class(TestLeakyReluAlpha3, check_prim=True) create_test_act_bf16_class(TestLeakyRelu_ZeroDim, check_prim=True) -create_test_act_bf16_class(TestRsqrt, check_prim=True) +create_test_act_bf16_class(TestRsqrt, check_prim=True, check_new_ir=True) if __name__ == "__main__": unittest.main() From dd6c84216d82f048c9b2cb3f80db950cf4be913b Mon Sep 17 00:00:00 2001 From: chenzhiyang <1792266893@qq.com> Date: Thu, 14 Sep 2023 11:03:00 +0000 Subject: [PATCH 4/4] fix rename bug --- python/paddle/tensor/ops.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/tensor/ops.py b/python/paddle/tensor/ops.py index aa2e1b493aaf5..18771c147b76a 100644 --- a/python/paddle/tensor/ops.py +++ b/python/paddle/tensor/ops.py @@ -17,7 +17,7 @@ from .. import _C_ops from ..base.data_feeder import check_variable_and_dtype -from ..framework import LayerHelper, in_dynamic_mode, in_dynamic_or_new_ir_mode +from ..framework import LayerHelper, in_dynamic_mode, in_dynamic_or_pir_mode from .layer_function_generator import ( add_sample_code, generate_activation_fn, @@ -878,7 +878,7 @@ def rsqrt(x, name=None): Tensor(shape=[4], dtype=float32, place=Place(cpu), stop_gradient=True, [3.16227770, 2.23606801, 1.82574177, 1.58113885]) """ - if in_dynamic_or_new_ir_mode(): + if in_dynamic_or_pir_mode(): return _C_ops.rsqrt(x) else: check_variable_and_dtype(