提交 45702951 编写于 作者: W WangXi 提交者: gongweibao

fix assert in nan inf tests, test=develop (#21742)

上级 8754cbd1
......@@ -107,10 +107,14 @@ if __name__ == '__main__':
assert False
except Exception as e:
print(e)
assert type(e) == core.EnforceNotMet
print(type(e))
# Note. Enforce in cuda kernel may not catch in paddle, and
# Exception type will be RuntimeError
assert type(e) == core.EnforceNotMet or type(e) == RuntimeError
try:
check(use_cuda=False)
assert False
except Exception as e:
print(e)
print(type(e))
assert type(e) == core.EnforceNotMet
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册