CMakeLists.txt 9.7 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 5
add_subdirectory(spmd_rules)

6
if(WITH_DISTRIBUTE AND WITH_GPU)
Z
zhaoyingli 已提交
7 8

  # NOTE(zyl): unittests WITH multi cards and timeout
9
  py_test_modules(test_auto_parallel_relaunch MODULES
Z
zhaoyingli 已提交
10
                  test_auto_parallel_relaunch)
11 12
  set_tests_properties(test_auto_parallel_relaunch
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 120)
Z
zhaoyingli 已提交
13
  py_test_modules(test_relaunch_with_planner MODULES test_relaunch_with_planner)
14 15 16
  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 已提交
17
                  test_relaunch_with_gpt_planner)
18 19
  set_tests_properties(test_relaunch_with_gpt_planner
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 240)
Z
zhaoyingli 已提交
20
  py_test_modules(test_engine_api MODULES test_engine_api)
21 22
  set_tests_properties(test_engine_api PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE"
                                                  TIMEOUT 80)
Z
zhaoyingli 已提交
23
  py_test_modules(test_engine_api_dp MODULES test_engine_api_dp)
24 25
  set_tests_properties(test_engine_api_dp
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 80)
26
  py_test_modules(test_optimization_tuner_api MODULES
Z
zhaoyingli 已提交
27
                  test_optimization_tuner_api)
28
  set_tests_properties(test_optimization_tuner_api
29
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 120)
Z
zhaoyingli 已提交
30
  py_test_modules(test_converter MODULES test_converter)
31 32
  set_tests_properties(test_converter PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE"
                                                 TIMEOUT 50)
Z
zhaoyingli 已提交
33
  py_test_modules(test_high_order_grad MODULES test_high_order_grad)
34 35
  set_tests_properties(test_high_order_grad
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 50)
Z
zhaoyingli 已提交
36
  py_test_modules(test_iterable_dataset MODULES test_iterable_dataset)
37 38
  set_tests_properties(test_iterable_dataset
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 80)
Z
zhaoyingli 已提交
39
  py_test_modules(test_pass_grad_clip MODULES test_pass_grad_clip)
40 41
  set_tests_properties(test_pass_grad_clip
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 50)
42 43 44
  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 已提交
45
  py_test_modules(test_pass_gradient_merge MODULES test_pass_gradient_merge)
46 47
  set_tests_properties(test_pass_gradient_merge
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 50)
Z
zhaoyingli 已提交
48
  py_test_modules(test_pass_recompute MODULES test_pass_recompute)
49 50
  set_tests_properties(test_pass_recompute
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 50)
Z
zhaoyingli 已提交
51
  py_test_modules(test_pass_sharding MODULES test_pass_sharding)
52
  set_tests_properties(test_pass_sharding
53
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 100)
Z
zhaoyingli 已提交
54
  py_test_modules(test_pass_amp MODULES test_pass_amp)
55
  set_tests_properties(test_pass_amp PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE"
56
                                                TIMEOUT 80)
57 58 59
  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 已提交
60 61 62
  py_test_modules(test_engine_callbacks MODULES test_engine_callbacks)
  set_tests_properties(test_engine_callbacks
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 50)
63 64 65 66
  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)
67 68 69
  py_test_modules(test_pass_1F1B MODULES test_pass_1F1B)
  set_tests_properties(test_pass_1F1B PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE"
                                                 TIMEOUT 50)
70 71 72
  py_test_modules(test_auto_tuner MODULES test_auto_tuner)
  set_tests_properties(test_auto_tuner PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE"
                                                  TIMEOUT 100)
