Skip to content

Commit 1d581f2

Browse files
authored
[PHI] Align paddle.inner with torch in matmul logic (#72843)
1 parent 72279a9 commit 1d581f2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

python/paddle/tensor/math.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2900,9 +2900,7 @@ def __check_input(x, y):
29002900
__check_input(nx, ny)
29012901

29022902
if in_dynamic_or_pir_mode():
2903-
return _C_ops.matmul(
2904-
nx, paddle.transpose(ny, [1, 0]), False, False
2905-
).reshape(dstshape)
2903+
return _C_ops.matmul(nx, ny, False, True).reshape(dstshape)
29062904
else:
29072905
helper = LayerHelper('inner', **locals())
29082906
out = helper.create_variable_for_type_inference(dtype=nx.dtype)

0 commit comments

Comments
 (0)