CMakeLists.txt 8.6 KB
Newer Older
1 2
# file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py")
# string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
Z
zhaoyingli 已提交
3

4
if(WITH_DISTRIBUTE AND WITH_GPU)
Z
zhaoyingli 已提交
5 6

  # NOTE(zyl): unittests WITH multi cards and timeout
7
  py_test_modules(test_auto_parallel_relaunch MODULES
Z
zhaoyingli 已提交
8
                  test_auto_parallel_relaunch)
9 10
  set_tests_properties(test_auto_parallel_relaunch
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 120)
Z
zhaoyingli 已提交
11
  py_test_modules(test_relaunch_with_planner MODULES test_relaunch_with_planner)
12 13 14
  set_tests_properties(test_relaunch_with_planner
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 120)
  py_test_modules(test_relaunch_with_gpt_planner MODULES
Z
zhaoyingli 已提交
15
                  test_relaunch_with_gpt_planner)
16 17
  set_tests_properties(test_relaunch_with_gpt_planner
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 240)
Z
zhaoyingli 已提交
18
  py_test_modules(test_engine_api MODULES test_engine_api)
19 20
  set_tests_properties(test_engine_api PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE"
                                                  TIMEOUT 80)
Z
zhaoyingli 已提交
21
  py_test_modules(test_engine_api_dp MODULES test_engine_api_dp)
22 23
  set_tests_properties(test_engine_api_dp
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 80)
24
  py_test_modules(test_optimization_tuner_api MODULES
Z
zhaoyingli 已提交
25
                  test_optimization_tuner_api)
26
  set_tests_properties(test_optimization_tuner_api
TaoTao Li's avatar
TaoTao Li 已提交
27
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 100)
Z
zhaoyingli 已提交
28
  py_test_modules(test_converter MODULES test_converter)
29 30
  set_tests_properties(test_converter PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE"
                                                 TIMEOUT 50)
Z
zhaoyingli 已提交
31
  py_test_modules(test_high_order_grad MODULES test_high_order_grad)
32 33
  set_tests_properties(test_high_order_grad
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 50)
Z
zhaoyingli 已提交
34
  py_test_modules(test_iterable_dataset MODULES test_iterable_dataset)
35 36
  set_tests_properties(test_iterable_dataset
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 80)
Z
zhaoyingli 已提交
37
  py_test_modules(test_pass_grad_clip MODULES test_pass_grad_clip)
38 39
  set_tests_properties(test_pass_grad_clip
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 50)
40 41 42
  py_test_modules(test_random_ctrl MODULES test_random_ctrl)
  set_tests_properties(test_random_ctrl PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE"
                                                   TIMEOUT 50)
Z
zhaoyingli 已提交
43
  py_test_modules(test_pass_gradient_merge MODULES test_pass_gradient_merge)
44 45
  set_tests_properties(test_pass_gradient_merge
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 50)
Z
zhaoyingli 已提交
46
  py_test_modules(test_pass_recompute MODULES test_pass_recompute)
47 48
  set_tests_properties(test_pass_recompute
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 50)
Z
zhaoyingli 已提交
49
  py_test_modules(test_pass_sharding MODULES test_pass_sharding)
50 51
  set_tests_properties(test_pass_sharding
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 50)
Z
zhaoyingli 已提交
52
  py_test_modules(test_pass_amp MODULES test_pass_amp)
53 54
  set_tests_properties(test_pass_amp PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE"
                                                TIMEOUT 50)
55 56 57
  py_test_modules(test_amp_o2_pass MODULES test_amp_o2_pass)
  set_tests_properties(test_amp_o2_pass PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE"
                                                   TIMEOUT 50)
Z
zhaoyingli 已提交
58 59 60
  py_test_modules(test_engine_callbacks MODULES test_engine_callbacks)
  set_tests_properties(test_engine_callbacks
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 50)
61 62 63 64
  py_test_modules(test_pass_generation_pipeline MODULES
                  test_pass_generation_pipeline)
  set_tests_properties(test_pass_generation_pipeline
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 50)
65 66 67
  py_test_modules(test_pass_1F1B MODULES test_pass_1F1B)
  set_tests_properties(test_pass_1F1B PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE"
                                                 TIMEOUT 50)
Z
zhaoyingli 已提交
68 69 70 71 72 73 74
  # End of unittests WITH multi cards and timeout

  # NOTE(zyl): unittests WITH multi cards and WITHOUT timeout
  # End of unittests WITH multi cards and WITHOUT timeout

  # NOTE(zyl): unittests WITH single card and timeout
  py_test_modules(test_parallel_tuner MODULES test_parallel_tuner)
75
  set_tests_properties(test_parallel_tuner PROPERTIES TIMEOUT 120)
Z
zhaoyingli 已提交
76
  py_test_modules(test_parallel_tuner_full MODULES test_parallel_tuner_full)
77 78
  set_tests_properties(test_parallel_tuner_full PROPERTIES TIMEOUT 120)
  py_test_modules(test_parallel_tuner_predict MODULES
Z
zhaoyingli 已提交
79
                  test_parallel_tuner_predict)
80
  set_tests_properties(test_parallel_tuner_predict PROPERTIES TIMEOUT 120)
