CMakeLists.txt 868 字节
Newer Older
1 2 3 4
file(
  GLOB TEST_OPS
  RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
  "test_*.py")
D
Dang Qingqing 已提交
5 6
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")

7 8
list(REMOVE_ITEM TEST_OPS test_multi_precision_fp16_train)

D
Dang Qingqing 已提交
9
foreach(src ${TEST_OPS})
10
  py_test(${src} SRCS ${src}.py)
D
Dang Qingqing 已提交
11
endforeach()
12

13 14 15 16 17 18 19 20
py_test_modules(
  test_multi_precision_fp16_train
  MODULES
  test_multi_precision_fp16_train
  ENVS
  FLAGS_cudnn_deterministic=true
  FLAGS_cudnn_batchnorm_spatial_persistent=true
  FLAGS_conv_workspace_size_limit=1000)
21

Y
YUNSHEN XIE 已提交
22 23
set_tests_properties(test_image_classification_fp16 PROPERTIES TIMEOUT 120)
set_tests_properties(test_weight_decay_extend PROPERTIES TIMEOUT 120)
24
set_tests_properties(test_multi_precision_fp16_train PROPERTIES TIMEOUT 120)
J
Jiabin Yang 已提交
25

26 27 28
if(APPLE)
  set_tests_properties(test_model_cast_to_bf16 PROPERTIES TIMEOUT 300)
  set_tests_properties(test_quantize_transpiler PROPERTIES TIMEOUT 300)
J
Jiabin Yang 已提交
29
endif()