CMakeLists.txt 1006 字节
Newer Older
1
if(WITH_CUSTOM_DEVICE AND NOT WITH_GPU)
2
  set(PLUGIN_URL https://github.com/PaddlePaddle/PaddleCustomDevice.git)
3
  set(PLUGIN_TAG b9ae8452f31525d0524810461b17856838acd821)
4

5 6 7 8 9 10
  file(
    GLOB TEST_OPS
    RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
    "test_*.py")
  string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")

11
  list(REMOVE_ITEM TEST_OPS test_collective_process_group_xccl)
12
  foreach(TEST_OP ${TEST_OPS})
13 14
    py_test(${TEST_OP} SRCS ${TEST_OP}.py ENVS PLUGIN_URL=${PLUGIN_URL}
                            PLUGIN_TAG=${PLUGIN_TAG})
15
  endforeach()
16 17

  bash_test_modules(
18 19 20 21 22 23 24
    test_fleet_launch_custom_device
    START_BASH
    test_fleet_launch_custom_device.sh
    ENVS
    PADDLE_BINARY_DIR=${PADDLE_BINARY_DIR}
    PLUGIN_URL=${PLUGIN_URL}
    PLUGIN_TAG=${PLUGIN_TAG})
25 26

  set_tests_properties(test_custom_cpu_plugin PROPERTIES TIMEOUT 120)
27
  set_tests_properties(test_custom_cpu_profiler_plugin PROPERTIES TIMEOUT 120)
28
  set_tests_properties(test_fleet_launch_custom_device PROPERTIES TIMEOUT 120)
29
endif()