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

4
if(APPLE OR WIN32 OR NOT WITH_MKL)
5 6
    list(REMOVE_ITEM TEST_OPS test_calibration_resnet50)
    list(REMOVE_ITEM TEST_OPS test_calibration_mobilenetv1)
7 8
endif()

D
Dang Qingqing 已提交
9
foreach(src ${TEST_OPS})
10
    if(src MATCHES "test_calibration_*")
T
Tao Luo 已提交
11
        py_test(${src} SRCS ${src}.py ENVS FLAGS_use_mkldnn=true FLAGS_OMP_NUM_THREADS=${CPU_NUM_THREADS_ON_CI})
Z
Zhang, Guoming 已提交
12 13 14
    else()
        py_test(${src} SRCS ${src}.py)
    endif()
D
Dang Qingqing 已提交
15
endforeach()