# This file is generated by ${PADDLE_ROOT}/tools/gen_ut_cmakelists.py.
# Please don't modify this file manually.
# If you need to change unittests in this file, please modify testslist.csv in the current directory
# and then run the command `python3 ${PADDLE_ROOT}/tools/gen_ut_cmakelists.py -f ${CURRENT_DIRECTORY}/testslist.csv`
set(LOCAL_ALL_ARCH ON)
set(LOCAL_ALL_PLAT ON)
if(WITH_DGC)
  if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
    py_test_modules(
      test_dgc_op MODULES test_dgc_op ENVS
      "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
  endif()
endif()
if(WITH_DGC)
  if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
    py_test_modules(
      test_dgc_optimizer MODULES test_dgc_optimizer ENVS
      "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
  endif()
endif()
if(WITH_NCCL)
  if((WITH_GPU) AND LOCAL_ALL_PLAT)
    bash_test_modules(
      test_parallel_margin_cross_entropy
      START_BASH
      ../../legacy_test/dist_test.sh
      TIMEOUT
      "120"
      LABELS
      "RUN_TYPE=DIST"
      ENVS
      "PADDLE_DIST_UT_PORT=21200;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
    )
    set_tests_properties(test_parallel_margin_cross_entropy PROPERTIES TIMEOUT
                                                                       "120")
  endif()
endif()
if(WITH_NCCL)
  if(${NCCL_VERSION} VERSION_GREATER_EQUAL 2212)
    if((WITH_GPU) AND LOCAL_ALL_PLAT)
      bash_test_modules(
        test_parallel_dygraph_transformer
        START_BASH
        ../../legacy_test/dist_test.sh
        LABELS
        "RUN_TYPE=DIST"
        ENVS
        "PADDLE_DIST_UT_PORT=21204;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
      )
    endif()
  endif()
endif()
if((WITH_ROCM) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_transformer
    START_BASH
    ../../legacy_test/dist_test.sh
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21204;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
endif()
if(WITH_NCCL
   OR WITH_RCCL
   OR WITH_XPU_BKCL)
  if((WITH_GPU
      OR WITH_ROCM
      OR WITH_XPU)
     AND LOCAL_ALL_PLAT)
    bash_test_modules(
      test_parallel_dygraph_mp_layers
      START_BASH
      ../../legacy_test/dist_test.sh
      TIMEOUT
      "120"
      LABELS
      "RUN_TYPE=DIST"
      ENVS
      "PADDLE_DIST_UT_PORT=21210;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
    )
    set_tests_properties(test_parallel_dygraph_mp_layers PROPERTIES TIMEOUT
                                                                    "120")
  endif()
endif()
if((WITH_ROCM) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_mp_model
    START_BASH
    ../../legacy_test/dist_test.sh
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21205;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
endif()
if(LOCAL_ALL_ARCH AND (LINUX OR APPLE))
  bash_test_modules(
    test_tcp_store
    START_BASH
    ../../legacy_test/dist_test.sh
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21212;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_dygraph_sharding_stage3_for_eager
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "350"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21214;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python;ROCBLAS_ATOMICS_MOD=0"
  )
  set_tests_properties(test_dygraph_sharding_stage3_for_eager PROPERTIES TIMEOUT
                                                                         "350")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_dygraph_sharding_stage3_bf16
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=22038;NVIDIA_TF32_OVERRIDE=0;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_dygraph_sharding_stage3_bf16 PROPERTIES TIMEOUT
                                                                    "200")
endif()
if((WITH_GPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_pipeline_parallel
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "600"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21218;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_pipeline_parallel
                       PROPERTIES TIMEOUT "600")
endif()
if((WITH_GPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_pipeline_parallel_shared_weight
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "600"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21328;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_pipeline_parallel_shared_weight
                       PROPERTIES TIMEOUT "600")
endif()
if((WITH_GPU OR WITH_XPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_pipeline_parallel_sync_send
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "300"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21992;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python;PADDLE_P2P_SYNC_SEND=1"
  )
  set_tests_properties(test_parallel_dygraph_pipeline_parallel_sync_send
                       PROPERTIES TIMEOUT "300")
endif()
if((WITH_GPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_pipeline_parallel_with_virtual_stage
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "500"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21282;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(
    test_parallel_dygraph_pipeline_parallel_with_virtual_stage
    PROPERTIES TIMEOUT "500")
endif()
if((WITH_GPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_pp_adaptor
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "500"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21976;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_pp_adaptor PROPERTIES TIMEOUT
                                                                   "500")
endif()
if(WITH_NCCL)
  if((WITH_GPU) AND LOCAL_ALL_PLAT)
    bash_test_modules(
      test_parallel_class_center_sample
      START_BASH
      ../../legacy_test/dist_test.sh
      TIMEOUT
      "120"
      LABELS
      "RUN_TYPE=DIST"
      ENVS
      "PADDLE_DIST_UT_PORT=21220;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
    )
    set_tests_properties(test_parallel_class_center_sample PROPERTIES TIMEOUT
                                                                      "120")
  endif()
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_static_model_parallel
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "240"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21224;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_static_model_parallel PROPERTIES TIMEOUT "240")
endif()
if(WITH_NCCL)
  if((WITH_GPU) AND LOCAL_ALL_PLAT)
    bash_test_modules(
      test_parallel_dygraph_no_sync
      START_BASH
      ../../legacy_test/dist_test.sh
      TIMEOUT
      "300"
      LABELS
      "RUN_TYPE=DIST"
      ENVS
      "PADDLE_DIST_UT_PORT=21226;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
    )
    set_tests_properties(test_parallel_dygraph_no_sync PROPERTIES TIMEOUT "300")
  endif()
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_dygraph_dataparallel_bf16
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=22024;NVIDIA_TF32_OVERRIDE=0;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_dygraph_dataparallel_bf16 PROPERTIES TIMEOUT "200")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_dygraph_sharding_stage2
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21228;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_dygraph_sharding_stage2 PROPERTIES TIMEOUT "200")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_dygraph_sharding_stage2_bf16
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=22024;NVIDIA_TF32_OVERRIDE=0;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_dygraph_sharding_stage2_bf16 PROPERTIES TIMEOUT
                                                                    "200")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_dygraph_sharding_stage1_bf16
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=22024;NVIDIA_TF32_OVERRIDE=0;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_dygraph_sharding_stage1_bf16 PROPERTIES TIMEOUT
                                                                    "200")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_dygraph_sharding_stage1_fp16
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=22024;NVIDIA_TF32_OVERRIDE=0;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_dygraph_sharding_stage1_fp16 PROPERTIES TIMEOUT
                                                                    "200")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_control_flow
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "350"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21230;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_control_flow PROPERTIES TIMEOUT
                                                                     "350")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  py_test_modules(
    test_fleet_rolemaker_new MODULES test_fleet_rolemaker_new ENVS
    "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  py_test_modules(
    test_recv_save_op MODULES test_recv_save_op ENVS
    "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
endif()

if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_sharding_parallel
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "400"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21242;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_sharding_parallel
                       PROPERTIES TIMEOUT "400")
endif()
if((WITH_GPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_sharding_parallel_chunkoffload
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "600"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21218;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_sharding_parallel_chunkoffload
                       PROPERTIES TIMEOUT "600")
endif()
if((WITH_GPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_sharding_parallel_rebuild
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "600"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21218;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_sharding_parallel_rebuild
                       PROPERTIES TIMEOUT "600")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_tensor_parallel
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21244;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_tensor_parallel PROPERTIES TIMEOUT
                                                                        "200")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_sep_parallel
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "120"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21242;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_sep_parallel PROPERTIES TIMEOUT
                                                                     "120")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_dygraph_group_sharded_api_for_eager
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "120"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21246;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_dygraph_group_sharded_api_for_eager
                       PROPERTIES TIMEOUT "120")
endif()
if(LOCAL_ALL_ARCH AND (LINUX OR WIN32))
  py_test_modules(
    test_fleet_distributed_strategy MODULES test_fleet_distributed_strategy
    ENVS
    "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_unused_variables
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "350"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21248;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_unused_variables PROPERTIES TIMEOUT
                                                                         "350")
endif()
if(WITH_DGC)
  if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
    py_test_modules(
      test_dgc_momentum_op MODULES test_dgc_momentum_op ENVS
      "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
  endif()
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_no_sync_gradient_check
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "60"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21250;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_no_sync_gradient_check
                       PROPERTIES TIMEOUT "60")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_qat
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "120"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21254;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_qat PROPERTIES TIMEOUT "120")
endif()
if(WITH_NCCL)
  if(${NCCL_VERSION} VERSION_GREATER_EQUAL 2212)
    if((WITH_GPU) AND LOCAL_ALL_PLAT)
      bash_test_modules(
        test_parallel_dygraph_sparse_embedding
        START_BASH
        ../../legacy_test/dist_test.sh
        TIMEOUT
        "200"
        LABELS
        "RUN_TYPE=DIST"
        ENVS
        "PADDLE_DIST_UT_PORT=21256;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
      )
      set_tests_properties(test_parallel_dygraph_sparse_embedding
                           PROPERTIES TIMEOUT "200")
    endif()
  endif()
