Skip to content

Commit 78d2ce9

Browse files
authored
Merge branch 'master' into impl-unique-functions
2 parents bfcec3e + b09533e commit 78d2ce9

File tree

8 files changed

+244
-287
lines changed

8 files changed

+244
-287
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020
onedpl-devel
2121
setuptools
2222
python
23-
numpy">=2.0"
23+
numpy
2424
cython
2525
cmake
2626
ninja
@@ -32,7 +32,9 @@ jobs:
3232

3333
strategy:
3434
matrix:
35-
python: ['3.13']
35+
# python 3.13 is blocked since BLAS requires "mkl<2025.0" (see https://github.com/conda-forge/blas-feedstock/pull/128
36+
# which depends on resolving MKL issue https://github.com/conda-forge/intel_repack-feedstock/issues/83)
37+
python: ['3.12']
3638
os: [ubuntu-22.04] # windows-2019 - no DFT support for Windows in oneMKL
3739

3840
permissions:
@@ -125,7 +127,9 @@ jobs:
125127

126128
strategy:
127129
matrix:
128-
python: ['3.13']
130+
# python 3.13 is blocked since BLAS requires "mkl<2025.0" (see https://github.com/conda-forge/blas-feedstock/pull/128
131+
# which depends on resolving MKL issue https://github.com/conda-forge/intel_repack-feedstock/issues/83)
132+
python: ['3.12']
129133
os: [ubuntu-22.04] # windows-2019 - no DFT support for Windows in oneMKL
130134

131135
permissions:

.github/workflows/conda-package.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ env:
1616
CONDA_BUILD_INDEX_ENV_PY_VER: '3.12' # conda does not support python 3.13
1717
CONDA_BUILD_VERSION: '25.1.1'
1818
CONDA_INDEX_VERSION: '0.5.0'
19-
LATEST_PYTHON: '3.13'
19+
# python 3.13 is blocked since BLAS requires "mkl<2025.0" (see https://github.com/conda-forge/blas-feedstock/pull/128
20+
# which depends on resolving MKL issue https://github.com/conda-forge/intel_repack-feedstock/issues/83)
21+
LATEST_PYTHON: '3.12'
2022
RERUN_TESTS_ON_FAILURE: 'true'
2123
RUN_TESTS_MAX_ATTEMPTS: 2
2224
TEST_ENV_NAME: 'test'
@@ -31,7 +33,9 @@ jobs:
3133
strategy:
3234
fail-fast: false
3335
matrix:
34-
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
36+
# python 3.13 is blocked since BLAS requires "mkl<2025.0" (see https://github.com/conda-forge/blas-feedstock/pull/128
37+
# which depends on resolving MKL issue https://github.com/conda-forge/intel_repack-feedstock/issues/83)
38+
python: ['3.9', '3.10', '3.11', '3.12']
3539
os: [ubuntu-22.04, windows-2019]
3640

3741
permissions:
@@ -124,7 +128,8 @@ jobs:
124128
strategy:
125129
fail-fast: false
126130
matrix:
127-
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
131+
# python 3.13 is blocked due to MKL issue
132+
python: ['3.9', '3.10', '3.11', '3.12']
128133
os: [ubuntu-latest]
129134

130135
env:
@@ -253,7 +258,8 @@ jobs:
253258
strategy:
254259
fail-fast: false
255260
matrix:
256-
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
261+
# python 3.13 is blocked due to MKL issue
262+
python: ['3.9', '3.10', '3.11', '3.12']
257263
os: [windows-2019]
258264

259265
env:
@@ -389,7 +395,8 @@ jobs:
389395

390396
strategy:
391397
matrix:
392-
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
398+
# python 3.13 is blocked due to MKL issue
399+
python: ['3.9', '3.10', '3.11', '3.12']
393400
os: [ubuntu-22.04, windows-2019]
394401

395402
runs-on: ${{ matrix.os }}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ jobs:
3737
strategy:
3838
fail-fast: false
3939
matrix:
40-
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
40+
# python 3.13 is blocked since BLAS requires "mkl<2025.0" (see https://github.com/conda-forge/blas-feedstock/pull/128
41+
# which depends on resolving MKL issue https://github.com/conda-forge/intel_repack-feedstock/issues/83)
42+
python: ['3.9', '3.10', '3.11', '3.12']
4143
runner: [ubuntu-22.04, ubuntu-24.04, windows-2019]
4244

4345
steps:

dpnp/linalg/dpnp_utils_linalg.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,13 +449,15 @@ def _batched_qr(a, mode="reduced"):
449449
a_t,
450450
shape=(batch_size, m, m),
451451
dtype=res_type,
452+
order="C",
452453
)
453454
else:
454455
mc = k
455456
q = dpnp.empty_like(
456457
a_t,
457458
shape=(batch_size, n, m),
458459
dtype=res_type,
460+
order="C",
459461
)
460462

461463
# use DPCTL tensor function to fill the matrix array `q[..., :n, :]`
@@ -2532,13 +2534,15 @@ def dpnp_qr(a, mode="reduced"):
25322534
a_t,
25332535
shape=(m, m),
25342536
dtype=res_type,
2537+
order="C",
25352538
)
25362539
else:
25372540
mc = k
25382541
q = dpnp.empty_like(
25392542
a_t,
25402543
shape=(n, m),
25412544
dtype=res_type,
2545+
order="C",
25422546
)
25432547

25442548
# use DPCTL tensor function to fill the matrix array `q[:n]`

dpnp/tests/test_linalg.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2372,12 +2372,24 @@ class TestQr:
23722372
@pytest.mark.parametrize("dtype", get_all_dtypes(no_bool=True))
23732373
@pytest.mark.parametrize(
23742374
"shape",
2375-
[(2, 2), (3, 4), (5, 3), (16, 16), (2, 2, 2), (2, 4, 2), (2, 2, 4)],
2375+
[
2376+
(2, 1),
2377+
(2, 2),
2378+
(3, 4),
2379+
(5, 3),
2380+
(16, 16),
2381+
(3, 3, 1),
2382+
(2, 2, 2),
2383+
(2, 4, 2),
2384+
(2, 2, 4),
2385+
],
23762386
ids=[
2387+
"(2, 1)",
23772388
"(2, 2)",
23782389
"(3, 4)",
23792390
"(5, 3)",
23802391
"(16, 16)",
2392+
"(3, 3, 1)",
23812393
"(2, 2, 2)",
23822394
"(2, 4, 2)",
23832395
"(2, 2, 4)",

dpnp/tests/test_mathematical.py

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2309,35 +2309,27 @@ def test_float_remainder_fmod_nans_inf(func, dtype, lhs, rhs):
23092309
assert_equal(result, expected)
23102310

23112311

2312+
@testing.with_requires("numpy>=2.0.0")
23122313
@pytest.mark.parametrize(
2313-
"data",
2314-
[[2, 0, -2], [1.1, -1.1]],
2315-
ids=["[2, 0, -2]", "[1.1, -1.1]"],
2316-
)
2317-
@pytest.mark.parametrize(
2318-
"dtype", get_all_dtypes(no_bool=True, no_unsigned=True)
2314+
"dtype", get_all_dtypes(no_none=True, no_unsigned=True)
23192315
)
2320-
def test_sign(data, dtype):
2321-
np_a = numpy.array(data, dtype=dtype)
2322-
dpnp_a = dpnp.array(data, dtype=dtype)
2316+
def test_sign(dtype):
2317+
a = generate_random_numpy_array((2, 3), dtype=dtype)
2318+
ia = dpnp.array(a, dtype=dtype)
23232319

2324-
result = dpnp.sign(dpnp_a)
2325-
expected = numpy.sign(np_a)
2326-
assert_dtype_allclose(result, expected)
2327-
2328-
# out keyword
2329-
if dtype is not None:
2330-
dp_out = dpnp.empty(expected.shape, dtype=expected.dtype)
2331-
result = dpnp.sign(dpnp_a, out=dp_out)
2332-
assert dp_out is result
2320+
if dtype == dpnp.bool:
2321+
assert_raises(TypeError, dpnp.sign, ia)
2322+
assert_raises(TypeError, numpy.sign, a)
2323+
else:
2324+
result = dpnp.sign(ia)
2325+
expected = numpy.sign(a)
23332326
assert_dtype_allclose(result, expected)
23342327

2335-
2336-
def test_sign_boolean():
2337-
dpnp_a = dpnp.array([True, False])
2338-
2339-
with pytest.raises(TypeError):
2340-
dpnp.sign(dpnp_a)
2328+
# out keyword
2329+
iout = dpnp.empty(expected.shape, dtype=expected.dtype)
2330+
result = dpnp.sign(ia, out=iout)
2331+
assert iout is result
2332+
assert_dtype_allclose(result, expected)
23412333

23422334

23432335
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)