Skip to content

Commit 7c59295

Browse files
authored
Merge branch 'master' into extended_types_support
2 parents bd98e7a + 2ac196c commit 7c59295

File tree

13 files changed

+69
-30
lines changed

13 files changed

+69
-30
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

.github/workflows/build-sphinx.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ jobs:
180180
181181
# https://github.com/marketplace/actions/doxygen-action
182182
- name: Build backend docs
183-
uses: mattnotmitt/doxygen-action@cbe72c8e402e8a3faa1f0b247ef90aa6c8e4ce74 # v1.9.8
183+
uses: mattnotmitt/doxygen-action@b84fe17600245bb5db3d6c247cc274ea98c15a3b # v1.12
184184
with:
185185
working-directory: 'dpnp/backend/doc'
186186

@@ -266,6 +266,7 @@ jobs:
266266
- name: Modify the comment with URL to official documentation
267267
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
268268
with:
269+
message-id: url_to_docs
269270
find: |
270271
View rendered docs @.+
271272
replace: |

.github/workflows/openssf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ jobs:
6868

6969
# Upload the results to GitHub's code scanning dashboard.
7070
- name: "Upload to code-scanning"
71-
uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
71+
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
7272
with:
7373
sarif_file: results.sarif

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3030

3131
- name: Set up python
32-
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
32+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
3333
with:
3434
python-version: '3.13'
3535

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
@@ -2758,6 +2758,9 @@ def setup_method(self):
27582758
((3, 3, 1), (3, 1, 2)),
27592759
((3, 3, 1), (1, 1, 2)),
27602760
((1, 3, 1), (3, 1, 2)),
2761+
((4,), (3, 4, 1)),
2762+
((3, 1, 4), (4,)),
2763+
((3, 1, 4), (3, 4, 1)),
27612764
((4, 1, 3, 1), (1, 3, 1, 2)),
27622765
((1, 3, 3, 1), (4, 1, 1, 2)),
27632766
],

dpnp/tests/third_party/cupy/core_tests/test_nep50_examples.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import pytest
33

44
import dpnp as cp
5+
from dpnp.tests.helper import has_support_aspect64
56
from dpnp.tests.third_party.cupy import testing
67

78
# TODO: remove once all dtype aliases added
@@ -15,8 +16,6 @@
1516
"uint8(1) + 2",
1617
"array([1], uint8) + int64(1)",
1718
"array([1], uint8) + array(1, int64)",
18-
"array([1.], float32) + float64(1.)",
19-
"array([1.], float32) + array(1., float64)",
2019
"array([1], uint8) + 1",
2120
"array([1], uint8) + 200",
2221
"array([100], uint8) + 200",
@@ -25,7 +24,6 @@
2524
"uint8(100) + 200",
2625
"float32(1) + 3e100",
2726
"array([1.0], float32) + 1e-14 == 1.0",
28-
"array([0.1], float32) == float64(0.1)",
2927
"array(1.0, float32) + 1e-14 == 1.0",
3028
"array([1.], float32) + 3",
3129
"array([1.], float32) + int64(3)",
@@ -42,25 +40,34 @@
4240
"1.0 + array([1, 2, 3], int8)",
4341
"array([1], float32) + 1j",
4442
]
43+
if has_support_aspect64():
44+
examples += [
45+
"array([1.], float32) + float64(1.)",
46+
"array([1.], float32) + array(1., float64)",
47+
"array([0.1], float32) == float64(0.1)",
48+
]
4549

4650

4751
@pytest.mark.filterwarnings("ignore::RuntimeWarning")
4852
@testing.with_requires("numpy>=2.0")
4953
@pytest.mark.parametrize("example", examples)
50-
@testing.numpy_cupy_allclose(atol=1e-15, accept_error=OverflowError)
54+
@testing.numpy_cupy_allclose(
55+
atol=1e-15, accept_error=OverflowError, type_check=has_support_aspect64()
56+
)
5157
def test_nep50_examples(xp, example):
5258
dct = {
5359
"array": xp.array,
5460
"uint8": xp.uint8,
5561
"int64": xp.int64,
5662
"float32": xp.float32,
57-
"float64": xp.float64,
5863
"int16": xp.int16,
5964
"bool_": xp.bool_,
6065
"int32": xp.int32,
6166
"complex64": xp.complex64,
6267
"int8": xp.int8,
6368
}
69+
if has_support_aspect64():
70+
dct["float64"] = xp.float64
6471

6572
if isinstance(example, tuple):
6673
example, mesg = example

dpnp/tests/third_party/cupy/linalg_tests/test_product.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class TestLinalgCrossProduct(unittest.TestCase):
173173

174174
@testing.with_requires("numpy>=2.0")
175175
@testing.for_all_dtypes_combination(["dtype_a", "dtype_b"])
176-
@testing.numpy_cupy_allclose()
176+
@testing.numpy_cupy_allclose(type_check=has_support_aspect64())
177177
def test_cross(self, xp, dtype_a, dtype_b):
178178
if dtype_a == dtype_b == numpy.bool_:
179179
# cross does not support bool-bool inputs.

0 commit comments

Comments
 (0)