@ -3,30 +3,20 @@ string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
set ( GC_ENVS FLAGS_eager_delete_tensor_gb=0.0 FLAGS_fast_eager_deletion_mode=1 FLAGS_memory_fraction_of_eager_deletion=1.0 )
set ( GC_ENVS FLAGS_eager_delete_tensor_gb=0.0 FLAGS_fast_eager_deletion_mode=1 FLAGS_memory_fraction_of_eager_deletion=1.0 )
set ( dist_ENVS http_proxy= "" https_proxy= "" )
set ( dist_ENVS http_proxy= "" https_proxy= "" )
if ( NOT WITH_DISTRIBUTE )
file ( GLOB DIST_TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_dist_*.py" )
list ( REMOVE_ITEM TEST_OPS test_recv_op )
string ( REPLACE ".py" "" DIST_TEST_OPS "${DIST_TEST_OPS}" )
list ( REMOVE_ITEM TEST_OPS test_dist_transpiler )
set ( MIXED_DIST_TEST_OPS ${ DIST_TEST_OPS } )
list ( REMOVE_ITEM TEST_OPS test_simple_dist_transpiler )
# r e m o v e d i s t r i b u t e u n i t t e s t s .
list ( REMOVE_ITEM TEST_OPS test_listen_and_serv_op )
list ( APPEND MIXED_DIST_TEST_OPS test_dgc_op )
LIST ( REMOVE_ITEM TEST_OPS test_dist_mnist )
list ( APPEND MIXED_DIST_TEST_OPS test_simple_dist_transpiler )
LIST ( REMOVE_ITEM TEST_OPS test_dist_mnist_fleetapi )
list ( APPEND MIXED_DIST_TEST_OPS test_listen_and_serv_op )
LIST ( REMOVE_ITEM TEST_OPS test_dist_mnist_dgc_nccl )
list ( APPEND MIXED_DIST_TEST_OPS test_nce_remote_table_op )
LIST ( REMOVE_ITEM TEST_OPS test_dist_mnist_hallreduce )
list ( APPEND MIXED_DIST_TEST_OPS test_hsigmoid_remote_table_op )
LIST ( REMOVE_ITEM TEST_OPS test_dist_mnist_multi_comm )
list ( APPEND MIXED_DIST_TEST_OPS test_lookup_remote_table_op )
LIST ( REMOVE_ITEM TEST_OPS test_dist_mnist_ring_allreduce )
list ( APPEND MIXED_DIST_TEST_OPS test_launch )
LIST ( REMOVE_ITEM TEST_OPS test_dist_mnist_backward_deps )
foreach ( TEST_OP ${ MIXED_DIST_TEST_OPS } )
LIST ( REMOVE_ITEM TEST_OPS test_dist_mnist_lars )
list ( REMOVE_ITEM TEST_OPS ${ TEST_OP } )
LIST ( REMOVE_ITEM TEST_OPS test_dist_word2vec )
endforeach ( )
LIST ( REMOVE_ITEM TEST_OPS test_dist_ctr )
LIST ( REMOVE_ITEM TEST_OPS test_dist_simnet_bow )
LIST ( REMOVE_ITEM TEST_OPS test_dist_mnist_batch_merge )
LIST ( REMOVE_ITEM TEST_OPS test_dist_text_classification )
LIST ( REMOVE_ITEM TEST_OPS test_nce_remote_table_op )
LIST ( REMOVE_ITEM TEST_OPS test_hsigmoid_remote_table_op )
LIST ( REMOVE_ITEM TEST_OPS test_dist_fleet_ctr )
LIST ( REMOVE_ITEM TEST_OPS test_dist_fleet_geo )
endif ( NOT WITH_DISTRIBUTE )
if ( NOT WITH_GPU OR WIN32 )
if ( NOT WITH_GPU OR WIN32 )
LIST ( REMOVE_ITEM TEST_OPS test_c_comm_init_all_op )
LIST ( REMOVE_ITEM TEST_OPS test_c_comm_init_all_op )
@ -43,8 +33,6 @@ if(WIN32)
LIST ( REMOVE_ITEM TEST_OPS test_avoid_twice_initialization )
LIST ( REMOVE_ITEM TEST_OPS test_avoid_twice_initialization )
endif ( )
endif ( )
LIST ( REMOVE_ITEM TEST_OPS test_launch )
if ( NOT ${ WITH_GPU } )
if ( NOT ${ WITH_GPU } )
LIST ( REMOVE_ITEM TEST_OPS test_conv2d_fusion_op )
LIST ( REMOVE_ITEM TEST_OPS test_conv2d_fusion_op )
LIST ( REMOVE_ITEM TEST_OPS test_parallel_dygraph_mnist ) # TODO ( Yancey1989 ) : p a r a l l e l d y g r a p h s u p p o r t C P U d e v i c e i n f u t u r e
LIST ( REMOVE_ITEM TEST_OPS test_parallel_dygraph_mnist ) # TODO ( Yancey1989 ) : p a r a l l e l d y g r a p h s u p p o r t C P U d e v i c e i n f u t u r e
@ -70,14 +58,7 @@ if(APPLE)
message ( WARNING "These tests has been disabled in OSX before being fixed:\n test_fuse_elewise_add_act_pass \n test_detection_map_op \n test_dist_se_resnext_*" )
message ( WARNING "These tests has been disabled in OSX before being fixed:\n test_fuse_elewise_add_act_pass \n test_detection_map_op \n test_dist_se_resnext_*" )
# t h i s o p i s n o t s u p p o r t o n m a c
# t h i s o p i s n o t s u p p o r t o n m a c
list ( REMOVE_ITEM TEST_OPS test_fusion_seqexpand_concat_fc_op )
list ( REMOVE_ITEM TEST_OPS test_fusion_seqexpand_concat_fc_op )
# T O D O : a d d t h e u n i t e s t b a c k w h e n i t f i x e d
list ( REMOVE_ITEM TEST_OPS test_detection_map_op )
list ( REMOVE_ITEM TEST_OPS test_detection_map_op )
list ( REMOVE_ITEM TEST_OPS test_dist_se_resnext_dgc )
list ( REMOVE_ITEM TEST_OPS test_dist_se_resnext_sync )
list ( REMOVE_ITEM TEST_OPS test_dist_se_resnext_async )
list ( REMOVE_ITEM TEST_OPS test_dist_se_resnext_sync_with_memopt )
# TODO ( tangwei12 ) : a d d t h e u n i t e s t b a c k w h e n i t f i x e d
list ( REMOVE_ITEM TEST_OPS test_dist_word2vec )
list ( REMOVE_ITEM TEST_OPS test_fuse_elewise_add_act_pass )
list ( REMOVE_ITEM TEST_OPS test_fuse_elewise_add_act_pass )
endif ( )
endif ( )
if ( NOT WITH_MKLML )
if ( NOT WITH_MKLML )
@ -130,39 +111,36 @@ function(bash_test_modules TARGET_NAME)
set ( options SERIAL )
set ( options SERIAL )
set ( oneValueArgs "" )
set ( oneValueArgs "" )
set ( multiValueArgs MODULES DEPS ENVS )
set ( multiValueArgs MODULES DEPS ENVS LABELS )
cmake_parse_arguments ( bash_test_modules "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ ARGN } )
cmake_parse_arguments ( bash_test_modules "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ ARGN } )
message ( STATUS "CMAKE_CURRENT_BINARY_DIR:" ${ CMAKE_CURRENT_BINARY_DIR } )
set ( timeout 350 )
if ( ${ bash_test_modules_TIMEOUT } )
set ( timeout ${ bash_test_modules_TIMEOUT } )
endif ( )
add_test ( NAME ${ TARGET_NAME }
add_test ( NAME ${ TARGET_NAME }
C O M M A N D $ { C M A K E _ C O M M A N D } - E e n v P Y T H O N P A T H = $ { P A D D L E _ B I N A R Y _ D I R } / p y t h o n $ { b a s h _ t e s t _ m o d u l e s _ E N V S }
C O M M A N D $ { C M A K E _ C O M M A N D } - E e n v P Y T H O N P A T H = $ { P A D D L E _ B I N A R Y _ D I R } / p y t h o n
T E S T _ T A R G E T _ N A M E = $ { T A R G E T _ N A M E } T E S T _ T I M E O U T = $ { t i m e o u t } $ { b a s h _ t e s t _ m o d u l e s _ E N V S }
b a s h $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / $ { b a s h _ t e s t _ m o d u l e s _ M O D U L E S }
b a s h $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / $ { b a s h _ t e s t _ m o d u l e s _ M O D U L E S }
W O R K I N G _ D I R E C T O R Y $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } )
W O R K I N G _ D I R E C T O R Y $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } )
if ( bash_test_modules_SERIAL )
if ( bash_test_modules_SERIAL )
set_property ( TEST ${ TARGET_NAME } PROPERTY RUN_SERIAL 1 )
set_property ( TEST ${ TARGET_NAME } PROPERTY RUN_SERIAL 1 )
endif ( )
endif ( )
set_tests_properties ( ${ TARGET_NAME } PROPERTIES TIMEOUT 600 )
if ( bash_test_modules_LABELS )
set_tests_properties ( ${ TARGET_NAME } PROPERTIES TIMEOUT ${ timeout } LABELS ${ bash_test_modules_LABELS } )
else ( )
set_tests_properties ( ${ TARGET_NAME } PROPERTIES TIMEOUT ${ timeout } )
endif ( )
endfunction ( )
endfunction ( )
list ( REMOVE_ITEM TEST_OPS test_warpctc_op )
list ( REMOVE_ITEM TEST_OPS test_warpctc_op )
LIST ( REMOVE_ITEM TEST_OPS test_lookup_remote_table_op )
LIST ( REMOVE_ITEM TEST_OPS test_hsigmoid_remote_table_op )
LIST ( REMOVE_ITEM TEST_OPS test_nce_remote_table_op )
LIST ( REMOVE_ITEM TEST_OPS test_dist_train )
LIST ( REMOVE_ITEM TEST_OPS test_listen_and_serv_op )
list ( REMOVE_ITEM TEST_OPS test_dist_transpiler )
list ( REMOVE_ITEM TEST_OPS test_parallel_executor_crf )
list ( REMOVE_ITEM TEST_OPS test_parallel_executor_crf )
list ( REMOVE_ITEM TEST_OPS test_parallel_executor_crf_auto_growth )
list ( REMOVE_ITEM TEST_OPS test_parallel_executor_crf_auto_growth )
list ( REMOVE_ITEM TEST_OPS test_parallel_executor_fetch_feed )
list ( REMOVE_ITEM TEST_OPS test_parallel_executor_fetch_feed )
list ( REMOVE_ITEM TEST_OPS test_dist_se_resnext_dgc )
list ( REMOVE_ITEM TEST_OPS test_dist_se_resnext_sync )
list ( REMOVE_ITEM TEST_OPS test_dist_se_resnext_async )
list ( REMOVE_ITEM TEST_OPS test_dist_se_resnext_sync_with_memopt )
list ( REMOVE_ITEM TEST_OPS test_dgc_op )
list ( REMOVE_ITEM TEST_OPS test_dist_se_resnext_nccl )
list ( REMOVE_ITEM TEST_OPS test_dist_transformer )
list ( REMOVE_ITEM TEST_OPS test_parallel_executor_transformer )
list ( REMOVE_ITEM TEST_OPS test_parallel_executor_transformer )
list ( REMOVE_ITEM TEST_OPS test_parallel_executor_transformer_auto_growth )
list ( REMOVE_ITEM TEST_OPS test_parallel_executor_transformer_auto_growth )
list ( REMOVE_ITEM TEST_OPS test_bilinear_interp_op )
list ( REMOVE_ITEM TEST_OPS test_bilinear_interp_op )
@ -255,49 +233,24 @@ py_test_modules(test_install_check MODULES test_install_check ENVS
set_tests_properties ( test_install_check PROPERTIES LABELS "RUN_TYPE=DIST" )
set_tests_properties ( test_install_check PROPERTIES LABELS "RUN_TYPE=DIST" )
py_test_modules ( test_imperative_debug_string MODULES test_imperative_debug_string ENVS FLAGS_dygraph_debug=1 )
py_test_modules ( test_imperative_debug_string MODULES test_imperative_debug_string ENVS FLAGS_dygraph_debug=1 )
if ( WITH_DISTRIBUTE )
if ( WITH_DISTRIBUTE )
py_test_modules ( test_dist_train MODULES test_dist_train ENVS ${ dist_ENVS } )
# FIXME ( typhoonzero ) : a d d t h e s e t e s t s b a c k
list ( REMOVE_ITEM DIST_TEST_OPS "test_dist_transformer" )
list ( REMOVE_ITEM DIST_TEST_OPS "test_dist_transpiler" )
py_test_modules ( test_lookup_remote_table_op MODULES test_lookup_remote_table_op ENVS ${ dist_ENVS } )
py_test_modules ( test_lookup_remote_table_op MODULES test_lookup_remote_table_op ENVS ${ dist_ENVS } )
py_test_modules ( test_hsigmoid_remote_table_op MODULES test_hsigmoid_remote_table_op ENVS ${ dist_ENVS } )
py_test_modules ( test_hsigmoid_remote_table_op MODULES test_hsigmoid_remote_table_op ENVS ${ dist_ENVS } )
py_test_modules ( test_nce_remote_table_op MODULES test_nce_remote_table_op ENVS ${ dist_ENVS } )
py_test_modules ( test_nce_remote_table_op MODULES test_nce_remote_table_op ENVS ${ dist_ENVS } )
# py_test_modules ( test_listen_and_serv_op MODULES test_listen_and_serv_op ENVS ${ dist_ENVS } )
if ( WITH_DGC )
if ( WITH_DGC )
py_test_modules ( test_dgc_op MODULES test_dgc_op )
py_test_modules ( test_dgc_op MODULES test_dgc_op )
endif ( )
endif ( )
if ( NOT APPLE )
if ( NOT APPLE )
bash_test_modules ( test_listen_and_serv_op MODULES test_listen_and_serv.sh )
bash_test_modules ( test_listen_and_serv_op MODULES test_listen_and_serv.sh )
set_tests_properties ( test_listen_and_serv_op PROPERTIES TIMEOUT 100 LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_nce_remote_table_op test_hsigmoid_remote_table_op test_dist_ctr test_dist_fleet_ctr test_dist_mnist_batch_merge PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_dist_mnist PROPERTIES TIMEOUT 350 LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_dist_mnist_dgc_nccl PROPERTIES TIMEOUT 350 LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_dist_mnist_hallreduce PROPERTIES TIMEOUT 350 LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_dist_mnist_multi_comm PROPERTIES TIMEOUT 350 LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_dist_mnist_ring_allreduce PROPERTIES TIMEOUT 350 LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_dist_mnist_backward_deps PROPERTIES TIMEOUT 350 LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_dist_mnist_fleetapi PROPERTIES TIMEOUT 350 LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_dist_mnist_lars PROPERTIES TIMEOUT 350 LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_dist_word2vec PROPERTIES TIMEOUT 350 LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_dist_simnet_bow PROPERTIES TIMEOUT 350 LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_dist_text_classification PROPERTIES TIMEOUT 350 LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
list ( REMOVE_ITEM TEST_OPS test_dist_se_resnext_dgc )
list ( REMOVE_ITEM TEST_OPS test_dist_se_resnext_sync )
list ( REMOVE_ITEM TEST_OPS test_dist_se_resnext_async )
list ( REMOVE_ITEM TEST_OPS test_dist_se_resnext_sync_with_memopt )
py_test_modules ( test_dist_se_resnext_dgc MODULES test_dist_se_resnext_dgc )
py_test_modules ( test_dist_se_resnext_sync MODULES test_dist_se_resnext_sync )
py_test_modules ( test_dist_se_resnext_nccl MODULES test_dist_se_resnext_nccl )
bash_test_modules ( test_launch MODULES test_launch.sh )
bash_test_modules ( test_launch MODULES test_launch.sh )
# FIXME ( typhoonzero ) : a d d t h e s e t e s t s b a c k
foreach ( TEST_OP ${ DIST_TEST_OPS } )
# py_test_modules ( test_dist_transformer MODULES test_dist_transformer )
bash_test_modules ( ${ TEST_OP } MODULES dist_test.sh SERIAL LABELS "RUN_TYPE=EXCLUSIVE" )
# set_tests_properties ( test_dist_transformer PROPERTIES TIMEOUT 1000 )
endforeach ( TEST_OP )
set_tests_properties ( test_dist_se_resnext_dgc PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_dist_se_resnext_sync PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
set_tests_properties ( test_dist_se_resnext_nccl PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE" RUN_SERIAL TRUE )
endif ( NOT APPLE )
endif ( NOT APPLE )
# py_test_modules ( test_dist_transpiler MODULES test_dist_transpiler )
endif ( )
endif ( )
py_test_modules ( test_parallel_executor_crf MODULES test_parallel_executor_crf )
py_test_modules ( test_parallel_executor_crf MODULES test_parallel_executor_crf )