未验证 提交 f4193eac 编写于 作者: 王明冬 提交者: GitHub

[NPU] fix CI error in new executor. (#45432)

上级 efab2eb4
......@@ -566,12 +566,16 @@ void InterpreterCore::RunInstruction(const Instruction& instr_node) {
: var_scope_.GetMutableScope();
#ifdef PADDLE_WITH_ASCEND_CL
// NOTE(wangxi): nan/inf cannot be detected on NPU by checking the variable
// values, but only through special `float_status` to checks whether
// the operation is overflow. More about `float_status`, see:
// https://gitee.com/ascend/modelzoo/issues/I3NF8V?from=project-issue
if (FLAGS_check_nan_inf) {
framework::details::NPUAllocAndClearFloatStatus(*op, *local_scope, place);
if (platform::is_npu_place(place)) {
auto dev_id = place.device;
platform::SetNPUDeviceId(dev_id);
// NOTE(wangxi): nan/inf cannot be detected on NPU by checking the variable
// values, but only through special `float_status` to checks whether
// the operation is overflow. More about `float_status`, see:
// https://gitee.com/ascend/modelzoo/issues/I3NF8V?from=project-issue
if (FLAGS_check_nan_inf) {
framework::details::NPUAllocAndClearFloatStatus(*op, *local_scope, place);
}
}
#endif
......
......@@ -6,8 +6,7 @@ string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
if(WITH_ASCEND_CL)
foreach(TEST_OP ${TEST_OPS})
py_test_modules(${TEST_OP} MODULES ${TEST_OP} ENVS
FLAGS_USE_STANDALONE_EXECUTOR=0)
py_test_modules(${TEST_OP} MODULES ${TEST_OP})
endforeach()
# NOTE: NPU `get_float_status` read the value from register, During the test,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册