Skip to content

Commit b44cd2e

Browse files
authored
Merge branch 'master' into compare-shape
2 parents e3afcfc + 6a81e55 commit b44cd2e

File tree

12 files changed

+40
-26
lines changed

12 files changed

+40
-26
lines changed

.github/workflows/check-mkl-interfaces.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
fetch-depth: 0
8484

8585
- name: Download artifact
86-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
86+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
8787
with:
8888
name: ${{ env.environment-file-name }}
8989
path: ${{ env.environment-file-loc }}
@@ -176,7 +176,7 @@ jobs:
176176
fetch-depth: 0
177177

178178
- name: Download artifact
179-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
179+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
180180
with:
181181
name: ${{ env.environment-file-name }}
182182
path: ${{ env.environment-file-loc }}

.github/workflows/conda-package.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
path: ${{ env.dpnp-repo-path }}
150150

151151
- name: Download artifact
152-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
152+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
153153
with:
154154
name: ${{ env.package-name }} ${{ runner.os }} Python ${{ matrix.python }}
155155
path: ${{ env.pkg-path-in-channel }}
@@ -281,7 +281,7 @@ jobs:
281281
path: ${{ env.dpnp-repo-path }}
282282

283283
- name: Download artifact
284-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
284+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
285285
with:
286286
name: ${{ env.package-name }} ${{ runner.os }} Python ${{ matrix.python }}
287287
path: ${{ env.pkg-path-in-channel }}
@@ -376,7 +376,7 @@ jobs:
376376
Write-Warning "File $script_path was NOT found!"
377377
}
378378
# Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
379-
$cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg"
379+
$cl_cfg="$env:CONDA_PREFIX\Library\bin\cl.cfg"
380380
Get-Content -Tail 5 -Path $cl_cfg
381381
382382
- name: Smoke test
@@ -445,12 +445,12 @@ jobs:
445445
fetch-depth: ${{ env.fetch-depth }}
446446

447447
- name: Download artifact
448-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
448+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
449449
with:
450450
name: ${{ env.package-name }} ${{ runner.os }} Python ${{ matrix.python }}
451451

452452
- name: Download wheels artifact
453-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
453+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
454454
with:
455455
name: ${{ env.package-name }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
456456

@@ -533,7 +533,7 @@ jobs:
533533
path: ${{ env.dpnp-repo-path }}
534534

535535
- name: Download artifact
536-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
536+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
537537
with:
538538
name: ${{ env.package-name }} ${{ runner.os }} Python ${{ env.python-ver }}
539539
path: ${{ env.pkg-path-in-channel }}

.github/workflows/cron-run-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
Write-Warning "File $script_path was NOT found!"
109109
}
110110
# Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
111-
$cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg"
111+
$cl_cfg="$env:CONDA_PREFIX\Library\bin\cl.cfg"
112112
Get-Content -Tail 5 -Path $cl_cfg
113113
114114
- name: Smoke test

.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@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
71+
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
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@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
32+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3333
with:
3434
python-version: '3.13'
3535

dpnp/tests/test_linalg.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def test_basic(self, dtype, shape, p):
311311

312312
result = dpnp.linalg.cond(ia, p=p)
313313
expected = numpy.linalg.cond(a, p=p)
314-
assert_dtype_allclose(result, expected)
314+
assert_dtype_allclose(result, expected, factor=16)
315315

