parallel_UT_rule.py 26.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import sys
import os

# *=======These unittest doesn't occupy GPU memory, just run as CPU unittest=======* #
19
# It run 16 job each time, If it failed due to Insufficient GPU memory or CUBLAS_STATUS_ALLOC_FAILED, 
20 21
# just remove it from this list.
CPU_PARALLEL_JOB = [
22 23
    'test_static_save_load_large',
    'version_test',
24 25
    'var_type_traits_test',
    'var_type_inference_test',
26 27 28
    'variable_test',
    'unroll_array_ops_test',
    'tuple_test',
29
    'to_string_test',
30
    'timer_test',
31
    'threadpool_test',
32 33 34
    'test_zeros_op',
    'test_while_op',
    'test_weight_quantization_mobilenetv1',
35 36 37
    'test_version',
    'test_var_info',
    'test_var_conv_2d',
38
    'test_utils',
39 40 41
    'test_unique_name',
    'test_transpose_int8_mkldnn_op',
    'test_transpose_bf16_mkldnn_op',
42
    'test_trainer_desc',
43 44 45
    'test_trainable',
    'test_teacher_student_sigmoid_loss_op',
    'test_tdm_sampler_op',
46 47 48
    'test_tdm_child_op',
    'test_sysconfig',
    'test_sync_batch_norm_pass',
49 50 51
    'test_switch',
    'test_static_shape_inferrence_for_shape_tensor',
    'test_static_analysis',
52
    'test_squared_mat_sub_fuse_pass',
53 54 55
    'test_split_and_merge_lod_tensor_op',
    'test_spawn_and_init_parallel_env',
    'test_slice_var',
56 57
    'test_skip_layernorm_fuse_pass',
    'test_simplify_with_basic_ops_pass',
58 59 60 61 62
    'test_similarity_focus_op',
    'test_shuffle_batch_op',
    'test_shrink_rnn_memory',
    'test_set_bool_attr',
    'test_sequence_topk_avg_pooling',
63 64 65 66 67 68 69
    'test_sequence_scatter_op',
    'test_sequence_scatter_op',
    'test_sequence_last_step',
    'test_sequence_first_step',
    'test_seqpool_cvm_concat_fuse_pass',
    'test_seqpool_concat_fuse_pass',
    'test_seq_concat_fc_fuse_pass',
70 71
    'test_selected_rows',
    'test_scope',
72 73
    'test_scale_matmul_fuse_pass',
    'test_scaled_dot_product_attention',
74 75 76
    'test_sampling_id_op',
    'test_runtime_and_compiletime_exception',
    'test_run_fluid_by_module_or_command_line',
77 78 79
    'test_rpn_target_assign_op',
    'test_row_conv',
    'test_rnn_memory_helper_op',
80
    'test_retinanet_detection_output',
81 82
    'test_reshape_transpose_matmul_mkldnn_fuse_pass',
    'test_reshape_bf16_op',
83
    'test_require_version',
84 85
    'test_requantize_mkldnn_op',
    'test_repeated_fc_relu_fuse_pass',
86 87
    'test_repeated_fc_relu_fuse_pass',
    'test_registry',
88 89
    'test_reducescatter_api',
    'test_reducescatter',
90 91 92
    'test_recurrent_op',
    'test_recommender_system',
    'test_query_op',
93 94
    'test_quantize_transpiler',
    'test_quantize_mkldnn_op',
95
    'test_quantization_mkldnn_pass',
96 97 98 99 100 101 102 103
    'test_quant_int8_resnet50_mkldnn',
    'test_quant_int8_mobilenetv2_mkldnn',
    'test_quant_int8_mobilenetv1_mkldnn',
    'test_quant_int8_googlenet_mkldnn',
    'test_quant2_int8_resnet50_range_mkldnn',
    'test_quant2_int8_resnet50_mkldnn',
    'test_quant2_int8_resnet50_channelwise_mkldnn',
    'test_quant2_int8_mobilenetv1_mkldnn',
104
    'test_quant2_int8_mkldnn_pass',
105 106 107 108
    'test_quant2_int8_ernie_mkldnn',
    'test_py_reader_sample_generator',
    'test_py_reader_return_list',
    'test_py_reader_lod_level_share',
109
    'test_py_reader_error_msg',
110 111 112
    'test_pyramid_hash_op',
    'test_pybind_interface',
    'test_ps_dispatcher',
113
    'test_prune',
114
    'test_protobuf_descs',
115 116 117 118 119 120
    'test_protobuf',
    'test_progressbar',
    'test_program_to_string',
    'test_program_code',
    'test_program',
    'test_precision_recall_op',
121 122 123
    'test_post_training_quantization_resnet50',
    'test_post_training_quantization_mobilenetv1',
    'test_post_training_quantization_mnist',
124
    'test_positive_negative_pair_op',
125 126
    'test_paddle_inference_api',
    'test_origin_info',
127 128
    'test_op_version',
    'test_op_support_gpu',
129 130
    'test_operator_desc',
    'test_operator',
131 132 133
    'test_ones_op',
    'test_npair_loss_op',
    'test_nn_functional_embedding_static',
134
    'test_nce',
135
    'test_name_scope',
136
    'test_naive_executor',
137
    'test_multiprocess_dataloader_iterable_dataset_split',
138 139 140
    'test_multiprocess_dataloader_exception',
    'test_multihead_matmul_fuse_pass',
    'test_multi_gru_seq_fuse_pass',
141
    'test_multi_gru_mkldnn_op',
142 143
    'test_multi_gru_fuse_pass',
    'test_multiclass_nms_op',
144 145
    'test_mul_int8_mkldnn_op',
    'test_mkldnn_scale_matmul_fuse_pass',
146 147
    'test_mkldnn_placement_pass',
    'test_mkldnn_op_nhwc',
148 149
    'test_mkldnn_op_inplace',
    'test_mkldnn_matmul_transpose_reshape_fuse_pass',
150 151
    'test_mkldnn_matmul_op_output_fuse_pass',
    'test_mkldnn_inplace_pass',
152 153
    'test_mkldnn_inplace_fuse_pass',
    'test_mkldnn_cpu_bfloat16_pass',
154 155 156
    'test_mkldnn_conv_concat_relu_mkldnn_fuse_pass',
    'test_mkldnn_conv_bias_fuse_pass',
    'test_mkldnn_conv_activation_fuse_pass',
157 158
    'test_mine_hard_examples_op',
    'test_memory_usage',
159 160
    'test_matrix_nms_op',
    'test_matmul_transpose_reshape_fuse_pass',
161 162 163 164 165 166 167 168 169 170 171 172 173 174
    'test_matmul_mkldnn_op',
    'test_matmul_bf16_mkldnn_op',
    'test_math_op_patch',
    'test_match_matrix_tensor_op',
    'test_lookup_table_dequant_op',
    'test_logging_utils',
    'test_logger',
    'test_lod_tensor_array_ops',
    'test_lod_tensor_array',
    'test_lod_rank_table',
    'test_locality_aware_nms_op',
    'test_load_vars_shape_check',
    'test_load_op_xpu',
    'test_load_op',
175
    'test_limit_gpu_memory',
176 177
    'test_layer_norm_mkldnn_op',
    'test_layer_norm_bf16_mkldnn_op',
178
    'test_layer',
179
    'test_lambv2_op',
180
    'test_is_test_pass',
181
    'test_ir_skip_layernorm_pass',
182
    'test_ir_graph',
183 184
    'test_io_save_load',
    'test_input_spec',
185 186
    'test_infer_shape',
    'test_infer_no_need_buffer_slots',
187
    'test_inference_model_io',
188 189 190 191 192 193 194
    'test_inference_api',
    'test_imperative_signal_handler',
    'test_imperative_numpy_bridge',
    'test_imperative_group',
    'test_imperative_decorator',
    'test_imperative_data_loader_process',
    'test_imperative_data_loader_exit_func',
195 196 197 198 199
    'test_imperative_base',
    'test_image_classification_layer',
    'test_image',
    'test_ifelse_basic',
    'test_hsigmoid_op',
200 201 202 203 204 205 206
    'test_hooks',
    'test_hash_op',
    'test_group',
    'test_graph_pattern_detector',
    'test_gpu_package_without_gpu_device',
    'test_global_var_getter_setter',
    'test_get_set_flags',
207 208 209 210 211
    'test_generator',
    'test_generate_proposal_labels_op',
    'test_generate_mask_labels_op',
    'test_gast_with_compatibility',
    'test_fusion_squared_mat_sub_op',
212 213 214
    'test_fusion_seqpool_cvm_concat_op',
    'test_fusion_seqpool_concat_op',
    'test_fusion_seqexpand_concat_fc_op',
215
    'test_fusion_seqconv_eltadd_relu_op',
216
    'test_fusion_repeated_fc_relu_op',
217 218
    'test_fusion_lstm_op',
    'test_fusion_gru_op',
219
    'test_fusion_gru_mkldnn_op',
220 221
    'test_fusion_gru_int8_mkldnn_op',
    'test_fusion_gru_bf16_mkldnn_op',
222
    'test_fused_emb_seq_pool_op',
223 224 225
    'test_fused_embedding_fc_lstm_op',
    'test_function_spec',
    'test_full_op',
226 227
    'test_fs_interface',
    'test_fs',
228 229
    'test_framework_debug_str',
    'test_fp16_utils',
230 231 232 233
    'test_fleet_util',
    'test_fleet_unitaccessor',
    'test_fleet_runtime',
    'test_fleet_rolemaker_init',
234
    'test_bf16_utils',
235
    'test_fleet_rolemaker_4',
236 237 238 239 240 241
    'test_fleet_rolemaker_3',
    'test_fleet_rolemaker',
    'test_fleet_nocvm_1',
    'test_fleet_base_4',
    'test_fleet',
    'test_fleet',
242
    'test_flags_use_mkldnn',
243
    'test_flags_mkldnn_ops_on_off',
244 245 246 247 248 249
    'test_filter_by_instag_op',
    'test_fetch_var',
    'test_fetch_handler',
    'test_feed_fetch_method',
    'test_fc_mkldnn_op',
    'test_fc_lstm_fuse_pass',
250
    'test_fc_lstm_fuse_pass',
251
    'test_fc_gru_fuse_pass',
252 253
    'test_fc_gru_fuse_pass',
    'test_fc_elementwise_layernorm_fuse_pass',
254
    'test_fc_bf16_mkldnn_op',
255 256 257 258 259
    'test_executor_feed_non_tensor',
    'test_executor_check_feed',
    'test_executor_and_use_program_cache',
    'test_exception',
    'test_error_clip',
260
    'test_entry_attr2',
261 262
    'test_entry_attr',
    'test_embedding_eltwise_layernorm_fuse_pass',
263
    'test_elementwise_mul_bf16_mkldnn_op',
264
    'test_elementwise_add_bf16_mkldnn_op',
265 266 267 268 269 270 271
    'test_eager_deletion_recurrent_op',
    'test_eager_deletion_padding_rnn',
    'test_eager_deletion_mnist',
    'test_eager_deletion_dynamic_rnn_base',
    'test_eager_deletion_conditional_block',
    'test_dynrnn_static_input',
    'test_dynrnn_gradient_check',
272
    'test_dyn_rnn',
273
    'test_dygraph_mode_of_unittest',
274 275
    'test_dpsgd_op',
    'test_downpoursgd',
276 277
    'test_download',
    'test_distributions',
278 279
    'test_distributed_reader',
    'test_directory_migration',
280 281
    'test_detection_map_op',
    'test_desc_clone',
282
    'test_dequantize_mkldnn_op',
283 284 285 286
    'test_depthwise_conv_mkldnn_pass',
    'test_deprecated_memory_optimize_interfaces',
    'test_default_scope_funcs',
    'test_default_dtype',
287 288
    'test_debugger',
    'test_dataset_wmt',
289
    'test_dataset_voc',
290
    'test_dataset_uci_housing',
291 292
    'test_dataset_movielens',
    'test_dataset_imikolov',
293
    'test_dataset_imdb',
294
    'test_dataset_conll05',
295 296 297 298
    'test_dataset_cifar',
    'test_dataloader_unkeep_order',
    'test_dataloader_keep_order',
    'test_dataloader_dataset',
299
    'test_data_generator',
300
    'test_data_feeder',
301 302
    'test_data',
    'test_cyclic_cifar_dataset',
303
    'test_cudnn_placement_pass',
304
    'test_crypto',
305 306
    'test_crf_decoding_op',
    'test_create_parameter',
307 308
    'test_create_op_doc_string',
    'test_create_global_var',
309 310 311 312 313 314 315 316 317 318
    'test_cpu_quantize_squash_pass',
    'test_cpu_quantize_placement_pass',
    'test_cpu_quantize_pass',
    'test_cpu_bfloat16_placement_pass',
    'test_cpu_bfloat16_pass',
    'test_conv_elementwise_add_mkldnn_fuse_pass',
    'test_conv_concat_relu_mkldnn_fuse_pass',
    'test_conv_bias_mkldnn_fuse_pass',
    'test_conv_batch_norm_mkldnn_fuse_pass',
    'test_conv_activation_mkldnn_fuse_pass',
319
    'test_conv3d_transpose_layer',
320 321
    'test_conv3d_mkldnn_op',
    'test_conv3d_layer',
322 323 324 325 326
    'test_conv2d_transpose_layer',
    'test_conv2d_mkldnn_op',
    'test_conv2d_layer',
    'test_conv2d_int8_mkldnn_op',
    'test_conv2d_bf16_mkldnn_op',
327
    'test_context_manager',
328 329 330
    'test_const_value',
    'test_conditional_block',
    'test_concat_int8_mkldnn_op',
331
    'test_concat_bf16_mkldnn_op',
332
    'test_compat',
333
    'test_common_infer_shape_functions',
334
    'test_chunk_eval_op',
335 336 337
    'test_check_import_scipy',
    'test_c_comm_init_all_op',
    'test_calc_gradient',
338 339 340
    'test_broadcast_to_op',
    'test_broadcast_shape',
    'test_broadcast_error',
341
    'test_broadcast',
342
    'test_bpr_loss_op',
343 344 345
    'test_boxps',
    'test_bipartite_match_op',
    'test_benchmark',
346 347
    'test_beam_search_op',
    'test_batch_sampler',
348
    'test_batch_norm_act_fuse_pass',
349
    'test_basic_rnn_name',
350 351 352 353
    'test_attention_lstm_op',
    'test_analyzer',
    'test_allreduce',
    'test_allgather',
354
    'test_aligned_allocator',
355 356 357 358 359 360 361
    'system_allocator_test',
    'stringprintf_test',
    'stringpiece_test',
    'split_test',
    'selected_rows_test',
    'selected_rows_functor_test',
    'scope_test',
362
    'scatter_test',
363 364 365 366 367
    'save_quant2_model_resnet50',
    'save_quant2_model_gru',
    'save_quant2_model_ernie',
    'save_load_util_test',
    'save_load_op_test',
368
    'save_load_combine_op_test',
369 370 371 372 373
    'rw_lock_test',
    'retry_allocator_test',
    'reader_test',
    'reader_blocking_queue_test',
    'prune_test',
374
    'program_desc_test',
375
    'profiler_test',
376
    'place_test',
377
    'pass_test',
378
    'op_version_registry_test',
379
    'op_tester',
380 381 382 383 384 385 386 387
    'op_proto_maker_test',
    'op_kernel_type_test',
    'operator_test',
    'operator_exception_test',
    'op_debug_string_test',
    'op_compatible_info_test',
    'op_call_stack_test',
    'no_need_buffer_vars_inference_test',
388
    'node_test',
389
    'nccl_context_test',
390
    'mmap_allocator_test',
391
    'math_function_test',
392 393 394 395 396 397 398
    'mask_util_test',
    'lod_tensor_test',
    'test_check_abi',
    'lodtensor_printer_test',
    'jit_kernel_test',
    'test_dispatch_jit',
    'inlined_vector_test',
399
    'init_test',
400
    'infer_io_utils_tester',
401 402 403
    'graph_to_program_pass_test',
    'graph_test',
    'graph_helper_test',
404 405 406
    'gather_test',
    'gather_op_test',
    'fused_broadcast_op_test',
407
    'float16_test',
408 409 410 411 412 413
    'exception_holder_test',
    'errors_test',
    'enforce_test',
    'eigen_test',
    'dropout_op_test',
    'dlpack_tensor_test',
414
    'dist_multi_trainer_test',
415 416 417 418 419 420 421 422 423 424 425 426 427 428
    'dim_test',
    'device_worker_test',
    'decorator_test',
    'ddim_test',
    'data_type_test',
    'test_check_error',
    'data_layout_transform_test',
    'cudnn_helper_test',
    'cudnn_desc_test',
    'cpu_vec_test',
    'cpu_info_test',
    'cpu_helper_test',
    'cow_ptr_tests',
    'conditional_block_op_test',
429
    'cipher_utils_test',
430 431
    'check_reduce_rank_test',
    'buffered_allocator_test',
432
    'broadcast_op_test',
433 434 435 436 437
    'bfloat16_test',
    'beam_search_decode_op_test',
    'auto_growth_best_fit_allocator_test',
    'assign_op_test',
    'allocator_facade_frac_flags_test',
438 439 440 441 442 443 444
    'aes_cipher_test',
]

