diff --git a/python/paddle/fluid/tests/unittests/CMakeLists.txt b/python/paddle/fluid/tests/unittests/CMakeLists.txt index 57da05652ebeddd369684c03b81a0bbea1da139b..39739b742acc498da2bc18e49486d69d41914e18 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 ae98ef60835d9c985e974b2d037a768954402af1..7a5bfae6e206c12cef34cd4823ccd734b2760fc9 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 f23b3faf8dfe6199c6bfa3619d9b1b961352cf17..5d85eac81ff5d24f62043dd7bbf3ff600f97835a 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 d2da582ef15b0d0c091cd6464b3108218167c85c..3a1a5bf5c97e5733e158b261bd732ee2c68a09f8 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 8c4920e952c006064ea3a42118f15eaadeec77b5..6dea719a11180a87d30915a675ec20f0e267832a 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 ff6778a82ed399fe47ae636babd17ca44b202e62..258bf0c398b2a5760a48baae919f32f3233a4714 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 285d75e436c7cde839827379504858fb54690aa7..7df76ef097e064bb85dcf253e98725759de696f0 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 d4ec13d020912a8ca7355c9494cc1f5b5b00c79e..1e3c6ea87e8f25719d0cda57ace1d5463b8aba32 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 f1780b92c39b62ac0e1c85b02e5ee73043a8b581..4c7a9cbd9538a2b0c3810ae5add06bb987a5359d 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 55967be3eb3ecb85a44d5063085ffeef9a3a2b54..bdccc68d984fc5d189d7e151754c8d2659d49276 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 bc6e86c8b347f81be6bb5bb0278d53e923c0b175..c240969ef9ddc689e5fdedf001fc994b3d7b6db7 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 15e9390cc400c7b7e13715638dece560168e9544..a3ef694b5c3628e15fc3d874ef16bbe2e6d3db67 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 abb7c2a28d389a636398b5c05930a787ddb1ecf8..9de5f8a3494e81b4e20d4580e38e3c9889417a96 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 d373e58307433ddc7dfed917420734aa6386294a..8d74e8f72888e4d19c6f16f44055a5518cba08cd 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 7f459d499420a5312d62ddd99c2cd802d5ad65b1..aa989df70257934cda6b7e623774d1136798263e 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 9a542075996a9ea76f25997972cd3e7d946c0053..59dae5d79d277214c8c53b37cff93d1576d6f626 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 c34cf1ac8428b43b609c58bdef284b4c7a52008e..94bb935b31c621a904f5e6dd1db0b999814f47d1 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 2b77ccdf34a6352f756e2e6a9252aada39c99d2a..e683694944e1ae9d398e1d9e01f6ef3e034fca15 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 566c0d83c7fc4af87bb977347d456f2bbb9ba165..534af2598e5cc6553752fa9bbdca76220108cf87 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 1239dbaae2177ddf72bdd2b9c98b653d5bab0a13..1ed2fed278e059e3d753e6345e822a879c3ad817 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 fc3dd1072a4b3388e0af5c65140c53d1e1327b7c..ad8996efd87fccaeb0d3a678b6295277c0b190c5 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 2f79021ce4189aa95c34fc333c45414d831de31c..d9cb1a306d239ad90d93511cd3d182dcfb1a81ca 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 7d03b673a9a4c45ab00e536277209aeeb3e863e9..135c7472677e404dccd9d069dee3d48dccfb4982 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):