316316
@pytest.mark.parametrize(
317317
"p", [None, -dpnp.inf, -2, -1, 1, 2, dpnp.inf, "fro"]
@@ -2839,10 +2839,8 @@ def get_tol(self, dtype):
28392839
tol = 1e-06
28402840
if dtype in (dpnp.float32, dpnp.complex64):
28412841
tol = 1e-03
2842-
elif not has_support_aspect64() and dtype in (
2843-
dpnp.int32,
2844-
dpnp.int64,
2845-
None,
2842+
elif not has_support_aspect64() and (
2843+
dtype is None or dpnp.issubdtype(dtype, dpnp.integer)
28462844
):
28472845
tol = 1e-03
28482846
self._tol = tol
@@ -2993,10 +2991,8 @@ def get_tol(self, dtype):
29932991
tol = 1e-06
29942992
if dtype in (dpnp.float32, dpnp.complex64):
29952993
tol = 1e-03
2996-
elif not has_support_aspect64() and dtype in (
2997-
dpnp.int32,
2998-
dpnp.int64,
2999-
None,
2994+
elif not has_support_aspect64() and (
2995+
dtype is None or dpnp.issubdtype(dtype, dpnp.integer)
30002996
):
30012997
tol = 1e-03
30022998
self._tol = tol

dpnp/tests/test_product.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def test_ones(self, dtype):
199199
@pytest.mark.parametrize("dtype", get_all_dtypes(no_bool=True))
200200
def test_arange(self, dtype):
201201
n = 10**2
202-
m = 10**3 if dtype is not dpnp.float32 else 10**2
202+
m = 10**3 if dtype not in [dpnp.float32, dpnp.complex64] else 10**2
203203
a = numpy.hstack((numpy.arange(n, dtype=dtype),) * m)
204204
b = numpy.flipud(a)
205205
ia = dpnp.array(a)

dpnp/tests/third_party/cupy/creation_tests/test_ranges.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def test_linspace_mixed_start_stop2(self, xp, dtype_range, dtype_out):
229229
if xp.dtype(dtype_range).kind in "u":
230230
# to avoid overflow, limit `val` to be smaller
231231
# than xp.iinfo(dtype).max
232-
if dtype_range == xp.uint8 or dtype_out == xp.uint8:
232+
if dtype_range in [xp.uint8, xp.uint16] or dtype_out == xp.uint8:
233233
val = 125
234234
else:
235235
val = 160

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,6 @@ def test_einsum_unary_views(self, xp, dtype):
373373
def test_einsum_unary_dtype(self, xp, dtype_a, dtype_out):
374374
if not numpy.can_cast(dtype_a, dtype_out):
375375
pytest.skip()
376-
if cupy.issubdtype(dtype_a, cupy.unsignedinteger):
377-
pytest.skip("dpctl-2055")
378376
a = testing.shaped_arange(self.shape_a, xp, dtype_a)
379377
return xp.einsum(self.subscripts, a, dtype=dtype_out)
380378

dpnp/tests/third_party/cupy/math_tests/test_explog.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ def check_unary(self, name, xp, dtype, no_complex=False):
1616
a = testing.shaped_arange((2, 3), xp, dtype)
1717
return getattr(xp, name)(a)
1818

19+
# rtol=1e-3 is added for dpnp to pass the test when dtype is int8/unint8
20+
# for such a case, output dtype is float16
1921
@testing.for_all_dtypes()
20-
@testing.numpy_cupy_allclose(atol=1e-5, type_check=has_support_aspect64())
22+
@testing.numpy_cupy_allclose(
23+
rtol=1e-3, atol=1e-5, type_check=has_support_aspect64()
24+
)
2125
def check_binary(self, name, xp, dtype, no_complex=False):
2226
if no_complex:
2327
if numpy.dtype(dtype).kind == "c":

dpnp/tests/third_party/cupy/math_tests/test_trigonometric.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import unittest
22

3+
import pytest
4+
35
from dpnp.tests.helper import has_support_aspect64
46
from dpnp.tests.third_party.cupy import testing
57

@@ -76,12 +78,26 @@ def test_unwrap_1dim_with_discont(self, xp, dtype):
7678
@testing.for_all_dtypes(no_complex=True)
7779
@testing.numpy_cupy_allclose(type_check=has_support_aspect64())
7880
def test_unwrap_1dim_with_period(self, xp, dtype):
81+
if not has_support_aspect64() and dtype in [xp.uint8, xp.uint16]:
82+
# The unwrap function relies on the remainder function, and the
83+
# result of remainder can vary significantly between float32 and
84+
# float64. This discrepancy causes test failures when numpy uses
85+
# float64 and dpnp uses float32, especially with uint8/uint16
86+
# dtypes where overflow occurs
87+
pytest.skip("skipping due to large difference of result")
7988
a = testing.shaped_random((5,), xp, dtype)
8089
return xp.unwrap(a, period=1.2)
8190

8291
@testing.for_all_dtypes(no_complex=True)
8392
@testing.numpy_cupy_allclose(type_check=has_support_aspect64())
8493
def test_unwrap_1dim_with_discont_and_period(self, xp, dtype):
94+
if not has_support_aspect64() and dtype in [xp.uint8, xp.uint16]:
95+
# The unwrap function relies on the remainder function, and the
96+
# result of remainder can vary significantly between float32 and
97+
# float64. This discrepancy causes test failures when numpy uses
98+
# float64 and dpnp uses float32, especially with uint8/uint16
99+
# dtypes where overflow occurs
100+
pytest.skip("skipping due to large difference of result")
85101
a = testing.shaped_random((5,), xp, dtype)
86102
return xp.unwrap(a, discont=1.0, period=1.2)
87103

environments/build_conda_pkg.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ channels:
33
- conda-forge
44
dependencies:
55
- python=3.12 # conda-build does not support python 3.13
6-
- conda-build=25.3.2
6+
- conda-build=25.4.2

0 commit comments

Comments
 (0)