# It run 4 job each time, If it failed due to Insufficient GPU memory or CUBLAS_STATUS_ALLOC_FAILED, 
# just remove it from this list.
TETRAD_PARALLEL_JOB = [
    'buffered_allocator_test',
445 446 447 448
    'allocator_facade_frac_flags_test',
    'cuda_helper_test',
    'sequence_padding_test',
    'test_auto_growth_gpu_memory_limit',
449
    'test_imperative_framework',
450 451 452 453 454 455 456 457 458 459 460 461 462
    'device_context_test',
    'test_reference_count_pass_last_lived_ops',
    'copy_same_tensor_test',
    'float16_gpu_test',
    'test_leaky_relu_grad_grad_functor',
    'sequence_pooling_test',
    'mixed_vector_test',
    'op_registry_test',
    'strided_memcpy_test',
    'selected_rows_functor_gpu_test',
    'test_prepare_op',
    'data_device_transform_test',
    'test_tensor_to_numpy',
463
    'test_naive_best_fit_gpu_memory_limit',
464
    'vol2col_test',
465 466
    'test_imperative_using_non_zero_gpu',
    'retry_allocator_test',
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484
    'system_allocator_test',
    'test_fc_fuse_pass_cc',
    'test_fc_lstm_fuse_pass_cc',
    'test_fc_gru_fuse_pass_cc',
    'test_conv_bn_fuse_pass_cc',
    'test_adaptive_pool2d_convert_global_pass',
    'test_unsqueeze2_eltwise_fuse_pass',
    'test_layer_norm_fuse_pass_cc',
    'test_fc_act_mkldnn_fuse_pass',
    'test_fleet_cc',
    'tensor_test',
    'test_repeated_fc_relu_fuse_pass_cc',
    'test_mkldnn_caching',
]

