未验证 提交 3862f347 编写于 作者: X xiongkun 提交者: GitHub

consider grad_op exist in forward program. (#50321)

上级 ebdf3ef9
......@@ -329,6 +329,11 @@ def update_op_callstack_with_origin_info(program):
callstack = get_new_op_callstack(callstack)
op._set_attr(callstack_var_name, callstack)
try:
# (@xiongkun) In 2-order derivative for paddle science, there may exists `pow_grad`
# which has op_proto == nullptr and causes _set_attr failed. so we add a try...except.
op._set_attr(callstack_var_name, callstack)
except:
pass
return program
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册