81 82
  py_test_modules(test_selective_recompute MODULES test_selective_recompute)
  set_tests_properties(test_selective_recompute PROPERTIES TIMEOUT 50)
Z
zhaoyingli 已提交
83
  py_test_modules(test_pass_quantization MODULES test_pass_quantization)
84
  set_tests_properties(test_pass_quantization PROPERTIES TIMEOUT 60)
85
  py_test_modules(test_tuning_recompute MODULES test_tuning_recompute)
86
  set_tests_properties(test_tuning_recompute PROPERTIES TIMEOUT 300)
Y
yuehuayingxueluo 已提交
87 88
  py_test_modules(test_fused_linear_pass MODULES test_fused_linear_pass)
  set_tests_properties(test_fused_linear_pass PROPERTIES TIMEOUT 20)
X
xu98bin 已提交
89 90
  py_test_modules(test_align_tool MODULES test_align_tool)
  set_tests_properties(test_align_tool PROPERTIES TIMEOUT 20)
91 92
  py_test_modules(test_pass_base_list MODULES test_pass_base_list)
  set_tests_properties(test_pass_base_list PROPERTIES TIMEOUT 20)
Y
yuehuayingxueluo 已提交
93 94
  py_test_modules(test_fuse_adamw_pass MODULES test_fuse_adamw_pass)
  set_tests_properties(test_fuse_adamw_pass PROPERTIES TIMEOUT 20)
95 96
  py_test_modules(test_rule_based_tuner_o2 MODULES test_rule_based_tuner_o2)
  set_tests_properties(test_rule_based_tuner_o2 PROPERTIES TIMEOUT 50)
Z
zhaoyingli 已提交
97
  # End of unittests WITH single card and timeout
98

Z
zhaoyingli 已提交
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
  # NOTE(zyl): unittests WITH single card and WITHOUT timeout
  py_test_modules(test_while_op_completion MODULES test_while_op_completion)
  py_test_modules(test_while_op_partition MODULES test_while_op_partition)
  py_test_modules(test_tunable_variable MODULES test_tunable_variable)
  py_test_modules(test_tunable_space MODULES test_tunable_space)
  py_test_modules(test_recorder MODULES test_recorder)
  py_test_modules(test_trial MODULES test_trial)
  py_test_modules(test_new_cost_model MODULES test_new_cost_model)
  py_test_modules(test_dist_reshape MODULES test_dist_reshape)
  py_test_modules(test_dist_pnorm MODULES test_dist_pnorm)
  py_test_modules(test_dist_embedding MODULES test_dist_embedding)
  py_test_modules(test_dist_slice MODULES test_dist_slice)
  py_test_modules(test_dist_split MODULES test_dist_split)
  py_test_modules(test_cluster MODULES test_cluster)
  py_test_modules(test_comm_cost MODULES test_comm_cost)
  py_test_modules(test_comp_cost MODULES test_comp_cost)
  py_test_modules(test_base_cost MODULES test_base_cost)
  py_test_modules(test_dist_context MODULES test_dist_context)
  py_test_modules(test_prim_dist_op MODULES test_prim_dist_op)
  py_test_modules(test_to_static MODULES test_to_static)
  py_test_modules(test_dist_op_cost MODULES test_dist_op_cost)
120 121
  py_test_modules(test_cluster_v2 MODULES test_cluster_v2)
  py_test_modules(test_process_mesh_v2 MODULES test_process_mesh_v2)
122
  py_test_modules(test_dist_attr_v2 MODULES test_dist_attr_v2)
123
  py_test_modules(test_serialization MODULES test_serialization)
124
  py_test_modules(test_lr_grad_clip MODULES test_lr_grad_clip)
125
  py_test_modules(test_dist_matmul MODULES test_dist_matmul)
126 127 128
  py_test_modules(test_process_mesh MODULES test_process_mesh)
  py_test_modules(test_interface MODULES test_interface)
  py_test_modules(test_strategy MODULES test_strategy)
129 130 131 132
  py_test_modules(test_dist_shape MODULES test_dist_shape)
  py_test_modules(test_dist_assign MODULES test_dist_assign)
  py_test_modules(test_conditional_block_reshard MODULES
                  test_conditional_block_reshard)
133
  py_test_modules(test_engine_api_error MODULES test_engine_api_error)
134
  py_test_modules(test_fp16_assign MODULES test_fp16_assign)
C
caozhou 已提交
135
  py_test_modules(test_group_operators MODULES test_group_operators)
136
  py_test_modules(test_pattern MODULES test_pattern)
137
  py_test_modules(test_pattern_match MODULES test_pattern_match)
138 139 140
  py_test_modules(test_cluster_partition MODULES test_cluster_partition)
  py_test_modules(test_convert_to_process_meshes MODULES
                  test_convert_to_process_meshes)
X
xu98bin 已提交
141
  py_test_modules(test_pass_bf16 MODULES test_pass_bf16)
142
  py_test_modules(test_dist_saver MODULES test_dist_saver)
143
  py_test_modules(test_engine_save_load MODULES test_engine_save_load)
144
  py_test_modules(test_rule_based_tuner MODULES test_rule_based_tuner)
Z
zhaoyingli 已提交
145 146
  # End of unittests WITH single card WITHOUT timeout

147
endif()