# It run 2 job each time, If it failed due to Insufficient GPU memory or CUBLAS_STATUS_ALLOC_FAILED, 
# just remove it from this list.
TWO_PARALLEL_JOB = [
Y
YUNSHEN XIE 已提交
485
    'convert_model2dot_ernie',
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881
    'im2col_test',
    'test_elementwise_add_grad_grad',
    'test_logical_op',
    'test_imperative_mnist',
    'test_imperative_deepcf',
    'test_cholesky_op',
    'test_multiprocess_dataloader_iterable_dataset_static',
    'test_sample_logits_op',
    'test_ir_fc_fuse_pass',
    'test_imperative_qat_channelwise',
    'test_fleet_base_single',
    'test_imperative_out_scale',
    'test_multiprocess_dataloader_iterable_dataset_dynamic',
    'test_fill_op',
    'test_slice_op',
    'test_cond',
    'test_compiled_program',
    'test_lstm',
    'test_ema',
    'test_py_reader_using_executor',
    'test_nan_inf',
    'test_isinstance',
    'test_jit_save_load',
    'test_box_clip_op',
    'test_group_norm_op',
    'test_seed_op',
    'test_activation_nn_grad',
    'test_pool2d_int8_mkldnn_op',
    'test_adagrad_op_v2',
    'test_nn_functional_hot_op',
    'test_op_name_conflict',
    'test_imperative_gan',
    'test_simnet',
    'test_amp_check_finite_and_scale_op',
    'test_random_seed',
    'test_histogram_op',
    'test_sequence_conv',
    'test_eye_op',
    'test_row_conv_op',
    'test_full_like_op',
    'test_optimizer_in_control_flow',
    'test_gru_unit_op',
    'test_distribute_fpn_proposals_op',
    'test_log_loss_op',
    'test_adadelta_op',
    'test_diag_embed',
    'test_unsqueeze2_op',
    'test_fused_fc_elementwise_layernorm_op',
    'test_sum_bf16_mkldnn_op',
    'test_sequence_erase_op',
    'test_sigmoid_cross_entropy_with_logits_op',
    'test_regularizer_api',
    'test_lrn_op',
    'test_parallel_ssa_graph_inference_feed_partial_data',
    'test_lod_reset_op',
    'test_install_check',
    'test_anchor_generator_op',
    'test_imperative_ptb_rnn',
    'test_gather_nd_op',
    'test_flatten_contiguous_range_op',
    'test_network_with_dtype',
    'test_elementwise_sub_op',
    'test_assert_op',
    'test_elementwise_div_op',
    'test_gather_tree_op',
    'test_decoupled_py_reader',
    'test_imperative_named_members',
    'test_seqconv_eltadd_relu_fuse_pass',
    'test_analysis_predictor',
    'test_convert_operators',
    'test_add_reader_dependency',
    'test_is_tensor',
    'test_variable',
    'test_save_model_without_var',
    'test_unfold_op',
    'test_conv_bn_fuse_pass',
    'test_truncated_gaussian_random_op',
    'test_tree_conv_op',
    'test_traced_layer_err_msg',
    'test_unique_with_counts',
    'test_auc_single_pred_op',
    'test_stack_op',
    'test_conv_bn_fuse_pass',
    'test_instance_norm_op_v2',
    'test_softmax_bf16_mkldnn_op',
    'test_mean_iou',
    'test_sequence_slice_op',
    'test_polygon_box_transform',
    'test_sequence_pad_op',
    'test_sequence_expand',
    'test_cudnn_grucell',
    'test_pool2d_bf16_mkldnn_op',
    'test_bilinear_api',
    'test_parallel_executor_inference_feed_partial_data',
    'test_initializer_nn',
    'test_modified_huber_loss_op',
    'test_lookup_table_op',
    'test_conv1d_layer',
    'test_kron_op',
    'test_isfinite_v2_op',
    'test_ctc_align',
    'test_imperative_save_load_v2',
    'test_decayed_adagrad_op',
    'test_generator_dataloader',
    'test_dropout_op',
    'test_functional_conv3d',
    'test_executor_return_tensor_not_overwriting',
    'test_flatten2_op',
    'test_fsp_op',
    'test_fusion_transpose_flatten_concat_op',
    'test_elementwise_nn_grad',
    'test_hinge_loss_op',
    'test_elementwise_add_mkldnn_op',
    'test_optimizer',
    'test_deformable_conv_op',
    'test_py_reader_push_pop',
    'test_random_crop_op',
    'test_shuffle_channel_op',
    'test_center_loss',
    'test_temporal_shift_op',
    'test_case',
    'test_transformer_api',
    'test_bmm_op',
    'test_adagrad_op',
    'test_batch_norm_mkldnn_op',
    'test_adam_op_multi_thread',
    'test_adamax_op',
    'test_while_loop_op',
    'test_affine_grid_function',
    'test_transpose_flatten_concat_fuse_pass',
    'test_trace_op',
    'test_backward',
    'test_top_k_op',
    'test_batch_fc_op',
    'test_tensor_scalar_type_promotion_static',
    'test_squared_l2_distance_op',
    'test_bicubic_interp_op',
    'test_spp_op',
    'test_space_to_depth_op',
    'test_callbacks',
    'test_sigmoid_focal_loss_op',
    'test_collect_fpn_proposals_op',
    'test_sgd_op',
    'test_sequence_unpad_op',
    'test_conv1d_transpose_layer',
    'test_sequence_slice_op',
    'test_sequence_pool',
    'test_conv_elementwise_add_fuse_pass',
    'test_sequence_pad_op',
    'test_conv_shift_op',
    'test_sequence_expand_as',
    'test_cos_sim_op',
    'test_sequence_enumerate_op',
    'test_cross_entropy2_op',
    'test_sequence_concat',
    'test_cudnn_lstmcell',
    'test_data_norm_op',
    'test_decoupled_py_reader_data_check',
    'test_deformable_conv_v1_op',
    'test_roi_align_op',
    'test_detach',
    'test_rnn_cells',
    'test_elementwise_floordiv_op',
    'test_elementwise_min_op',
    'test_reduce_op',
    'test_embedding_id_stop_gradient',
    'test_empty_op',
    'test_py_reader_combination',
    'test_ptb_lm',
    'test_expand_op',
    'test_prroi_pool_op',
    'test_fake_dequantize_op',
    'test_fetch_feed',
    'test_prelu_op',
    'test_fill_zeros_like_op',
    'test_pool2d_op',
    'test_for_enumerate',
    'test_gather_op',
    'test_partial_concat_op',
    'test_gaussian_random_op',
    'test_paddle_imperative_double_grad',
    'test_generate_proposals_v2_op',
    'test_pad_constant_like',
    'test_grid_sample_function',
    'test_pad2d_op',
    'test_huber_loss_op',
    'test_one_hot_op',
    'test_normal',
    'test_imperative_auto_prune',
    'test_nn_grad',
    'test_nearest_interp_op',
    'test_minus_op',
    'test_imperative_reinforcement',
    'test_maxout_op',
    'test_matmul_op',
    'test_increment',
    'test_masked_select_op',
    'test_lstmp_op',
    'test_loop',
    'test_label_smooth_op',
    'test_logsumexp',
    'test_log_softmax',
    'test_learning_rate_scheduler',
    'test_linspace',
    'test_linear_interp_op',
    'test_layer_norm_op_v2',
    'test_lamb_op',
    'test_lookup_table_v2_op',
    'test_l1_norm_op',
    'test_lstm_op',
    'test_margin_rank_loss_op',
    'test_index_sample_op',
    'test_imperative_static_runner_while',
    'test_imperative_save_load',
    'test_imperative_ptb_rnn_sorted_gradient',
    'test_mul_op',
    'test_imperative_lod_tensor_to_selected_rows',
    'test_imperative_data_parallel',
    'test_norm_nn_grad',
    'test_im2sequence_op',
    'test_if_else_op',
    'test_one_hot_v2_op',
    'test_grid_sampler_op',
    'test_pad_op',
    'test_generate_proposals_op',
    'test_parameter',
    'test_gaussian_random_mkldnn_op',
    'test_partial_sum_op',
    'test_ftrl_op',
    'test_flip',
    'test_pool_max_op',
    'test_prior_box_op',
    'test_fake_quantize_op',
    'test_proximal_gd_op',
    'test_expand_v2_op',
    'test_psroi_pool_op',
    'test_expand_as_v2_op',
    'test_ptb_lm_v2',
    'test_rand_op',
    'test_empty_like_op',
    'test_rank_loss_op',
    'test_elementwise_mod_op',
    'test_reinforcement_learning',
    'test_elementwise_max_op',
    'test_retain_graph',
    'test_edit_distance_op',
    'test_reverse_op',
    'test_device_guard',
    'test_rnn_cells_static',
    'test_deformable_psroi_pooling',
    'test_roi_perspective_transform_op',
    'test_segment_ops',
    'test_cvm_op',
    'test_selu_op',
    'test_cross_op',
    'test_sequence_conv',
    'test_crop_tensor_op',
    'test_sequence_expand',
    'test_sequence_mask',
    'test_conv_nn_grad',
    'test_sequence_pool',
    'test_conv_elementwise_add2_act_fuse_pass',
    'test_sequence_reshape',
    'test_conv2d_fusion_op',
    'test_sequence_softmax_op',
    'test_sequence_unpad_op',
    'test_compare_reduce_op',
    'test_clip_by_norm_op',
    'test_box_coder_op',
    'test_smooth_l1_loss_op',
    'test_bilinear_interp_op',
    'test_spectral_norm_op',
    'test_sum_mkldnn_op',
    'test_batch_norm_op',
    'test_base_layer',
    'test_argsort_op',
    'test_arg_min_max_op',
    'test_transpose_op',
    'test_affine_grid_op',
    'test_unpool_op',
    'test_addmm_op',
    'test_adam_optimizer_fp32_fp64',
    'test_auc_op',
    'test_adam_op',
    'test_bilinear_tensor_product_op',
    'test_break_continue',
    'test_transpose_mkldnn_op',
    'test_callback_reduce_lr_on_plateau',
    'test_cast_op',
    'test_scatter_nd_op',
    'test_conv2d_transpose_op_depthwise_conv',
    'test_queue',
    'test_cross_entropy_op',
    'test_detection',
    'test_elementwise_mul_mkldnn_op',
    'test_grid_generator',
    'test_functional_conv2d',
    'test_fit_a_line',
    'test_fill_any_like_op',
    'test_functional_conv2d_transpose',
    'test_functional_conv3d_transpose',
    'test_dot_op',
    'test_gru_op',
    'test_device',
    'test_imperative_layer_apply',
    'test_dataloader_early_reset',
    'test_imperative_selected_rows_to_lod_tensor',
    'test_crop_op',
    'test_linear_interp_v2_op',
    'test_lr_scheduler',
    'test_tensor_array_to_tensor',
    'test_mean_op',
    'test_momentum_op',
    'test_iou_similarity_op',
    'test_optimizer_grad',
    'test_dygraph_weight_norm',
    'test_batch_norm_op_v2',
    'test_pool2d_mkldnn_op',
    'test_regularizer',
    'test_sequence_concat',
    'test_sequence_expand_as',
    'test_sequence_reverse',
    'test_shape_op',
    'test_diag',
    'test_strided_slice_op',
    'test_switch_case',
    'test_target_assign_op',
    'test_translated_layer',
    'test_isfinite_op',
    'test_conv_elementwise_add_act_fuse_pass',
    'test_unbind_op',
    'test_size_op',
    'test_unique',
    'test_unstack_op',
    'test_wrappers',
    'test_deprecated_decorator',
    'test_affine_channel_op',
    'test_arange',
    'test_lrn_mkldnn_op',
    'test_imperative_gnn',
    'test_dequantize_abs_max_op',
    'test_elementwise_mul_op',
    'test_tensor_scalar_type_promotion_dynamic',
    'test_fc_op',
    'test_mish_op',
    'test_flatten_op',
    'test_gradient_clip',
    'test_allclose_layer',
    'test_meshgrid_op',
    'test_get_places_op',
    'test_reader_reset',
    'test_squared_l2_norm_op',
    'test_softmax_mkldnn_op',
    'test_numel_op',
    'test_squeeze2_op',
    'test_dygraph_mnist_fp16',
    'test_activation_mkldnn_op',
    'test_imperative_layer_children',
    'test_nearest_interp_v2_op',
    'test_fill_zeros_like2_op',
    'test_sync_batch_norm_op',
    'test_static_save_load',
    'test_coalesce_tensor_op',
    'test_fuse_bn_act_pass',
    'test_simnet_v2',
    'test_shard_index_op',
    'test_cuda_random_seed',
    'test_dequantize_log_op',
    'test_mkldnn_batch_norm_act_fuse_pass',
    'test_imperative_skip_op',
    'test_proximal_adagrad_op',
    'test_word2vec',
    'test_conv2d_transpose_mkldnn_op',
    'test_imperative_optimizer',
    'test_assign_value_op',
    'test_roi_pool_op',
    'test_imperative_basic',
    'test_word2vec',
    'test_manual_seed',
    'test_buffer_shared_memory_reuse_pass',
    'test_range',
    'test_box_decoder_and_assign_op',
    'test_imperative_optimizer_v2',
    'test_python_operator_overriding',
    'test_is_empty_op',
    'test_imperative_qat',
    'test_py_reader_pin_memory',
    'test_train_recognize_digits',
    'test_parallel_executor_feed_persistable_var',
    'test_mnist',
    'test_update_loss_scaling_op',
    'test_rnn_cell_api',
    'test_parallel_executor_fetch_isolated_var',
    'test_imperative_load_static_param',
    'test_fuse_bn_add_act_pass',
    'test_buffer_shared_memory_reuse_pass_and_fuse_optimization_op_pass',
882 883 884 885
]


