Skip to content

Commit 069cad2

Browse files
vtavanaantonwolfy
andauthored
fix gh-1843 (#1844)
Co-authored-by: Anton <[email protected]>
1 parent b988e9c commit 069cad2

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

dpnp/dpnp_utils/dpnp_utils_linearalgebra.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,7 @@ def dpnp_matmul(
20992099
if numpy.prod(result_shape) == 0:
21002100
res_shape = result_shape
21012101
elif x1_shape[-1] == 1:
2102-
call_flag = "kron"
2102+
call_flag = "multiply"
21032103
elif x1_is_1D and x2_is_1D:
21042104
call_flag = "dot"
21052105
x1 = dpnp.reshape(x1, x1_shape[-1])
@@ -2148,8 +2148,8 @@ def dpnp_matmul(
21482148
call_flag = "gemm_batch"
21492149
res_shape = result_shape
21502150

2151-
if call_flag == "kron":
2152-
res = dpnp.kron(x1, x2)
2151+
if call_flag == "multiply":
2152+
res = dpnp.multiply(x1, x2)
21532153
res_shape = res.shape
21542154
elif call_flag == "dot":
21552155
if out is not None and out.shape != ():

tests/test_mathematical.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,6 +2180,11 @@ def setup_method(self):
21802180
((10, 1, 1, 3), (2, 3, 3)),
21812181
((10, 1, 1, 3), (10, 2, 3, 3)),
21822182
((10, 2, 1, 3), (10, 2, 3, 3)),
2183+
((3, 3, 1), (3, 1, 2)),
2184+
((3, 3, 1), (1, 1, 2)),
2185+
((1, 3, 1), (3, 1, 2)),
2186+
((4, 1, 3, 1), (1, 3, 1, 2)),
2187+
((1, 3, 3, 1), (4, 1, 1, 2)),
21832188
],
21842189
)
21852190
def test_matmul(self, order_pair, shape_pair):

0 commit comments

Comments
 (0)