Skip to content

Commit

Permalink
fix issue gh-2264
Browse files Browse the repository at this point in the history
  • Loading branch information
vtavana committed Jan 24, 2025
1 parent 0181564 commit 0e33faf
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/array-api-skips.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,5 @@ array_api_tests/test_signatures.py::test_func_signature[var]
array_api_tests/test_linalg.py::test_vecdot
array_api_tests/test_linalg.py::test_linalg_vecdot

# tuple index out of range
array_api_tests/test_linalg.py::test_linalg_matmul

# arrays have different values
array_api_tests/test_linalg.py::test_linalg_tensordot
2 changes: 1 addition & 1 deletion dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Modifications, Copyright (C) 2023-2025 Intel Corporation
# Modifications, Copyright (c) 2023-2025 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
Expand Down
2 changes: 1 addition & 1 deletion dpnp/backend/cmake/Modules/oneDPLConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##===----------------------------------------------------------------------===##
#
# Copyright (C) Intel Corporation
# Copyright (c) Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
Expand Down
9 changes: 8 additions & 1 deletion dpnp/dpnp_utils/dpnp_utils_linearalgebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,14 @@ def dpnp_matmul(
elif x1_base_is_1D and x2_base_is_1D:
# TODO: implement a batch version of dot to use it here
call_flag = "gemm_batch"
res_shape = result_shape
if x1_ndim == 1:
x1 = dpnp.reshape(x1, (1, 1, x1.size))
res_shape = result_shape[:-1] + (1, result_shape[-1])
elif x2_ndim == 1:
x2 = dpnp.reshape(x2, (1, x2.size, 1))
res_shape = result_shape + (1,)
else:
res_shape = result_shape
elif x1_is_1D and x2_is_2D:
transpose = True
call_flag = "gemv"
Expand Down
3 changes: 3 additions & 0 deletions dpnp/tests/test_mathematical.py
Original file line number Diff line number Diff line change
Expand Up @@ -2718,6 +2718,9 @@ def setup_method(self):
((3, 3, 1), (3, 1, 2)),
((3, 3, 1), (1, 1, 2)),
((1, 3, 1), (3, 1, 2)),
((4,), (3, 4, 1)),
((3, 1, 4), (4,)),
((3, 1, 4), (3, 4, 1)),
((4, 1, 3, 1), (1, 3, 1, 2)),
((1, 3, 3, 1), (4, 1, 1, 2)),
],
Expand Down

0 comments on commit 0e33faf

Please sign in to comment.