CMakeLists.txt 1.7 KB
Newer Older
1 2 3 4
file(
  GLOB TEST_INTERP_CASES
  RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
  "test_*.py")
H
hong 已提交
5 6 7
string(REPLACE ".py" "" TEST_INTERP_CASES "${TEST_INTERP_CASES}")

foreach(target ${TEST_INTERP_CASES})
8 9 10 11 12 13 14 15 16 17 18
  py_test_modules(
    ${target}
    MODULES
    ${target}
    ENVS
    FLAGS_host_trace_level=10
    FLAGS_static_executor_perfstat_filepath=./perfstat
    FLAGS_allocator_strategy=auto_growth
    FLAGS_use_stream_safe_cuda_allocator=true
    FLAGS_fast_eager_deletion_mode=false
    FLAGS_eager_delete_tensor_gb=0)
19

20 21 22 23 24 25 26 27 28
  py_test_modules(
    ${target}_non_eager_deletion
    MODULES
    ${target}
    ENVS
    FLAGS_allocator_strategy=auto_growth
    FLAGS_use_stream_safe_cuda_allocator=true
    FLAGS_fast_eager_deletion_mode=false
    FLAGS_eager_delete_tensor_gb=0.000001)
29

30 31 32 33 34 35 36 37 38
  py_test_modules(
    ${target}_fast_gc
    MODULES
    ${target}
    ENVS
    FLAGS_allocator_strategy=auto_growth
    FLAGS_use_stream_safe_cuda_allocator=true
    FLAGS_fast_eager_deletion_mode=true
    FLAGS_eager_delete_tensor_gb=0)
39

40 41 42 43 44 45 46 47 48
  py_test_modules(
    ${target}_fast_gc_non_eager_deletion
    MODULES
    ${target}
    ENVS
    FLAGS_allocator_strategy=auto_growth
    FLAGS_use_stream_safe_cuda_allocator=true
    FLAGS_fast_eager_deletion_mode=true
    FLAGS_eager_delete_tensor_gb=0.000001)
H
hong 已提交
49
endforeach()
50 51 52 53 54 55 56 57

py_test_modules(
  test_standalone_executor_sequential_run MODULES test_standalone_executor ENVS
  FLAGS_new_executor_sequential_run=true)

py_test_modules(
  test_standalone_executor_serial_run MODULES test_standalone_executor ENVS
  FLAGS_new_executor_serial_run=true)
58 59 60

py_test_modules(test_convert_graph_to_program MODULES test_standalone_executor
                ENVS FLAGS_CONVERT_GRAPH_TO_PROGRAM=true)