endif()
if((WITH_ROCM) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_sparse_embedding
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21256;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_sparse_embedding PROPERTIES TIMEOUT
                                                                         "200")
endif()
if(WITH_NCCL)
  if(${NCCL_VERSION} VERSION_GREATER_EQUAL 2212)
    if((WITH_GPU) AND LOCAL_ALL_PLAT)
      bash_test_modules(
        test_parallel_dygraph_sparse_embedding_over_height
        START_BASH
        ../../legacy_test/dist_test.sh
        TIMEOUT
        "150"
        LABELS
        "RUN_TYPE=DIST"
        ENVS
        "PADDLE_DIST_UT_PORT=21260;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
      )
      set_tests_properties(test_parallel_dygraph_sparse_embedding_over_height
                           PROPERTIES TIMEOUT "150")
    endif()
  endif()
endif()
if((WITH_ROCM) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_sparse_embedding_over_height
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "350"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21260;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_sparse_embedding_over_height
                       PROPERTIES TIMEOUT "350")
endif()
if(LOCAL_ALL_ARCH AND (LINUX OR APPLE))
  py_test_modules(
    test_distributed_strategy MODULES test_distributed_strategy ENVS
    "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
endif()
if((WITH_GPU OR WITH_XPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_new_group
    START_BASH
    test_new_group.sh
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21268;http_proxy=;https_proxy=")
endif()
if((WITH_GPU OR WITH_XPU) AND (LINUX))
  bash_test_modules(
    test_c_comm_init_op
    START_BASH
    test_c_comm_init_op.sh
    TIMEOUT
    "120"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21270;http_proxy=;https_proxy=;FLAGS_enable_pir_api=0")
  set_tests_properties(test_c_comm_init_op PROPERTIES TIMEOUT "120")
endif()
if((WITH_GPU OR WITH_ROCM) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_mnist
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21274;NVIDIA_TF32_OVERRIDE=0;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_mnist PROPERTIES TIMEOUT "200")
endif()
if((WITH_GPU OR WITH_ROCM) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_parallel_dygraph_se_resnext
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21276;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_parallel_dygraph_se_resnext PROPERTIES TIMEOUT
                                                                   "200")
endif()
if((WITH_GPU OR WITH_ROCM) AND LOCAL_ALL_PLAT)
  py_test_modules(
    test_parallel_dygraph_sync_batch_norm MODULES
    test_parallel_dygraph_sync_batch_norm ENVS
    "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
  set_tests_properties(test_parallel_dygraph_sync_batch_norm
                       PROPERTIES TIMEOUT "120" LABELS "RUN_TYPE=DIST")
endif()
if((WITH_GPU OR WITH_ROCM) AND LOCAL_ALL_PLAT)
  py_test_modules(
    test_imperative_auto_mixed_precision_for_eager MODULES
    test_imperative_auto_mixed_precision_for_eager ENVS
    "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
  set_tests_properties(test_imperative_auto_mixed_precision_for_eager
                       PROPERTIES TIMEOUT "300" LABELS "RUN_TYPE=DIST")
endif()
if((WITH_GPU
    OR WITH_ROCM
    OR WITH_XPU)
   AND LOCAL_ALL_PLAT)
  py_test_modules(
    test_dygraph_recompute_for_eager MODULES test_dygraph_recompute_for_eager
    ENVS
    "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
endif()
if((WITH_GPU
    OR WITH_ROCM
    OR WITH_XPU)
   AND LOCAL_ALL_PLAT)
  py_test_modules(
    test_dygraph_recompute MODULES test_dygraph_recompute ENVS
    "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
endif()
if(WITH_NCCL OR WITH_RCCL)
  if(WITH_DGC)
    if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
      bash_test_modules(
        test_dist_se_resnext_dgc
        START_BASH
        ../../legacy_test/dist_test.sh
        LABELS
        "RUN_TYPE=DIST"
        ENVS
        "PADDLE_DIST_UT_PORT=21280;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
      )
    endif()
  endif()
endif()
if(LOCAL_ALL_ARCH AND (LINUX))
  bash_test_modules(
    test_auto_checkpoint
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=EXCLUSIVE:NIGHTLY"
    ENVS
    "PADDLE_DIST_UT_PORT=21380;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_auto_checkpoint PROPERTIES TIMEOUT "200")
endif()
if(LOCAL_ALL_ARCH AND (LINUX))
  bash_test_modules(
    test_auto_checkpoint1
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=EXCLUSIVE:NIGHTLY"
    ENVS
    "PADDLE_DIST_UT_PORT=21382;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_auto_checkpoint1 PROPERTIES TIMEOUT "200")
endif()
if(LOCAL_ALL_ARCH AND (LINUX))
  bash_test_modules(
    test_auto_checkpoint2
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=EXCLUSIVE:NIGHTLY"
    ENVS
    "PADDLE_DIST_UT_PORT=21384;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_auto_checkpoint2 PROPERTIES TIMEOUT "200")
endif()
if(LOCAL_ALL_ARCH AND (LINUX))
  bash_test_modules(
    test_auto_checkpoint3
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=EXCLUSIVE:NIGHTLY"
    ENVS
    "PADDLE_DIST_UT_PORT=21386;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_auto_checkpoint3 PROPERTIES TIMEOUT "200")
endif()
if(LOCAL_ALL_ARCH AND (LINUX))
  bash_test_modules(
    test_auto_checkpoint_multiple
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=EXCLUSIVE:NIGHTLY"
    ENVS
    "PADDLE_DIST_UT_PORT=21388;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_auto_checkpoint_multiple PROPERTIES TIMEOUT "200")
endif()
if(LOCAL_ALL_ARCH AND (LINUX))
  bash_test_modules(
    test_auto_checkpoint_dist_basic
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=EXCLUSIVE:NIGHTLY"
    ENVS
    "PADDLE_DIST_UT_PORT=21390;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_auto_checkpoint_dist_basic PROPERTIES TIMEOUT "200")
endif()
if(LOCAL_ALL_ARCH AND (LINUX))
  bash_test_modules(
    test_hdfs1
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=EXCLUSIVE:NIGHTLY"
    ENVS
    "PADDLE_DIST_UT_PORT=21392;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_hdfs1 PROPERTIES TIMEOUT "200")
endif()
if(LOCAL_ALL_ARCH AND (LINUX))
  bash_test_modules(
    test_hdfs2
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=EXCLUSIVE:NIGHTLY"
    ENVS
    "PADDLE_DIST_UT_PORT=21394;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_hdfs2 PROPERTIES TIMEOUT "200")
endif()
if(LOCAL_ALL_ARCH AND (LINUX))
  bash_test_modules(
    test_hdfs3
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=EXCLUSIVE:NIGHTLY"
    ENVS
    "PADDLE_DIST_UT_PORT=21396;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_hdfs3 PROPERTIES TIMEOUT "200")
endif()
if((WITH_GPU OR WITH_ROCM) AND (LINUX))
  py_test_modules(
    test_fleet_checkpoint MODULES test_fleet_checkpoint ENVS
    "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
  set_tests_properties(
    test_fleet_checkpoint PROPERTIES TIMEOUT "200" LABELS
                                     "RUN_TYPE=EXCLUSIVE:NIGHTLY")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  py_test_modules(
    test_fleet_log MODULES test_fleet_log ENVS
    "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
  set_tests_properties(test_fleet_log PROPERTIES TIMEOUT "200" LABELS
                                                 "RUN_TYPE=DIST")
endif()
if((WITH_GPU) AND (LINUX))
  py_test_modules(
    test_dygraph_dist_save_load MODULES test_dygraph_dist_save_load ENVS
    "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
  set_tests_properties(test_dygraph_dist_save_load
                       PROPERTIES TIMEOUT "300" LABELS "RUN_TYPE=DIST")
endif()
if((WITH_GPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_dualpipe
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "500"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21282;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_dualpipe PROPERTIES TIMEOUT "500")
endif()
if(LOCAL_ALL_ARCH AND (LINUX OR APPLE))
  bash_test_modules(
    test_zero_bubble_utils
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "500"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21212;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
endif()
if((WITH_GPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_shutdown_process_group
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "200"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=22024;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_shutdown_process_group PROPERTIES TIMEOUT "200")
endif()
if((WITH_GPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_pp_send_recv_dict
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "500"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21282;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_pp_send_recv_dict PROPERTIES TIMEOUT "500")
endif()
if((WITH_GPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_pp_unified_dygraph_model
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "500"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21282;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_pp_unified_dygraph_model PROPERTIES TIMEOUT "500")
endif()
if((WITH_GPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_sharding_stage3_bugfix
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "500"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21282;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_sharding_stage3_bugfix PROPERTIES TIMEOUT "500")
endif()
if((WITH_GPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_pp_layers
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "500"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21282;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_pp_layers PROPERTIES TIMEOUT "500")
endif()
if((WITH_GPU) AND LOCAL_ALL_PLAT)
  bash_test_modules(
    test_pp_with_shared_weight
    START_BASH
    ../../legacy_test/dist_test.sh
    TIMEOUT
    "500"
    LABELS
    "RUN_TYPE=DIST"
    ENVS
    "PADDLE_DIST_UT_PORT=21282;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
  )
  set_tests_properties(test_pp_with_shared_weight PROPERTIES TIMEOUT "500")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  py_test_modules(
    test_layer_spec MODULES test_layer_spec ENVS
    "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
endif()
if(LOCAL_ALL_ARCH AND LOCAL_ALL_PLAT)
  py_test_modules(
    test_schedule_node MODULES test_schedule_node ENVS
    "http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python")
endif()
if(WITH_NCCL)
  if((WITH_GPU) AND LOCAL_ALL_PLAT)
    bash_test_modules(
      test_parallel_dygraph_muon
      START_BASH
      ../../legacy_test/dist_test.sh
      TIMEOUT
      "400"
      LABELS
      "RUN_TYPE=DIST"
      ENVS
      "PADDLE_DIST_UT_PORT=22348;http_proxy=;https_proxy=;PYTHONPATH=../..:${PADDLE_BINARY_DIR}/python"
    )
    set_tests_properties(test_parallel_dygraph_muon PROPERTIES TIMEOUT "400")
  endif()
endif()
