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

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

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