From 831e9135b97c189e62a97529b25b951dad254d8f Mon Sep 17 00:00:00 2001 From: Huihuang Zheng Date: Mon, 14 Dec 2020 10:55:22 +0800 Subject: [PATCH] Fix Windows Unittest (#29543) Fix 3 Windows Unittests test_fuse_all_reduce_pass: Paddle cannot run multiple-GPU on Windows so set single visible GPU flag test_feed_data_check_shape_type: Paddle cannot run multiple-GPU on Windows so set single visible GPU flag test_tsm: Winodws GPU size is not enough so decrease batch size and data size. --- paddle/scripts/paddle_build.bat | 3 --- python/paddle/fluid/tests/unittests/CMakeLists.txt | 7 ++++++- .../fluid/tests/unittests/dygraph_to_static/tsm.yaml | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/paddle/scripts/paddle_build.bat b/paddle/scripts/paddle_build.bat index 5ad48734adb..aee2739b5ab 100644 --- a/paddle/scripts/paddle_build.bat +++ b/paddle/scripts/paddle_build.bat @@ -424,10 +424,8 @@ test_decoupled_py_reader^|^ test_decoupled_py_reader_data_check^|^ test_eager_deletion_delete_vars^|^ test_eager_deletion_while_op^|^ -test_feed_data_check_shape_type^|^ test_fetch_lod_tensor_array^|^ test_fleet_base_single^|^ -test_fuse_all_reduce_pass^|^ test_fuse_elewise_add_act_pass^|^ test_fuse_optimizer_pass^|^ test_generator_dataloader^|^ @@ -450,7 +448,6 @@ test_imperative_static_runner_while^|^ test_optimizer_in_control_flow^|^ test_fuse_bn_act_pass^|^ test_fuse_bn_add_act_pass^|^ -test_tsm^|^ test_gru_rnn_op^|^ test_rnn_op^|^ test_simple_rnn_op^|^ diff --git a/python/paddle/fluid/tests/unittests/CMakeLists.txt b/python/paddle/fluid/tests/unittests/CMakeLists.txt index 60efa168ab7..9a17160ee03 100644 --- a/python/paddle/fluid/tests/unittests/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/CMakeLists.txt @@ -337,7 +337,7 @@ function(parallel_bash_test_modules TARGET_NAME) endif() endfunction() - +list(REMOVE_ITEM TEST_OPS test_feed_data_check_shape_type) list(REMOVE_ITEM TEST_OPS test_warpctc_op) list(REMOVE_ITEM TEST_OPS test_parallel_executor_crf) list(REMOVE_ITEM TEST_OPS test_parallel_executor_profiler) @@ -364,6 +364,7 @@ list(REMOVE_ITEM TEST_OPS test_basic_gru_api) list(REMOVE_ITEM TEST_OPS test_basic_gru_unit_op) list(REMOVE_ITEM TEST_OPS test_basic_lstm_api) list(REMOVE_ITEM TEST_OPS test_basic_lstm_unit_op) +list(REMOVE_ITEM TEST_OPS test_fuse_all_reduce_pass) list(REMOVE_ITEM TEST_OPS test_fuse_bn_act_pass) list(REMOVE_ITEM TEST_OPS test_fuse_bn_add_act_pass) list(REMOVE_ITEM TEST_OPS test_imperative_static_runner_mnist) @@ -547,8 +548,12 @@ py_test_modules(test_parallel_executor_profiler MODULES test_parallel_executor_p py_test_modules(test_parallel_executor_transformer MODULES test_parallel_executor_transformer) if(WIN32) py_test_modules(test_parallel_executor_transformer_auto_growth MODULES test_parallel_executor_transformer_auto_growth ENVS FLAGS_allocator_strategy=auto_growth CUDA_VISIBLE_DEVICES=0) + py_test_modules(test_fuse_all_reduce_pass MODULES test_fuse_all_reduce_pass ENVS CUDA_VISIBLE_DEVICES=0) + py_test_modules(test_feed_data_check_shape_type MODULES test_feed_data_check_shape_type ENVS CUDA_VISIBLE_DEVICES=0) else() py_test_modules(test_parallel_executor_transformer_auto_growth MODULES test_parallel_executor_transformer_auto_growth ENVS FLAGS_allocator_strategy=auto_growth) + py_test_modules(test_fuse_all_reduce_pass MODULES test_fuse_all_reduce_pass) + py_test_modules(test_feed_data_check_shape_type MODULES test_feed_data_check_shape_type) endif() py_test_modules(test_data_norm_op MODULES test_data_norm_op) diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/tsm.yaml b/python/paddle/fluid/tests/unittests/dygraph_to_static/tsm.yaml index 9b682dbd6fb..ecd320348bb 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/tsm.yaml +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/tsm.yaml @@ -15,7 +15,7 @@ TRAIN: target_size: 224 num_reader_threads: 12 buf_size: 1024 - batch_size: 4 #128 + batch_size: 2 #128 use_gpu: True num_gpus: 1 #8 filelist: "./data/dataset/kinetics/train.list" @@ -24,7 +24,7 @@ TRAIN: decay_epochs: [40, 60] l2_weight_decay: 1e-4 momentum: 0.9 - total_videos: 8000 #239781 + total_videos: 4000 #239781 VALID: short_size: 256 -- GitLab