未验证 提交 9fcb6a1d 编写于 作者: Z Zhanlue Yang 提交者: GitHub

Enabled final state matmul at Python API level (#41089)

上级 97cd0f51
......@@ -133,8 +133,11 @@ def matmul(x, y, transpose_x=False, transpose_y=False, name=None):
# [10, 3, 5, 5]
"""
op_type = 'matmul_v2'
if paddle.in_dynamic_mode():
if in_dygraph_mode():
return _C_ops.final_state_matmul(x, y, transpose_x, transpose_y)
if _in_legacy_dygraph():
op_type = 'matmul_v2'
op = getattr(_C_ops, op_type)
return op(x, y, 'trans_x', transpose_x, 'trans_y', transpose_y)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册