From 1765d5d1cbebfa4b12bbe434f22c9838fb78da90 Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Mon, 17 Apr 2023 20:27:48 +0800 Subject: [PATCH] mv ps distributed dir (#52885) * mv ps distributed dir * fix * add del auto_parallel * add auto_parallel * fix ps * fix bug * fix test bug * fix test bug * merge develop fix error * merge develop fix error * merge develop fix error --- python/paddle/fluid/tests/unittests/CMakeLists.txt | 4 ---- test/CMakeLists.txt | 12 +++++++----- .../unittests => test}/auto_parallel/CMakeLists.txt | 0 .../unittests => test}/auto_parallel/amp_o2_pass.py | 0 .../auto_parallel/amp_pass_unittest.py | 0 .../auto_parallel/auto_parallel_relaunch_model.py | 0 .../auto_parallel_relaunch_with_gpt_planner.py | 0 .../auto_parallel_relaunch_with_planner.py | 0 .../auto_parallel/clip_grad_by_global_norm.py | 0 .../unittests => test}/auto_parallel/converter.py | 0 .../unittests => test}/auto_parallel/engine_api.py | 0 .../auto_parallel/engine_api_dp.py | 0 .../generation_pipeline_pass_unittest.py | 0 .../auto_parallel/get_gpt_model.py | 2 +- .../auto_parallel/gradient_merge_pass_unittest.py | 0 .../auto_parallel/high_order_grad.py | 0 .../auto_parallel/iterable_dataset.py | 0 .../tests/unittests => test}/auto_parallel/launch.py | 0 .../auto_parallel/optimization_tuner_api.py | 0 .../auto_parallel/quantization_pass_unittest.py | 0 .../auto_parallel/random_control_unittest.py | 0 .../auto_parallel/recompute_pass_unittest.py | 0 .../auto_parallel/sharding_newexe.py | 0 .../auto_parallel/sharding_pass_unittest.py | 0 .../auto_parallel/test_align_tool.py | 0 .../auto_parallel/test_amp_o2_pass.py | 0 .../auto_parallel/test_auto_parallel_relaunch.py | 0 .../auto_parallel/test_base_cost.py | 0 .../unittests => test}/auto_parallel/test_cluster.py | 0 .../auto_parallel/test_cluster_partition.py | 0 .../auto_parallel/test_cluster_v2.py | 0 .../auto_parallel/test_comm_cost.py | 0 .../auto_parallel/test_comp_cost.py | 0 .../auto_parallel/test_conditional_block_reshard.py | 0 .../auto_parallel/test_convert_to_process_meshes.py | 0 .../auto_parallel/test_converter.py | 0 .../auto_parallel/test_dist_assign.py | 0 .../auto_parallel/test_dist_attr_v2.py | 0 .../auto_parallel/test_dist_context.py | 0 .../auto_parallel/test_dist_embedding.py | 0 .../auto_parallel/test_dist_matmul.py | 0 .../auto_parallel/test_dist_op_cost.py | 0 .../auto_parallel/test_dist_pnorm.py | 0 .../auto_parallel/test_dist_reshape.py | 0 .../auto_parallel/test_dist_saver.py | 0 .../auto_parallel/test_dist_scale.py | 0 .../auto_parallel/test_dist_shape.py | 0 .../auto_parallel/test_dist_slice.py | 0 .../auto_parallel/test_dist_split.py | 0 .../auto_parallel/test_engine_api.py | 0 .../auto_parallel/test_engine_api_dp.py | 0 .../auto_parallel/test_engine_api_error.py | 0 .../auto_parallel/test_engine_callbacks.py | 0 .../auto_parallel/test_engine_save_load.py | 0 .../auto_parallel/test_fp16_assign.py | 0 .../auto_parallel/test_fuse_adamw_pass.py | 0 .../auto_parallel/test_fused_linear_pass.py | 2 +- .../auto_parallel/test_group_operators.py | 2 +- .../auto_parallel/test_high_order_grad.py | 0 .../auto_parallel/test_interface.py | 0 .../auto_parallel/test_iterable_dataset.py | 0 .../auto_parallel/test_lr_grad_clip.py | 0 .../auto_parallel/test_new_cost_model.py | 0 .../auto_parallel/test_optimization_tuner_api.py | 0 .../auto_parallel/test_parallel_tuner.py | 2 +- .../auto_parallel/test_parallel_tuner_full.py | 2 +- .../auto_parallel/test_parallel_tuner_predict.py | 2 +- .../auto_parallel/test_pass_amp.py | 0 .../auto_parallel/test_pass_base_list.py | 2 +- .../auto_parallel/test_pass_bf16.py | 0 .../auto_parallel/test_pass_generation_pipeline.py | 0 .../auto_parallel/test_pass_grad_clip.py | 0 .../auto_parallel/test_pass_gradient_merge.py | 0 .../auto_parallel/test_pass_quantization.py | 0 .../auto_parallel/test_pass_recompute.py | 0 .../auto_parallel/test_pass_sharding.py | 0 .../unittests => test}/auto_parallel/test_pattern.py | 2 +- .../auto_parallel/test_pattern_match.py | 2 +- .../auto_parallel/test_prim_dist_op.py | 0 .../auto_parallel/test_process_mesh.py | 0 .../auto_parallel/test_process_mesh_v2.py | 0 .../auto_parallel/test_random_ctrl.py | 0 .../auto_parallel/test_recorder.py | 0 .../auto_parallel/test_relaunch_with_gpt_planner.py | 0 .../auto_parallel/test_relaunch_with_planner.py | 0 .../auto_parallel/test_rule_based_tuner.py | 2 +- .../auto_parallel/test_rule_based_tuner_o2.py | 0 .../auto_parallel/test_selective_recompute.py | 0 .../auto_parallel/test_serialization.py | 0 .../auto_parallel/test_sharding_with_newexe.py | 0 .../auto_parallel/test_strategy.py | 0 .../auto_parallel/test_to_static.py | 0 .../auto_parallel/test_topology.py | 0 .../unittests => test}/auto_parallel/test_trial.py | 0 .../auto_parallel/test_tunable_space.py | 0 .../auto_parallel/test_tunable_variable.py | 0 .../auto_parallel/test_tuning_recompute.py | 0 .../auto_parallel/test_while_op_completion.py | 0 .../auto_parallel/test_while_op_partition.py | 0 .../distributed_passes/CMakeLists.txt | 0 .../auto_parallel_pass_test_base.py | 0 .../check_pass_conflict_example.py | 0 .../distributed_passes/dist_pass_test_base.py | 0 .../unittests => test}/distributed_passes/launch.py | 0 .../distributed_passes/model_zoo.py | 0 .../distributed_passes/pass_run_main.py | 0 .../distributed_passes/ps_pass_test_base.py | 2 +- .../test_auto_parallel_amp_pass.py | 3 +++ ..._auto_parallel_data_parallel_optimization_pass.py | 2 ++ .../test_auto_parallel_fp16_pass.py | 3 +++ .../test_auto_parallel_gradient_merge_pass.py | 3 +++ .../test_auto_parallel_recompute_pass.py | 3 +++ .../test_auto_parallel_sharding_pass.py | 2 ++ .../test_build_cinn_pass_resnet.py | 0 .../test_build_cinn_pass_simple_net.py | 0 .../distributed_passes/test_dist_fuse_adam_pass.py | 0 .../test_dist_fuse_all_reduce_pass.py | 0 .../distributed_passes/test_dist_fuse_bn_act_pass.py | 0 .../test_dist_fuse_bn_add_act_pass.py | 0 .../test_dist_fuse_gemm_epilogue_pass.py | 0 .../test_dist_fuse_momentum_pass.py | 0 .../test_dist_fuse_relu_depthwise_conv_pass.py | 0 .../distributed_passes/test_dist_fuse_sgd_pass.py | 0 .../test_dist_inplace_addto_pass.py | 0 .../distributed_passes/test_ps_server_pass.py | 0 .../distributed_passes/test_ps_trainer_pass.py | 0 .../distributed_passes/test_white_lists.py | 0 .../unittests => test}/distribution/CMakeLists.txt | 0 .../tests/unittests => test}/distribution/config.py | 0 .../unittests => test}/distribution/mock_data.py | 0 .../unittests => test}/distribution/parameterize.py | 0 .../distribution/test_dirichlet_op.py | 2 +- .../distribution/test_distribution.py | 0 .../distribution/test_distribution_bernoulli.py | 0 .../test_distribution_bernoulli_static.py | 0 .../distribution/test_distribution_beta.py | 0 .../distribution/test_distribution_beta_static.py | 0 .../distribution/test_distribution_categorical.py | 0 .../distribution/test_distribution_constraint.py | 0 .../distribution/test_distribution_dirichlet.py | 0 .../test_distribution_dirichlet_static.py | 0 .../distribution/test_distribution_expfamily.py | 0 .../test_distribution_expfamily_static.py | 0 .../distribution/test_distribution_gumbel.py | 0 .../distribution/test_distribution_gumbel_static.py | 0 .../distribution/test_distribution_independent.py | 0 .../test_distribution_independent_static.py | 0 .../distribution/test_distribution_laplace.py | 0 .../distribution/test_distribution_laplace_static.py | 0 .../distribution/test_distribution_lognormal.py | 0 .../test_distribution_lognormal_static.py | 0 .../distribution/test_distribution_multinomial.py | 0 .../test_distribution_multinomial_static.py | 0 .../distribution/test_distribution_normal.py | 0 .../distribution/test_distribution_transform.py | 0 .../test_distribution_transform_static.py | 0 .../test_distribution_transformed_distribution.py | 0 ...t_distribution_transformed_distribution_static.py | 0 .../distribution/test_distribution_uniform.py | 0 .../distribution/test_distribution_variable.py | 0 .../tests/unittests => test}/distribution/test_kl.py | 0 .../distribution/test_kl_static.py | 0 .../legacy_test}/auto_parallel_gpt_model.py | 0 .../fluid/tests/unittests => test}/ps/CMakeLists.txt | 0 .../fluid/tests/unittests => test}/ps/__init__.py | 0 .../tests/unittests => test}/ps/config_gpubox.yaml | 0 .../unittests => test}/ps/cpu_async_ps_config.yaml | 0 .../unittests => test}/ps/cpu_geo_ps_config.yaml | 0 .../unittests => test}/ps/cpu_sync_ps_config.yaml | 0 .../unittests => test}/ps/dataset_generator_A.py | 0 .../unittests => test}/ps/dataset_generator_B.py | 0 .../ps/dataset_generator_criteo.py | 0 .../unittests => test}/ps/download_criteo_data.sh | 0 .../tests/unittests => test}/ps/download_data.sh | 0 .../unittests => test}/ps/fl_async_ps_config.yaml | 0 .../tests/unittests => test}/ps/fl_ps_trainer.py | 0 .../tests/unittests => test}/ps/gpu_ps_config.yaml | 0 .../fluid/tests/unittests => test}/ps/gpubox_run.sh | 0 .../tests/unittests => test}/ps/heter_ps_config.yaml | 0 .../tests/unittests => test/ps}/ps_dnn_model.py | 0 .../tests/unittests => test}/ps/ps_dnn_trainer.py | 4 +--- .../unittests => test}/ps/static_gpubox_trainer.py | 0 .../fluid/tests/unittests => test}/ps/test_fl_ps.py | 6 +++--- .../tests/unittests => test}/ps/test_gpubox_ps.py | 0 .../tests/unittests => test}/ps/test_the_one_ps.py | 8 ++++---- 185 files changed, 43 insertions(+), 31 deletions(-) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/CMakeLists.txt (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/amp_o2_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/amp_pass_unittest.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/auto_parallel_relaunch_model.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/auto_parallel_relaunch_with_gpt_planner.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/auto_parallel_relaunch_with_planner.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/clip_grad_by_global_norm.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/converter.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/engine_api.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/engine_api_dp.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/generation_pipeline_pass_unittest.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/get_gpt_model.py (99%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/gradient_merge_pass_unittest.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/high_order_grad.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/iterable_dataset.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/launch.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/optimization_tuner_api.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/quantization_pass_unittest.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/random_control_unittest.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/recompute_pass_unittest.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/sharding_newexe.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/sharding_pass_unittest.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_align_tool.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_amp_o2_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_auto_parallel_relaunch.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_base_cost.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_cluster.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_cluster_partition.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_cluster_v2.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_comm_cost.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_comp_cost.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_conditional_block_reshard.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_convert_to_process_meshes.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_converter.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_dist_assign.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_dist_attr_v2.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_dist_context.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_dist_embedding.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_dist_matmul.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_dist_op_cost.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_dist_pnorm.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_dist_reshape.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_dist_saver.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_dist_scale.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_dist_shape.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_dist_slice.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_dist_split.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_engine_api.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_engine_api_dp.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_engine_api_error.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_engine_callbacks.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_engine_save_load.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_fp16_assign.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_fuse_adamw_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_fused_linear_pass.py (98%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_group_operators.py (99%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_high_order_grad.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_interface.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_iterable_dataset.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_lr_grad_clip.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_new_cost_model.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_optimization_tuner_api.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_parallel_tuner.py (99%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_parallel_tuner_full.py (99%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_parallel_tuner_predict.py (99%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_pass_amp.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_pass_base_list.py (98%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_pass_bf16.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_pass_generation_pipeline.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_pass_grad_clip.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_pass_gradient_merge.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_pass_quantization.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_pass_recompute.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_pass_sharding.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_pattern.py (99%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_pattern_match.py (99%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_prim_dist_op.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_process_mesh.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_process_mesh_v2.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_random_ctrl.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_recorder.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_relaunch_with_gpt_planner.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_relaunch_with_planner.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_rule_based_tuner.py (99%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_rule_based_tuner_o2.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_selective_recompute.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_serialization.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_sharding_with_newexe.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_strategy.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_to_static.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_topology.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_trial.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_tunable_space.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_tunable_variable.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_tuning_recompute.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_while_op_completion.py (100%) rename {python/paddle/fluid/tests/unittests => test}/auto_parallel/test_while_op_partition.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/CMakeLists.txt (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/auto_parallel_pass_test_base.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/check_pass_conflict_example.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/dist_pass_test_base.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/launch.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/model_zoo.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/pass_run_main.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/ps_pass_test_base.py (97%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_auto_parallel_amp_pass.py (97%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_auto_parallel_data_parallel_optimization_pass.py (99%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_auto_parallel_fp16_pass.py (97%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_auto_parallel_gradient_merge_pass.py (99%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_auto_parallel_recompute_pass.py (97%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_auto_parallel_sharding_pass.py (98%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_build_cinn_pass_resnet.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_build_cinn_pass_simple_net.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_dist_fuse_adam_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_dist_fuse_all_reduce_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_dist_fuse_bn_act_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_dist_fuse_bn_add_act_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_dist_fuse_gemm_epilogue_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_dist_fuse_momentum_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_dist_fuse_relu_depthwise_conv_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_dist_fuse_sgd_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_dist_inplace_addto_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_ps_server_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_ps_trainer_pass.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distributed_passes/test_white_lists.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/CMakeLists.txt (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/config.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/mock_data.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/parameterize.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_dirichlet_op.py (98%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_bernoulli.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_bernoulli_static.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_beta.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_beta_static.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_categorical.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_constraint.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_dirichlet.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_dirichlet_static.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_expfamily.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_expfamily_static.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_gumbel.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_gumbel_static.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_independent.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_independent_static.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_laplace.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_laplace_static.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_lognormal.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_lognormal_static.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_multinomial.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_multinomial_static.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_normal.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_transform.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_transform_static.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_transformed_distribution.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_transformed_distribution_static.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_uniform.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_distribution_variable.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_kl.py (100%) rename {python/paddle/fluid/tests/unittests => test}/distribution/test_kl_static.py (100%) rename {python/paddle/fluid/tests/unittests => test/legacy_test}/auto_parallel_gpt_model.py (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/CMakeLists.txt (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/__init__.py (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/config_gpubox.yaml (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/cpu_async_ps_config.yaml (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/cpu_geo_ps_config.yaml (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/cpu_sync_ps_config.yaml (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/dataset_generator_A.py (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/dataset_generator_B.py (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/dataset_generator_criteo.py (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/download_criteo_data.sh (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/download_data.sh (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/fl_async_ps_config.yaml (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/fl_ps_trainer.py (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/gpu_ps_config.yaml (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/gpubox_run.sh (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/heter_ps_config.yaml (100%) rename {python/paddle/fluid/tests/unittests => test/ps}/ps_dnn_model.py (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/ps_dnn_trainer.py (99%) rename {python/paddle/fluid/tests/unittests => test}/ps/static_gpubox_trainer.py (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/test_fl_ps.py (93%) rename {python/paddle/fluid/tests/unittests => test}/ps/test_gpubox_ps.py (100%) rename {python/paddle/fluid/tests/unittests => test}/ps/test_the_one_ps.py (96%) diff --git a/python/paddle/fluid/tests/unittests/CMakeLists.txt b/python/paddle/fluid/tests/unittests/CMakeLists.txt index 57da05652eb..39739b742ac 100755 --- a/python/paddle/fluid/tests/unittests/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/CMakeLists.txt @@ -560,9 +560,6 @@ set_tests_properties(test_norm_nn_grad PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE") set_tests_properties(test_nn_grad PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE") if(WITH_DISTRIBUTE) - add_subdirectory(distributed_passes) - add_subdirectory(ps) - add_subdirectory(auto_parallel) add_subdirectory(collective) # FIXME(typhoonzero): add these tests back @@ -769,7 +766,6 @@ if(NOT WIN32) endif() add_subdirectory(sequence) -add_subdirectory(distribution) # dist xpu tests: if(WITH_XPU_BKCL) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ae98ef60835..7a5bfae6e20 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -93,10 +93,8 @@ endfunction() if(WITH_TESTING) add_subdirectory(amp) add_subdirectory(asp) - # add_subdirectory(auto_parallel) add_subdirectory(autograd) add_subdirectory(book) - add_subdirectory(collective) # add_subdirectory(composite_ops) add_subdirectory(contrib) add_subdirectory(cpp) @@ -104,8 +102,13 @@ if(WITH_TESTING) add_subdirectory(custom_op) add_subdirectory(custom_runtime) add_subdirectory(dataset) - # add_subdirectory(distributed_passes) - # add_subdirectory(distribution) + if(WITH_DISTRIBUTE) + add_subdirectory(collective) + add_subdirectory(auto_parallel) + add_subdirectory(distributed_passes) + add_subdirectory(ps) + endif() + add_subdirectory(distribution) add_subdirectory(dygraph_to_static) if(NOT WIN32 OR NOT WITH_GPU) add_subdirectory(fft) @@ -120,7 +123,6 @@ if(WITH_TESTING) add_subdirectory(mkldnn) endif() add_subdirectory(prim) - # add_subdirectory(ps) add_subdirectory(quantization) add_subdirectory(rnn) add_subdirectory(rpc) diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/CMakeLists.txt b/test/auto_parallel/CMakeLists.txt similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/CMakeLists.txt rename to test/auto_parallel/CMakeLists.txt diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/amp_o2_pass.py b/test/auto_parallel/amp_o2_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/amp_o2_pass.py rename to test/auto_parallel/amp_o2_pass.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/amp_pass_unittest.py b/test/auto_parallel/amp_pass_unittest.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/amp_pass_unittest.py rename to test/auto_parallel/amp_pass_unittest.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/auto_parallel_relaunch_model.py b/test/auto_parallel/auto_parallel_relaunch_model.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/auto_parallel_relaunch_model.py rename to test/auto_parallel/auto_parallel_relaunch_model.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/auto_parallel_relaunch_with_gpt_planner.py b/test/auto_parallel/auto_parallel_relaunch_with_gpt_planner.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/auto_parallel_relaunch_with_gpt_planner.py rename to test/auto_parallel/auto_parallel_relaunch_with_gpt_planner.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/auto_parallel_relaunch_with_planner.py b/test/auto_parallel/auto_parallel_relaunch_with_planner.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/auto_parallel_relaunch_with_planner.py rename to test/auto_parallel/auto_parallel_relaunch_with_planner.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/clip_grad_by_global_norm.py b/test/auto_parallel/clip_grad_by_global_norm.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/clip_grad_by_global_norm.py rename to test/auto_parallel/clip_grad_by_global_norm.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/converter.py b/test/auto_parallel/converter.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/converter.py rename to test/auto_parallel/converter.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/engine_api.py b/test/auto_parallel/engine_api.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/engine_api.py rename to test/auto_parallel/engine_api.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/engine_api_dp.py b/test/auto_parallel/engine_api_dp.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/engine_api_dp.py rename to test/auto_parallel/engine_api_dp.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/generation_pipeline_pass_unittest.py b/test/auto_parallel/generation_pipeline_pass_unittest.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/generation_pipeline_pass_unittest.py rename to test/auto_parallel/generation_pipeline_pass_unittest.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/get_gpt_model.py b/test/auto_parallel/get_gpt_model.py similarity index 99% rename from python/paddle/fluid/tests/unittests/auto_parallel/get_gpt_model.py rename to test/auto_parallel/get_gpt_model.py index f23b3faf8df..5d85eac81ff 100644 --- a/python/paddle/fluid/tests/unittests/auto_parallel/get_gpt_model.py +++ b/test/auto_parallel/get_gpt_model.py @@ -20,7 +20,7 @@ import numpy as np import paddle from paddle.distributed.fleet import auto -sys.path.append("..") +sys.path.append("../legacy_test") import auto_parallel_gpt_model as modeling from auto_parallel_gpt_model import ( GPTForPretraining, diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/gradient_merge_pass_unittest.py b/test/auto_parallel/gradient_merge_pass_unittest.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/gradient_merge_pass_unittest.py rename to test/auto_parallel/gradient_merge_pass_unittest.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/high_order_grad.py b/test/auto_parallel/high_order_grad.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/high_order_grad.py rename to test/auto_parallel/high_order_grad.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/iterable_dataset.py b/test/auto_parallel/iterable_dataset.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/iterable_dataset.py rename to test/auto_parallel/iterable_dataset.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/launch.py b/test/auto_parallel/launch.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/launch.py rename to test/auto_parallel/launch.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/optimization_tuner_api.py b/test/auto_parallel/optimization_tuner_api.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/optimization_tuner_api.py rename to test/auto_parallel/optimization_tuner_api.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/quantization_pass_unittest.py b/test/auto_parallel/quantization_pass_unittest.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/quantization_pass_unittest.py rename to test/auto_parallel/quantization_pass_unittest.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/random_control_unittest.py b/test/auto_parallel/random_control_unittest.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/random_control_unittest.py rename to test/auto_parallel/random_control_unittest.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/recompute_pass_unittest.py b/test/auto_parallel/recompute_pass_unittest.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/recompute_pass_unittest.py rename to test/auto_parallel/recompute_pass_unittest.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/sharding_newexe.py b/test/auto_parallel/sharding_newexe.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/sharding_newexe.py rename to test/auto_parallel/sharding_newexe.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/sharding_pass_unittest.py b/test/auto_parallel/sharding_pass_unittest.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/sharding_pass_unittest.py rename to test/auto_parallel/sharding_pass_unittest.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_align_tool.py b/test/auto_parallel/test_align_tool.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_align_tool.py rename to test/auto_parallel/test_align_tool.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_amp_o2_pass.py b/test/auto_parallel/test_amp_o2_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_amp_o2_pass.py rename to test/auto_parallel/test_amp_o2_pass.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_auto_parallel_relaunch.py b/test/auto_parallel/test_auto_parallel_relaunch.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_auto_parallel_relaunch.py rename to test/auto_parallel/test_auto_parallel_relaunch.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_base_cost.py b/test/auto_parallel/test_base_cost.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_base_cost.py rename to test/auto_parallel/test_base_cost.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_cluster.py b/test/auto_parallel/test_cluster.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_cluster.py rename to test/auto_parallel/test_cluster.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_cluster_partition.py b/test/auto_parallel/test_cluster_partition.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_cluster_partition.py rename to test/auto_parallel/test_cluster_partition.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_cluster_v2.py b/test/auto_parallel/test_cluster_v2.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_cluster_v2.py rename to test/auto_parallel/test_cluster_v2.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_comm_cost.py b/test/auto_parallel/test_comm_cost.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_comm_cost.py rename to test/auto_parallel/test_comm_cost.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_comp_cost.py b/test/auto_parallel/test_comp_cost.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_comp_cost.py rename to test/auto_parallel/test_comp_cost.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_conditional_block_reshard.py b/test/auto_parallel/test_conditional_block_reshard.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_conditional_block_reshard.py rename to test/auto_parallel/test_conditional_block_reshard.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_convert_to_process_meshes.py b/test/auto_parallel/test_convert_to_process_meshes.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_convert_to_process_meshes.py rename to test/auto_parallel/test_convert_to_process_meshes.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_converter.py b/test/auto_parallel/test_converter.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_converter.py rename to test/auto_parallel/test_converter.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_dist_assign.py b/test/auto_parallel/test_dist_assign.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_dist_assign.py rename to test/auto_parallel/test_dist_assign.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_dist_attr_v2.py b/test/auto_parallel/test_dist_attr_v2.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_dist_attr_v2.py rename to test/auto_parallel/test_dist_attr_v2.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_dist_context.py b/test/auto_parallel/test_dist_context.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_dist_context.py rename to test/auto_parallel/test_dist_context.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_dist_embedding.py b/test/auto_parallel/test_dist_embedding.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_dist_embedding.py rename to test/auto_parallel/test_dist_embedding.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_dist_matmul.py b/test/auto_parallel/test_dist_matmul.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_dist_matmul.py rename to test/auto_parallel/test_dist_matmul.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_dist_op_cost.py b/test/auto_parallel/test_dist_op_cost.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_dist_op_cost.py rename to test/auto_parallel/test_dist_op_cost.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_dist_pnorm.py b/test/auto_parallel/test_dist_pnorm.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_dist_pnorm.py rename to test/auto_parallel/test_dist_pnorm.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_dist_reshape.py b/test/auto_parallel/test_dist_reshape.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_dist_reshape.py rename to test/auto_parallel/test_dist_reshape.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_dist_saver.py b/test/auto_parallel/test_dist_saver.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_dist_saver.py rename to test/auto_parallel/test_dist_saver.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_dist_scale.py b/test/auto_parallel/test_dist_scale.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_dist_scale.py rename to test/auto_parallel/test_dist_scale.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_dist_shape.py b/test/auto_parallel/test_dist_shape.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_dist_shape.py rename to test/auto_parallel/test_dist_shape.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_dist_slice.py b/test/auto_parallel/test_dist_slice.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_dist_slice.py rename to test/auto_parallel/test_dist_slice.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_dist_split.py b/test/auto_parallel/test_dist_split.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_dist_split.py rename to test/auto_parallel/test_dist_split.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_engine_api.py b/test/auto_parallel/test_engine_api.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_engine_api.py rename to test/auto_parallel/test_engine_api.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_engine_api_dp.py b/test/auto_parallel/test_engine_api_dp.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_engine_api_dp.py rename to test/auto_parallel/test_engine_api_dp.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_engine_api_error.py b/test/auto_parallel/test_engine_api_error.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_engine_api_error.py rename to test/auto_parallel/test_engine_api_error.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_engine_callbacks.py b/test/auto_parallel/test_engine_callbacks.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_engine_callbacks.py rename to test/auto_parallel/test_engine_callbacks.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_engine_save_load.py b/test/auto_parallel/test_engine_save_load.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_engine_save_load.py rename to test/auto_parallel/test_engine_save_load.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_fp16_assign.py b/test/auto_parallel/test_fp16_assign.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_fp16_assign.py rename to test/auto_parallel/test_fp16_assign.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_fuse_adamw_pass.py b/test/auto_parallel/test_fuse_adamw_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_fuse_adamw_pass.py rename to test/auto_parallel/test_fuse_adamw_pass.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_fused_linear_pass.py b/test/auto_parallel/test_fused_linear_pass.py similarity index 98% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_fused_linear_pass.py rename to test/auto_parallel/test_fused_linear_pass.py index d2da582ef15..3a1a5bf5c97 100644 --- a/python/paddle/fluid/tests/unittests/auto_parallel/test_fused_linear_pass.py +++ b/test/auto_parallel/test_fused_linear_pass.py @@ -22,7 +22,7 @@ from get_gpt_model import FakeDataset, generate_model import paddle from paddle.distributed.fleet import auto -sys.path.append("..") +sys.path.append("../../python/paddle/fluid/tests/unittests") from test_sparse_addmm_op import get_cuda_version diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_group_operators.py b/test/auto_parallel/test_group_operators.py similarity index 99% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_group_operators.py rename to test/auto_parallel/test_group_operators.py index 8c4920e952c..6dea719a111 100644 --- a/python/paddle/fluid/tests/unittests/auto_parallel/test_group_operators.py +++ b/test/auto_parallel/test_group_operators.py @@ -20,7 +20,7 @@ import numpy as np import paddle from paddle import static -sys.path.append("..") +sys.path.append("../legacy_test") import auto_parallel_gpt_model as modeling from auto_parallel_gpt_model import ( GPTForPretraining, diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_high_order_grad.py b/test/auto_parallel/test_high_order_grad.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_high_order_grad.py rename to test/auto_parallel/test_high_order_grad.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_interface.py b/test/auto_parallel/test_interface.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_interface.py rename to test/auto_parallel/test_interface.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_iterable_dataset.py b/test/auto_parallel/test_iterable_dataset.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_iterable_dataset.py rename to test/auto_parallel/test_iterable_dataset.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_lr_grad_clip.py b/test/auto_parallel/test_lr_grad_clip.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_lr_grad_clip.py rename to test/auto_parallel/test_lr_grad_clip.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_new_cost_model.py b/test/auto_parallel/test_new_cost_model.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_new_cost_model.py rename to test/auto_parallel/test_new_cost_model.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_optimization_tuner_api.py b/test/auto_parallel/test_optimization_tuner_api.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_optimization_tuner_api.py rename to test/auto_parallel/test_optimization_tuner_api.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_parallel_tuner.py b/test/auto_parallel/test_parallel_tuner.py similarity index 99% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_parallel_tuner.py rename to test/auto_parallel/test_parallel_tuner.py index ff6778a82ed..258bf0c398b 100644 --- a/python/paddle/fluid/tests/unittests/auto_parallel/test_parallel_tuner.py +++ b/test/auto_parallel/test_parallel_tuner.py @@ -26,7 +26,7 @@ from paddle.distributed.auto_parallel.dist_context import ( from paddle.distributed.auto_parallel.process_mesh import ProcessMesh from paddle.distributed.auto_parallel.tuner.parallel_tuner import ParallelTuner -sys.path.append("..") +sys.path.append("../legacy_test") import auto_parallel_gpt_model as modeling from auto_parallel_gpt_model import ( GPTForPretraining, diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_parallel_tuner_full.py b/test/auto_parallel/test_parallel_tuner_full.py similarity index 99% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_parallel_tuner_full.py rename to test/auto_parallel/test_parallel_tuner_full.py index 285d75e436c..7df76ef097e 100644 --- a/python/paddle/fluid/tests/unittests/auto_parallel/test_parallel_tuner_full.py +++ b/test/auto_parallel/test_parallel_tuner_full.py @@ -28,7 +28,7 @@ from paddle.distributed.auto_parallel.process_mesh import ProcessMesh from paddle.distributed.auto_parallel.strategy import Strategy from paddle.distributed.auto_parallel.tuner.parallel_tuner import ParallelTuner -sys.path.append("..") +sys.path.append("../legacy_test") import auto_parallel_gpt_model as modeling from auto_parallel_gpt_model import ( GPTForPretraining, diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_parallel_tuner_predict.py b/test/auto_parallel/test_parallel_tuner_predict.py similarity index 99% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_parallel_tuner_predict.py rename to test/auto_parallel/test_parallel_tuner_predict.py index d4ec13d0209..1e3c6ea87e8 100644 --- a/python/paddle/fluid/tests/unittests/auto_parallel/test_parallel_tuner_predict.py +++ b/test/auto_parallel/test_parallel_tuner_predict.py @@ -26,7 +26,7 @@ from paddle.distributed.auto_parallel.dist_context import ( from paddle.distributed.auto_parallel.process_mesh import ProcessMesh from paddle.distributed.auto_parallel.tuner.parallel_tuner import ParallelTuner -sys.path.append("..") +sys.path.append("../legacy_test") import auto_parallel_gpt_model as modeling from auto_parallel_gpt_model import ( GPTForPretraining, diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_pass_amp.py b/test/auto_parallel/test_pass_amp.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_pass_amp.py rename to test/auto_parallel/test_pass_amp.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_pass_base_list.py b/test/auto_parallel/test_pass_base_list.py similarity index 98% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_pass_base_list.py rename to test/auto_parallel/test_pass_base_list.py index f1780b92c39..4c7a9cbd953 100644 --- a/python/paddle/fluid/tests/unittests/auto_parallel/test_pass_base_list.py +++ b/test/auto_parallel/test_pass_base_list.py @@ -22,7 +22,7 @@ from get_gpt_model import FakeDataset, generate_model import paddle from paddle.distributed.fleet import auto -sys.path.append("..") +sys.path.append("../../python/paddle/fluid/tests/unittests") from test_sparse_addmm_op import get_cuda_version diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_pass_bf16.py b/test/auto_parallel/test_pass_bf16.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_pass_bf16.py rename to test/auto_parallel/test_pass_bf16.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_pass_generation_pipeline.py b/test/auto_parallel/test_pass_generation_pipeline.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_pass_generation_pipeline.py rename to test/auto_parallel/test_pass_generation_pipeline.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_pass_grad_clip.py b/test/auto_parallel/test_pass_grad_clip.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_pass_grad_clip.py rename to test/auto_parallel/test_pass_grad_clip.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_pass_gradient_merge.py b/test/auto_parallel/test_pass_gradient_merge.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_pass_gradient_merge.py rename to test/auto_parallel/test_pass_gradient_merge.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_pass_quantization.py b/test/auto_parallel/test_pass_quantization.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_pass_quantization.py rename to test/auto_parallel/test_pass_quantization.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_pass_recompute.py b/test/auto_parallel/test_pass_recompute.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_pass_recompute.py rename to test/auto_parallel/test_pass_recompute.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_pass_sharding.py b/test/auto_parallel/test_pass_sharding.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_pass_sharding.py rename to test/auto_parallel/test_pass_sharding.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_pattern.py b/test/auto_parallel/test_pattern.py similarity index 99% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_pattern.py rename to test/auto_parallel/test_pattern.py index 55967be3eb3..bdccc68d984 100644 --- a/python/paddle/fluid/tests/unittests/auto_parallel/test_pattern.py +++ b/test/auto_parallel/test_pattern.py @@ -20,7 +20,7 @@ import numpy as np import paddle from paddle import static -sys.path.append("..") +sys.path.append("../legacy_test") import auto_parallel_gpt_model as modeling from auto_parallel_gpt_model import ( GPTForPretraining, diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_pattern_match.py b/test/auto_parallel/test_pattern_match.py similarity index 99% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_pattern_match.py rename to test/auto_parallel/test_pattern_match.py index bc6e86c8b34..c240969ef9d 100644 --- a/python/paddle/fluid/tests/unittests/auto_parallel/test_pattern_match.py +++ b/test/auto_parallel/test_pattern_match.py @@ -20,7 +20,7 @@ import numpy as np import paddle from paddle import static -sys.path.append("..") +sys.path.append("../legacy_test") import auto_parallel_gpt_model as modeling from auto_parallel_gpt_model import ( GPTForPretraining, diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_prim_dist_op.py b/test/auto_parallel/test_prim_dist_op.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_prim_dist_op.py rename to test/auto_parallel/test_prim_dist_op.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_process_mesh.py b/test/auto_parallel/test_process_mesh.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_process_mesh.py rename to test/auto_parallel/test_process_mesh.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_process_mesh_v2.py b/test/auto_parallel/test_process_mesh_v2.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_process_mesh_v2.py rename to test/auto_parallel/test_process_mesh_v2.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_random_ctrl.py b/test/auto_parallel/test_random_ctrl.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_random_ctrl.py rename to test/auto_parallel/test_random_ctrl.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_recorder.py b/test/auto_parallel/test_recorder.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_recorder.py rename to test/auto_parallel/test_recorder.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_relaunch_with_gpt_planner.py b/test/auto_parallel/test_relaunch_with_gpt_planner.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_relaunch_with_gpt_planner.py rename to test/auto_parallel/test_relaunch_with_gpt_planner.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_relaunch_with_planner.py b/test/auto_parallel/test_relaunch_with_planner.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_relaunch_with_planner.py rename to test/auto_parallel/test_relaunch_with_planner.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_rule_based_tuner.py b/test/auto_parallel/test_rule_based_tuner.py similarity index 99% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_rule_based_tuner.py rename to test/auto_parallel/test_rule_based_tuner.py index 15e9390cc40..a3ef694b5c3 100644 --- a/python/paddle/fluid/tests/unittests/auto_parallel/test_rule_based_tuner.py +++ b/test/auto_parallel/test_rule_based_tuner.py @@ -20,7 +20,7 @@ import numpy as np import paddle from paddle import static -sys.path.append("..") +sys.path.append("../legacy_test") import auto_parallel_gpt_model as modeling from auto_parallel_gpt_model import ( GPTForPretraining, diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_rule_based_tuner_o2.py b/test/auto_parallel/test_rule_based_tuner_o2.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_rule_based_tuner_o2.py rename to test/auto_parallel/test_rule_based_tuner_o2.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_selective_recompute.py b/test/auto_parallel/test_selective_recompute.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_selective_recompute.py rename to test/auto_parallel/test_selective_recompute.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_serialization.py b/test/auto_parallel/test_serialization.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_serialization.py rename to test/auto_parallel/test_serialization.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_sharding_with_newexe.py b/test/auto_parallel/test_sharding_with_newexe.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_sharding_with_newexe.py rename to test/auto_parallel/test_sharding_with_newexe.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_strategy.py b/test/auto_parallel/test_strategy.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_strategy.py rename to test/auto_parallel/test_strategy.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_to_static.py b/test/auto_parallel/test_to_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_to_static.py rename to test/auto_parallel/test_to_static.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_topology.py b/test/auto_parallel/test_topology.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_topology.py rename to test/auto_parallel/test_topology.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_trial.py b/test/auto_parallel/test_trial.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_trial.py rename to test/auto_parallel/test_trial.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_tunable_space.py b/test/auto_parallel/test_tunable_space.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_tunable_space.py rename to test/auto_parallel/test_tunable_space.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_tunable_variable.py b/test/auto_parallel/test_tunable_variable.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_tunable_variable.py rename to test/auto_parallel/test_tunable_variable.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_tuning_recompute.py b/test/auto_parallel/test_tuning_recompute.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_tuning_recompute.py rename to test/auto_parallel/test_tuning_recompute.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_while_op_completion.py b/test/auto_parallel/test_while_op_completion.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_while_op_completion.py rename to test/auto_parallel/test_while_op_completion.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel/test_while_op_partition.py b/test/auto_parallel/test_while_op_partition.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel/test_while_op_partition.py rename to test/auto_parallel/test_while_op_partition.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/CMakeLists.txt b/test/distributed_passes/CMakeLists.txt similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/CMakeLists.txt rename to test/distributed_passes/CMakeLists.txt diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/auto_parallel_pass_test_base.py b/test/distributed_passes/auto_parallel_pass_test_base.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/auto_parallel_pass_test_base.py rename to test/distributed_passes/auto_parallel_pass_test_base.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/check_pass_conflict_example.py b/test/distributed_passes/check_pass_conflict_example.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/check_pass_conflict_example.py rename to test/distributed_passes/check_pass_conflict_example.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/dist_pass_test_base.py b/test/distributed_passes/dist_pass_test_base.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/dist_pass_test_base.py rename to test/distributed_passes/dist_pass_test_base.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/launch.py b/test/distributed_passes/launch.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/launch.py rename to test/distributed_passes/launch.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/model_zoo.py b/test/distributed_passes/model_zoo.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/model_zoo.py rename to test/distributed_passes/model_zoo.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/pass_run_main.py b/test/distributed_passes/pass_run_main.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/pass_run_main.py rename to test/distributed_passes/pass_run_main.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/ps_pass_test_base.py b/test/distributed_passes/ps_pass_test_base.py similarity index 97% rename from python/paddle/fluid/tests/unittests/distributed_passes/ps_pass_test_base.py rename to test/distributed_passes/ps_pass_test_base.py index abb7c2a28d3..9de5f8a3494 100755 --- a/python/paddle/fluid/tests/unittests/distributed_passes/ps_pass_test_base.py +++ b/test/distributed_passes/ps_pass_test_base.py @@ -17,7 +17,7 @@ import shlex import sys import unittest -from paddle.fluid.tests.unittests.distributed_passes.dist_pass_test_base import ( # noqa: F401 +from dist_pass_test_base import ( # noqa: F401 prepare_python_path_and_return_module, remove_path_if_exists, ) diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_amp_pass.py b/test/distributed_passes/test_auto_parallel_amp_pass.py similarity index 97% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_amp_pass.py rename to test/distributed_passes/test_auto_parallel_amp_pass.py index d373e583074..8d74e8f7288 100755 --- a/python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_amp_pass.py +++ b/test/distributed_passes/test_auto_parallel_amp_pass.py @@ -13,9 +13,12 @@ # limitations under the License. import random +import sys import unittest import numpy as np + +sys.path.append("../legacy_test") from auto_parallel_pass_test_base import AutoPallelPassTestBase import paddle diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_data_parallel_optimization_pass.py b/test/distributed_passes/test_auto_parallel_data_parallel_optimization_pass.py similarity index 99% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_data_parallel_optimization_pass.py rename to test/distributed_passes/test_auto_parallel_data_parallel_optimization_pass.py index 7f459d49942..aa989df7025 100644 --- a/python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_data_parallel_optimization_pass.py +++ b/test/distributed_passes/test_auto_parallel_data_parallel_optimization_pass.py @@ -17,6 +17,8 @@ import sys import unittest import numpy as np + +sys.path.append("../legacy_test") from auto_parallel_pass_test_base import AutoPallelPassTestBase import paddle diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_fp16_pass.py b/test/distributed_passes/test_auto_parallel_fp16_pass.py similarity index 97% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_fp16_pass.py rename to test/distributed_passes/test_auto_parallel_fp16_pass.py index 9a542075996..59dae5d79d2 100644 --- a/python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_fp16_pass.py +++ b/test/distributed_passes/test_auto_parallel_fp16_pass.py @@ -13,9 +13,12 @@ # limitations under the License. import random +import sys import unittest import numpy as np + +sys.path.append("../legacy_test") from auto_parallel_pass_test_base import AutoPallelPassTestBase import paddle diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_gradient_merge_pass.py b/test/distributed_passes/test_auto_parallel_gradient_merge_pass.py similarity index 99% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_gradient_merge_pass.py rename to test/distributed_passes/test_auto_parallel_gradient_merge_pass.py index c34cf1ac842..94bb935b31c 100644 --- a/python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_gradient_merge_pass.py +++ b/test/distributed_passes/test_auto_parallel_gradient_merge_pass.py @@ -14,9 +14,12 @@ import logging import random +import sys import unittest import numpy as np + +sys.path.append("../legacy_test") from auto_parallel_pass_test_base import AutoPallelPassTestBase import paddle diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_recompute_pass.py b/test/distributed_passes/test_auto_parallel_recompute_pass.py similarity index 97% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_recompute_pass.py rename to test/distributed_passes/test_auto_parallel_recompute_pass.py index 2b77ccdf34a..e683694944e 100644 --- a/python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_recompute_pass.py +++ b/test/distributed_passes/test_auto_parallel_recompute_pass.py @@ -13,9 +13,12 @@ # limitations under the License. import random +import sys import unittest import numpy as np + +sys.path.append("../legacy_test") from auto_parallel_pass_test_base import AutoPallelPassTestBase import paddle diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_sharding_pass.py b/test/distributed_passes/test_auto_parallel_sharding_pass.py similarity index 98% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_sharding_pass.py rename to test/distributed_passes/test_auto_parallel_sharding_pass.py index 566c0d83c7f..534af2598e5 100644 --- a/python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_sharding_pass.py +++ b/test/distributed_passes/test_auto_parallel_sharding_pass.py @@ -17,6 +17,8 @@ import sys import unittest import numpy as np + +sys.path.append("../legacy_test") from auto_parallel_pass_test_base import AutoPallelPassTestBase import paddle diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_build_cinn_pass_resnet.py b/test/distributed_passes/test_build_cinn_pass_resnet.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_build_cinn_pass_resnet.py rename to test/distributed_passes/test_build_cinn_pass_resnet.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_build_cinn_pass_simple_net.py b/test/distributed_passes/test_build_cinn_pass_simple_net.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_build_cinn_pass_simple_net.py rename to test/distributed_passes/test_build_cinn_pass_simple_net.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_adam_pass.py b/test/distributed_passes/test_dist_fuse_adam_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_adam_pass.py rename to test/distributed_passes/test_dist_fuse_adam_pass.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_all_reduce_pass.py b/test/distributed_passes/test_dist_fuse_all_reduce_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_all_reduce_pass.py rename to test/distributed_passes/test_dist_fuse_all_reduce_pass.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_bn_act_pass.py b/test/distributed_passes/test_dist_fuse_bn_act_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_bn_act_pass.py rename to test/distributed_passes/test_dist_fuse_bn_act_pass.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_bn_add_act_pass.py b/test/distributed_passes/test_dist_fuse_bn_add_act_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_bn_add_act_pass.py rename to test/distributed_passes/test_dist_fuse_bn_add_act_pass.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_gemm_epilogue_pass.py b/test/distributed_passes/test_dist_fuse_gemm_epilogue_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_gemm_epilogue_pass.py rename to test/distributed_passes/test_dist_fuse_gemm_epilogue_pass.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_momentum_pass.py b/test/distributed_passes/test_dist_fuse_momentum_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_momentum_pass.py rename to test/distributed_passes/test_dist_fuse_momentum_pass.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_relu_depthwise_conv_pass.py b/test/distributed_passes/test_dist_fuse_relu_depthwise_conv_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_relu_depthwise_conv_pass.py rename to test/distributed_passes/test_dist_fuse_relu_depthwise_conv_pass.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_sgd_pass.py b/test/distributed_passes/test_dist_fuse_sgd_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_sgd_pass.py rename to test/distributed_passes/test_dist_fuse_sgd_pass.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_dist_inplace_addto_pass.py b/test/distributed_passes/test_dist_inplace_addto_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_dist_inplace_addto_pass.py rename to test/distributed_passes/test_dist_inplace_addto_pass.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_ps_server_pass.py b/test/distributed_passes/test_ps_server_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_ps_server_pass.py rename to test/distributed_passes/test_ps_server_pass.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_ps_trainer_pass.py b/test/distributed_passes/test_ps_trainer_pass.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_ps_trainer_pass.py rename to test/distributed_passes/test_ps_trainer_pass.py diff --git a/python/paddle/fluid/tests/unittests/distributed_passes/test_white_lists.py b/test/distributed_passes/test_white_lists.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distributed_passes/test_white_lists.py rename to test/distributed_passes/test_white_lists.py diff --git a/python/paddle/fluid/tests/unittests/distribution/CMakeLists.txt b/test/distribution/CMakeLists.txt similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/CMakeLists.txt rename to test/distribution/CMakeLists.txt diff --git a/python/paddle/fluid/tests/unittests/distribution/config.py b/test/distribution/config.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/config.py rename to test/distribution/config.py diff --git a/python/paddle/fluid/tests/unittests/distribution/mock_data.py b/test/distribution/mock_data.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/mock_data.py rename to test/distribution/mock_data.py diff --git a/python/paddle/fluid/tests/unittests/distribution/parameterize.py b/test/distribution/parameterize.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/parameterize.py rename to test/distribution/parameterize.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_dirichlet_op.py b/test/distribution/test_dirichlet_op.py similarity index 98% rename from python/paddle/fluid/tests/unittests/distribution/test_dirichlet_op.py rename to test/distribution/test_dirichlet_op.py index 1239dbaae21..1ed2fed278e 100644 --- a/python/paddle/fluid/tests/unittests/distribution/test_dirichlet_op.py +++ b/test/distribution/test_dirichlet_op.py @@ -19,7 +19,7 @@ import scipy.stats import paddle -sys.path.append("../") +sys.path.append("../../python/paddle/fluid/tests/unittests") import unittest from eager_op_test import ( diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution.py b/test/distribution/test_distribution.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution.py rename to test/distribution/test_distribution.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_bernoulli.py b/test/distribution/test_distribution_bernoulli.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_bernoulli.py rename to test/distribution/test_distribution_bernoulli.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_bernoulli_static.py b/test/distribution/test_distribution_bernoulli_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_bernoulli_static.py rename to test/distribution/test_distribution_bernoulli_static.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_beta.py b/test/distribution/test_distribution_beta.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_beta.py rename to test/distribution/test_distribution_beta.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_beta_static.py b/test/distribution/test_distribution_beta_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_beta_static.py rename to test/distribution/test_distribution_beta_static.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_categorical.py b/test/distribution/test_distribution_categorical.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_categorical.py rename to test/distribution/test_distribution_categorical.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_constraint.py b/test/distribution/test_distribution_constraint.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_constraint.py rename to test/distribution/test_distribution_constraint.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_dirichlet.py b/test/distribution/test_distribution_dirichlet.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_dirichlet.py rename to test/distribution/test_distribution_dirichlet.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_dirichlet_static.py b/test/distribution/test_distribution_dirichlet_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_dirichlet_static.py rename to test/distribution/test_distribution_dirichlet_static.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_expfamily.py b/test/distribution/test_distribution_expfamily.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_expfamily.py rename to test/distribution/test_distribution_expfamily.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_expfamily_static.py b/test/distribution/test_distribution_expfamily_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_expfamily_static.py rename to test/distribution/test_distribution_expfamily_static.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_gumbel.py b/test/distribution/test_distribution_gumbel.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_gumbel.py rename to test/distribution/test_distribution_gumbel.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_gumbel_static.py b/test/distribution/test_distribution_gumbel_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_gumbel_static.py rename to test/distribution/test_distribution_gumbel_static.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_independent.py b/test/distribution/test_distribution_independent.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_independent.py rename to test/distribution/test_distribution_independent.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_independent_static.py b/test/distribution/test_distribution_independent_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_independent_static.py rename to test/distribution/test_distribution_independent_static.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_laplace.py b/test/distribution/test_distribution_laplace.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_laplace.py rename to test/distribution/test_distribution_laplace.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_laplace_static.py b/test/distribution/test_distribution_laplace_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_laplace_static.py rename to test/distribution/test_distribution_laplace_static.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_lognormal.py b/test/distribution/test_distribution_lognormal.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_lognormal.py rename to test/distribution/test_distribution_lognormal.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_lognormal_static.py b/test/distribution/test_distribution_lognormal_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_lognormal_static.py rename to test/distribution/test_distribution_lognormal_static.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_multinomial.py b/test/distribution/test_distribution_multinomial.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_multinomial.py rename to test/distribution/test_distribution_multinomial.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_multinomial_static.py b/test/distribution/test_distribution_multinomial_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_multinomial_static.py rename to test/distribution/test_distribution_multinomial_static.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_normal.py b/test/distribution/test_distribution_normal.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_normal.py rename to test/distribution/test_distribution_normal.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_transform.py b/test/distribution/test_distribution_transform.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_transform.py rename to test/distribution/test_distribution_transform.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_transform_static.py b/test/distribution/test_distribution_transform_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_transform_static.py rename to test/distribution/test_distribution_transform_static.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_transformed_distribution.py b/test/distribution/test_distribution_transformed_distribution.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_transformed_distribution.py rename to test/distribution/test_distribution_transformed_distribution.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_transformed_distribution_static.py b/test/distribution/test_distribution_transformed_distribution_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_transformed_distribution_static.py rename to test/distribution/test_distribution_transformed_distribution_static.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_uniform.py b/test/distribution/test_distribution_uniform.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_uniform.py rename to test/distribution/test_distribution_uniform.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_distribution_variable.py b/test/distribution/test_distribution_variable.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_distribution_variable.py rename to test/distribution/test_distribution_variable.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_kl.py b/test/distribution/test_kl.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_kl.py rename to test/distribution/test_kl.py diff --git a/python/paddle/fluid/tests/unittests/distribution/test_kl_static.py b/test/distribution/test_kl_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/distribution/test_kl_static.py rename to test/distribution/test_kl_static.py diff --git a/python/paddle/fluid/tests/unittests/auto_parallel_gpt_model.py b/test/legacy_test/auto_parallel_gpt_model.py similarity index 100% rename from python/paddle/fluid/tests/unittests/auto_parallel_gpt_model.py rename to test/legacy_test/auto_parallel_gpt_model.py diff --git a/python/paddle/fluid/tests/unittests/ps/CMakeLists.txt b/test/ps/CMakeLists.txt similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/CMakeLists.txt rename to test/ps/CMakeLists.txt diff --git a/python/paddle/fluid/tests/unittests/ps/__init__.py b/test/ps/__init__.py similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/__init__.py rename to test/ps/__init__.py diff --git a/python/paddle/fluid/tests/unittests/ps/config_gpubox.yaml b/test/ps/config_gpubox.yaml similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/config_gpubox.yaml rename to test/ps/config_gpubox.yaml diff --git a/python/paddle/fluid/tests/unittests/ps/cpu_async_ps_config.yaml b/test/ps/cpu_async_ps_config.yaml similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/cpu_async_ps_config.yaml rename to test/ps/cpu_async_ps_config.yaml diff --git a/python/paddle/fluid/tests/unittests/ps/cpu_geo_ps_config.yaml b/test/ps/cpu_geo_ps_config.yaml similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/cpu_geo_ps_config.yaml rename to test/ps/cpu_geo_ps_config.yaml diff --git a/python/paddle/fluid/tests/unittests/ps/cpu_sync_ps_config.yaml b/test/ps/cpu_sync_ps_config.yaml similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/cpu_sync_ps_config.yaml rename to test/ps/cpu_sync_ps_config.yaml diff --git a/python/paddle/fluid/tests/unittests/ps/dataset_generator_A.py b/test/ps/dataset_generator_A.py similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/dataset_generator_A.py rename to test/ps/dataset_generator_A.py diff --git a/python/paddle/fluid/tests/unittests/ps/dataset_generator_B.py b/test/ps/dataset_generator_B.py similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/dataset_generator_B.py rename to test/ps/dataset_generator_B.py diff --git a/python/paddle/fluid/tests/unittests/ps/dataset_generator_criteo.py b/test/ps/dataset_generator_criteo.py similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/dataset_generator_criteo.py rename to test/ps/dataset_generator_criteo.py diff --git a/python/paddle/fluid/tests/unittests/ps/download_criteo_data.sh b/test/ps/download_criteo_data.sh similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/download_criteo_data.sh rename to test/ps/download_criteo_data.sh diff --git a/python/paddle/fluid/tests/unittests/ps/download_data.sh b/test/ps/download_data.sh similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/download_data.sh rename to test/ps/download_data.sh diff --git a/python/paddle/fluid/tests/unittests/ps/fl_async_ps_config.yaml b/test/ps/fl_async_ps_config.yaml similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/fl_async_ps_config.yaml rename to test/ps/fl_async_ps_config.yaml diff --git a/python/paddle/fluid/tests/unittests/ps/fl_ps_trainer.py b/test/ps/fl_ps_trainer.py similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/fl_ps_trainer.py rename to test/ps/fl_ps_trainer.py diff --git a/python/paddle/fluid/tests/unittests/ps/gpu_ps_config.yaml b/test/ps/gpu_ps_config.yaml similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/gpu_ps_config.yaml rename to test/ps/gpu_ps_config.yaml diff --git a/python/paddle/fluid/tests/unittests/ps/gpubox_run.sh b/test/ps/gpubox_run.sh similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/gpubox_run.sh rename to test/ps/gpubox_run.sh diff --git a/python/paddle/fluid/tests/unittests/ps/heter_ps_config.yaml b/test/ps/heter_ps_config.yaml similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/heter_ps_config.yaml rename to test/ps/heter_ps_config.yaml diff --git a/python/paddle/fluid/tests/unittests/ps_dnn_model.py b/test/ps/ps_dnn_model.py similarity index 100% rename from python/paddle/fluid/tests/unittests/ps_dnn_model.py rename to test/ps/ps_dnn_model.py diff --git a/python/paddle/fluid/tests/unittests/ps/ps_dnn_trainer.py b/test/ps/ps_dnn_trainer.py similarity index 99% rename from python/paddle/fluid/tests/unittests/ps/ps_dnn_trainer.py rename to test/ps/ps_dnn_trainer.py index fc3dd1072a4..ad8996efd87 100755 --- a/python/paddle/fluid/tests/unittests/ps/ps_dnn_trainer.py +++ b/test/ps/ps_dnn_trainer.py @@ -21,6 +21,7 @@ import sys import numpy as np import yaml +from ps_dnn_model import StaticModel import paddle from paddle.distributed import fleet @@ -32,9 +33,6 @@ from paddle.distributed.ps.utils.ps_program_builder import ( ps_log_root_dir, ) -sys.path.append("..") -from ps_dnn_model import StaticModel - __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) diff --git a/python/paddle/fluid/tests/unittests/ps/static_gpubox_trainer.py b/test/ps/static_gpubox_trainer.py similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/static_gpubox_trainer.py rename to test/ps/static_gpubox_trainer.py diff --git a/python/paddle/fluid/tests/unittests/ps/test_fl_ps.py b/test/ps/test_fl_ps.py similarity index 93% rename from python/paddle/fluid/tests/unittests/ps/test_fl_ps.py rename to test/ps/test_fl_ps.py index 2f79021ce41..d9cb1a306d2 100755 --- a/python/paddle/fluid/tests/unittests/ps/test_fl_ps.py +++ b/test/ps/test_fl_ps.py @@ -16,11 +16,11 @@ import os import shlex # noqa: F401 +import sys import unittest -from paddle.fluid.tests.unittests.distributed_passes.dist_pass_test_base import ( # noqa: F401 - remove_path_if_exists, -) +sys.path.append("../distributed_passes") +from dist_pass_test_base import remove_path_if_exists # noqa: F401 class FlPsTest(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/ps/test_gpubox_ps.py b/test/ps/test_gpubox_ps.py similarity index 100% rename from python/paddle/fluid/tests/unittests/ps/test_gpubox_ps.py rename to test/ps/test_gpubox_ps.py diff --git a/python/paddle/fluid/tests/unittests/ps/test_the_one_ps.py b/test/ps/test_the_one_ps.py similarity index 96% rename from python/paddle/fluid/tests/unittests/ps/test_the_one_ps.py rename to test/ps/test_the_one_ps.py index 7d03b673a9a..135c7472677 100755 --- a/python/paddle/fluid/tests/unittests/ps/test_the_one_ps.py +++ b/test/ps/test_the_one_ps.py @@ -12,16 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +import sys import unittest from google.protobuf import text_format # noqa: F401 +sys.path.append("../distributed_passes") +from ps_pass_test_base import PsPassTestBase, remove_path_if_exists + import paddle.distributed.fleet.proto.the_one_ps_pb2 as ps_pb2 # noqa: F401 from paddle.distributed.ps.utils.public import logger, ps_log_root_dir -from paddle.fluid.tests.unittests.distributed_passes.ps_pass_test_base import ( - PsPassTestBase, - remove_path_if_exists, -) class TestTheOnePs(PsPassTestBase): -- GitLab