CMakeLists.txt 869 字节
Newer Older
1 2 3
file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py")
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")

L
Leo Chen 已提交
4 5 6 7
if (WITH_ASCEND_CL)
    foreach(TEST_OP ${TEST_OPS})
        py_test_modules(${TEST_OP} MODULES ${TEST_OP})
    endforeach(TEST_OP)
8 9 10 11 12 13 14 15

    # NOTE: NPU `get_float_status` read the value from register, During the test,
    # it is found that this register will be overwritten by any program on the card.
    # In order to prevent the interference of nan/inf in the other unittests, we
    # need to set the unittests related to `float_status` to exclusive.
    set_tests_properties(test_amp_check_finite_and_scale_op_npu PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE")
    set_tests_properties(test_flags_check_nan_inf_npu PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE")
    set_tests_properties(test_float_status_op_npu PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE")
L
Leo Chen 已提交
16
endif()