CMakeLists.txt 1.1 KB
Newer Older
1
if(WITH_CUSTOM_DEVICE AND NOT WITH_GPU)
2
  set(PLUGIN_URL https://github.com/PaddlePaddle/PaddleCustomDevice.git)
R
ronnywang 已提交
3
  set(PLUGIN_TAG 0698428ddba21e6baecb690579f37c48896f7d56)
4

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

  foreach(TEST_OP ${TEST_OPS})
R
ronnywang 已提交
12 13 14
    py_test(${TEST_OP}
            SRCS ${TEST_OP}.py ENVS FLAGS_allocator_strategy=naive_best_fit
                 PLUGIN_URL=${PLUGIN_URL} PLUGIN_TAG=${PLUGIN_TAG})
15
  endforeach()
16 17

  bash_test_modules(
18 19 20 21
    test_fleet_launch_custom_device
    START_BASH
    test_fleet_launch_custom_device.sh
    ENVS
R
ronnywang 已提交
22
    FLAGS_allocator_strategy=naive_best_fit
23 24 25
    PADDLE_BINARY_DIR=${PADDLE_BINARY_DIR}
    PLUGIN_URL=${PLUGIN_URL}
    PLUGIN_TAG=${PLUGIN_TAG})
26 27

  set_tests_properties(test_custom_cpu_plugin PROPERTIES TIMEOUT 120)
28
  set_tests_properties(test_custom_cpu_profiler_plugin PROPERTIES TIMEOUT 120)
29
  set_tests_properties(test_fleet_launch_custom_device PROPERTIES TIMEOUT 120)
R
ronnywang 已提交
30
  set_tests_properties(test_custom_cpu_to_static PROPERTIES TIMEOUT 120)
31
endif()