def main():
886
    cpu_parallel_job = '^job$'
887
    tetrad_parallel_job = '^job$'
888 889
    two_parallel_job = '^job$'
    non_parallel_job = '^job$'
890 891 892

    test_cases = sys.argv[1]
    test_cases = test_cases.split("\n")
893 894 895 896 897 898 899 900

    for unittest in CPU_PARALLEL_JOB:
        if unittest in test_cases:
            cpu_parallel_job = cpu_parallel_job + '|^' + unittest + '$'
            test_cases.remove(unittest)

    for unittest in TETRAD_PARALLEL_JOB:
        if unittest in test_cases:
901
            tetrad_parallel_job = tetrad_parallel_job + '|^' + unittest + '$'
902
            test_cases.remove(unittest)
903

904 905 906 907 908 909 910
    for unittest in TWO_PARALLEL_JOB:
        if unittest in test_cases:
            two_parallel_job = two_parallel_job + '|^' + unittest + '$'
            test_cases.remove(unittest)

    for unittest in test_cases:
        non_parallel_job = non_parallel_job + '|^' + unittest + '$'
911

912 913
    print("{};{};{};{}".format(cpu_parallel_job, tetrad_parallel_job,
                               two_parallel_job, non_parallel_job))
914 915 916 917


if __name__ == '__main__':
    main()