73 74
  py_test_modules(test_pipeline_scheduler MODULES test_pipeline_scheduler)
  set_tests_properties(test_pipeline_scheduler
75
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 50)
76 77 78
  py_test_modules(test_auto_tuner_compare MODULES test_auto_tuner_compare)
  set_tests_properties(test_auto_tuner_compare
                       PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" TIMEOUT 100)
79 80 81
  py_test_modules(test_pass_quantization MODULES test_pass_quantization)
  set_tests_properties(test_pass_quantization
                       PROPERTIES LABELS "RUN_TYPE=EXECLUSIVE" TIMEOUT 60)
82 83 84
  py_test_modules(test_reshard_s_to_r MODULES test_reshard_s_to_r)
  set_tests_properties(test_reshard_s_to_r
                       PROPERTIES LABELS "RUN_TYPE=EXECLUSIVE" TIMEOUT 100)
85 86 87
  py_test_modules(test_reshard_r_to_s MODULES test_reshard_r_to_s)
  set_tests_properties(test_reshard_r_to_s
                       PROPERTIES LABELS "RUN_TYPE=EXECLUSIVE" TIMEOUT 100)
Z
zhaoyingli 已提交
88 89 90 91 92 93 94
  # 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)
95
  set_tests_properties(test_parallel_tuner PROPERTIES TIMEOUT 120)
Z
zhaoyingli 已提交
96
  py_test_modules(test_parallel_tuner_full MODULES test_parallel_tuner_full)
97 98
  set_tests_properties(test_parallel_tuner_full PROPERTIES TIMEOUT 120)
  py_test_modules(test_parallel_tuner_predict MODULES
Z
zhaoyingli 已提交
99
                  test_parallel_tuner_predict)
100
  set_tests_properties(test_parallel_tuner_predict PROPERTIES TIMEOUT 120)
101 102
  py_test_modules(test_selective_recompute MODULES test_selective_recompute)
  set_tests_properties(test_selective_recompute PROPERTIES TIMEOUT 50)
103
  py_test_modules(test_tuning_recompute MODULES test_tuning_recompute)
104
  set_tests_properties(test_tuning_recompute PROPERTIES TIMEOUT 300)
Y
yuehuayingxueluo 已提交
105
  py_test_modules(test_fused_linear_pass MODULES test_fused_linear_pass)
106
  set_tests_properties(test_fused_linear_pass PROPERTIES TIMEOUT 40)
X
xu98bin 已提交
107 108
  py_test_modules(test_align_tool MODULES test_align_tool)
  set_tests_properties(test_align_tool PROPERTIES TIMEOUT 20)
109
  py_test_modules(test_pass_base_list MODULES test_pass_base_list)
110
  set_tests_properties(test_pass_base_list PROPERTIES TIMEOUT 40)
Y
yuehuayingxueluo 已提交
111 112
  py_test_modules(test_fuse_adamw_pass MODULES test_fuse_adamw_pass)
  set_tests_properties(test_fuse_adamw_pass PROPERTIES TIMEOUT 20)
113 114
  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 已提交
115
  # End of unittests WITH single card and timeout
116

Z
zhaoyingli 已提交
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
  # 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)
138 139
  py_test_modules(test_cluster_v2 MODULES test_cluster_v2)
  py_test_modules(test_process_mesh_v2 MODULES test_process_mesh_v2)
140
  py_test_modules(test_dist_attr_v2 MODULES test_dist_attr_v2)
141
  py_test_modules(test_serialization MODULES test_serialization)
142
  py_test_modules(test_lr_grad_clip MODULES test_lr_grad_clip)
143
  py_test_modules(test_dist_matmul MODULES test_dist_matmul)
144 145 146
  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)
147 148 149 150
  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)
151
  py_test_modules(test_engine_api_error MODULES test_engine_api_error)
152
  py_test_modules(test_fp16_assign MODULES test_fp16_assign)
C
caozhou 已提交
153
  py_test_modules(test_group_operators MODULES test_group_operators)
154
  py_test_modules(test_pattern MODULES test_pattern)
155
  py_test_modules(test_pattern_match MODULES test_pattern_match)
156 157 158
  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 已提交
159
  py_test_modules(test_pass_bf16 MODULES test_pass_bf16)
160
  py_test_modules(test_dist_saver MODULES test_dist_saver)
161
  py_test_modules(test_engine_save_load MODULES test_engine_save_load)
162
  py_test_modules(test_rule_based_tuner MODULES test_rule_based_tuner)
L
LiYuRio 已提交
163
  py_test_modules(test_dist_tensor MODULES test_dist_tensor)
164
  py_test_modules(test_shard_tensor_api MODULES test_shard_tensor_api)
Z
zhaoyingli 已提交
165 166
  # End of unittests WITH single card WITHOUT timeout

167
endif()