未验证 提交 c645d235 编写于 作者: L liuwei1031 提交者: GitHub

improve efficiency of dot op in dygraph mode (#23856)

* improve efficiency of dot op in dygraph mode

* add comments for dot op for dygraph behavior
上级 53cfac94
......@@ -440,6 +440,11 @@ def dot(x, y, name=None):
"""
op_type = 'dot'
# skip var type check in dygraph mode to improve efficiency
if in_dygraph_mode():
op = getattr(core.ops, op_type)
return op(x, y)
assert x is not None, 'x cannot be None in {}'.format(op_type)
assert y is not None, 'y cannot be None in {}'.format(op_type)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册