CMakeLists.txt 2.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
file(GLOB TEST_INFERENCE_IR_PASSES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py")
string(REPLACE ".py" "" TEST_INFERENCE_IR_PASSES "${TEST_INFERENCE_IR_PASSES}")

file(GLOB TEST_TRT_IR_PASSES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_trt_*.py")
string(REPLACE ".py" "" TEST_TRT_IR_PASSES "${TEST_TRT_IR_PASSES}")
foreach(TEST_INFERENCE_IR_PASS ${TEST_TRT_IR_PASSES})
  list(REMOVE_ITEM TEST_INFERENCE_IR_PASSES ${TEST_INFERENCE_IR_PASS})
endforeach()

if(WITH_GPU AND TENSORRT_FOUND)
W
Wangzheee 已提交
11
  list(REMOVE_ITEM TEST_TRT_IR_PASSES test_trt_multiclass_nms_op)
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  foreach(target ${TEST_TRT_IR_PASSES})
    py_test_modules(${target} MODULES ${target})
  endforeach()
endif()

file(GLOB TEST_MKLDNN_IR_PASSES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_mkldnn_*.py")
string(REPLACE ".py" "" TEST_MKLDNN_IR_PASSES "${TEST_MKLDNN_IR_PASSES}")
foreach(TEST_INFERENCE_IR_PASS ${TEST_MKLDNN_IR_PASSES})
  list(REMOVE_ITEM TEST_INFERENCE_IR_PASSES ${TEST_INFERENCE_IR_PASS})
endforeach()

if(WITH_MKLDNN)
  foreach(target ${TEST_MKLDNN_IR_PASSES})
    py_test_modules(${target} MODULES ${target})
  endforeach()
endif()

foreach(target ${TEST_INFERENCE_IR_PASSES})
  py_test_modules(${target} MODULES ${target})
endforeach()
Y
YUNSHEN XIE 已提交
32 33
if(WITH_GPU AND TENSORRT_FOUND)
set_tests_properties(test_trt_subgraph_pass PROPERTIES TIMEOUT 120)
34 35
set_tests_properties(test_trt_activation_pass PROPERTIES TIMEOUT 120)
set_tests_properties(test_trt_conv_pass PROPERTIES TIMEOUT 120)
W
Wangzheee 已提交
36
#set_tests_properties(test_trt_multiclass_nms_op PROPERTIES TIMEOUT 200)
37
set_tests_properties(test_trt_dynamic_shape PROPERTIES TIMEOUT 120)
38
set_tests_properties(test_trt_pool_op PROPERTIES ENVIRONMENT FLAGS_fraction_of_gpu_memory_to_use=0.1 TIMEOUT 45)
W
wenbin 已提交
39
set_tests_properties(test_trt_reduce_mean_op PROPERTIES TIMEOUT 60)
W
wenbin 已提交
40
set_tests_properties(test_trt_tile_op PROPERTIES TIMEOUT 60)
41
set_tests_properties(test_trt_convert_conv2d PROPERTIES TIMEOUT 100)
42 43 44
set_tests_properties(test_trt_fc_fuse_quant_dequant_pass PROPERTIES TIMEOUT 100)
set_tests_properties(test_trt_conv_quant_dequant_pass PROPERTIES TIMEOUT 100)
set_tests_properties(test_trt_matmul_quant_dequant PROPERTIES TIMEOUT 100)
Y
YUNSHEN XIE 已提交
45
endif()