Skip to content

Commit 0e479cc

Browse files
authored
fix issue gh-2264 (#2278)
resolves gh-2264
1 parent 91161a8 commit 0e479cc

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

.github/workflows/array-api-skips.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,5 @@ array_api_tests/test_signatures.py::test_func_signature[var]
3838
array_api_tests/test_linalg.py::test_vecdot
3939
array_api_tests/test_linalg.py::test_linalg_vecdot
4040

41-
# tuple index out of range
42-
array_api_tests/test_linalg.py::test_linalg_matmul
43-
4441
# arrays have different values
4542
array_api_tests/test_linalg.py::test_linalg_tensordot

dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Modifications, Copyright (C) 2023-2025 Intel Corporation
2+
# Modifications, Copyright (c) 2023-2025 Intel Corporation
33
#
44
# This software and the related documents are Intel copyrighted materials, and
55
# your use of them is governed by the express license under which they were

dpnp/backend/cmake/Modules/oneDPLConfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
##===----------------------------------------------------------------------===##
22
#
3-
# Copyright (C) Intel Corporation
3+
# Copyright (c) Intel Corporation
44
#
55
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
#

dpnp/dpnp_utils/dpnp_utils_linearalgebra.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,14 @@ def dpnp_matmul(
835835
elif x1_base_is_1D and x2_base_is_1D:
836836
# TODO: implement a batch version of dot to use it here
837837
call_flag = "gemm_batch"
838-
res_shape = result_shape
838+
if x1_ndim == 1:
839+
x1 = dpnp.reshape(x1, (1, 1, x1.size))
840+
res_shape = result_shape[:-1] + (1, result_shape[-1])
841+
elif x2_ndim == 1:
842+
x2 = dpnp.reshape(x2, (1, x2.size, 1))
843+
res_shape = result_shape + (1,)
844+
else:
845+
res_shape = result_shape
839846
elif x1_is_1D and x2_is_2D:
840847
transpose = True
841848
call_flag = "gemv"

dpnp/tests/test_mathematical.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2718,6 +2718,9 @@ def setup_method(self):
27182718
((3, 3, 1), (3, 1, 2)),
27192719
((3, 3, 1), (1, 1, 2)),
27202720
((1, 3, 1), (3, 1, 2)),
2721+
((4,), (3, 4, 1)),
2722+
((3, 1, 4), (4,)),
2723+
((3, 1, 4), (3, 4, 1)),
27212724
((4, 1, 3, 1), (1, 3, 1, 2)),
27222725
((1, 3, 3, 1), (4, 1, 1, 2)),
27232726
],

0 commit comments

Comments
 (0)