Skip to content

Commit 23f42fe

Browse files
authored
Merge branch 'master' into in-place-element-wise-func-casting
2 parents 584d141 + f7c0938 commit 23f42fe

File tree

352 files changed

+671
-519
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

352 files changed

+671
-519
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
build-and-deploy:
2626
name: Build and Deploy Docs
2727

28-
runs-on: ubuntu-latest
28+
runs-on: ubuntu-22.04
2929

3030
permissions:
3131
# Needed to cancel any previous runs that are not completed for a given workflow

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ env:
2828
2929
jobs:
3030
test_by_tag:
31-
name: Run on ['${{ matrix.os }}', python='${{ matrix.python }}'] with oneMKL tag
31+
name: Run tests with oneMKL tag
3232

3333
strategy:
3434
matrix:
35-
python: ['3.12']
35+
python: ['3.13']
3636
os: [ubuntu-22.04] # windows-2019 - no DFT support for Windows in oneMKL
3737

3838
permissions:
@@ -121,11 +121,11 @@ jobs:
121121
SYCL_CACHE_PERSISTENT: 1
122122

123123
test_by_branch:
124-
name: Run on ['${{ matrix.os }}', python='${{ matrix.python }}'] with oneMKL develop branch
124+
name: Run tests with oneMKL develop branch
125125

126126
strategy:
127127
matrix:
128-
python: ['3.12']
128+
python: ['3.13']
129129
os: [ubuntu-22.04] # windows-2019 - no DFT support for Windows in oneMKL
130130

131131
permissions:

.github/workflows/conda-package.yml

Lines changed: 47 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
# Follow oneAPI installation instruction for conda, since intel channel is not longer available
1414
# CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
1515
CHANNELS: '-c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
16+
CONDA_BUILD_INDEX_ENV_PY_VER: '3.12' # conda does not support python 3.13
1617
CONDA_BUILD_VERSION: '24.11.2'
1718
CONDA_INDEX_VERSION: '0.5.0'
1819
RERUN_TESTS_ON_FAILURE: 'true'
@@ -24,11 +25,11 @@ env:
2425

2526
jobs:
2627
build:
27-
name: Build ['${{ matrix.os }}', python='${{ matrix.python }}']
28+
name: Build
2829

2930
strategy:
3031
matrix:
31-
python: ['3.9', '3.10', '3.11', '3.12']
32+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
3233
os: [ubuntu-22.04, windows-2019]
3334

3435
permissions:
@@ -55,18 +56,27 @@ jobs:
5556
fetch-depth: 0
5657

5758
- name: Setup miniconda
59+
id: setup_miniconda
60+
continue-on-error: true
5861
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
5962
with:
6063
miniforge-version: latest
6164
use-mamba: 'true'
6265
channels: conda-forge
6366
conda-remove-defaults: 'true'
64-
python-version: ${{ matrix.python }}
67+
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
6568
activate-environment: 'build'
6669

67-
# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
68-
- name: Disable speed limit check in mamba
69-
run: echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
70+
- name: ReSetup miniconda
71+
if: steps.setup_miniconda.outcome == 'failure'
72+
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
73+
with:
74+
miniforge-version: latest
75+
use-mamba: 'true'
76+
channels: conda-forge
77+
conda-remove-defaults: 'true'
78+
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
79+
activate-environment: 'build'
7080

7181
- name: Store conda paths as envs
7282
shell: bash -el {0}
@@ -75,6 +85,12 @@ jobs:
7585
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
7686
7787
- name: Install conda-build
88+
id: install_conda_build
89+
continue-on-error: true
90+
run: mamba install conda-build=${{ env.CONDA_BUILD_VERSION}}
91+
92+
- name: ReInstall conda-build
93+
if: steps.install_conda_build.outcome == 'failure'
7894
run: mamba install conda-build=${{ env.CONDA_BUILD_VERSION}}
7995

8096
- name: Build conda package
@@ -83,31 +99,32 @@ jobs:
8399
MAX_BUILD_CMPL_MKL_VERSION: '2025.1a0'
84100

85101
- name: Upload artifact
86-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
102+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
87103
with:
88104
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
89105
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
90106

91107
- name: Upload wheels artifact
92-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
108+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
93109
with:
94110
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
95111
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl
96112

97113
test_linux:
98-
name: Test ['ubuntu-latest', python='${{ matrix.python }}']
114+
name: Test
99115

100116
needs: build
101117

102-
runs-on: ubuntu-latest
118+
runs-on: ${{ matrix.os }}
103119

104120
defaults:
105121
run:
106122
shell: bash -el {0}
107123

108124
strategy:
109125
matrix:
110-
python: ['3.9', '3.10', '3.11', '3.12']
126+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
127+
os: [ubuntu-latest]
111128

112129
continue-on-error: true
113130

@@ -136,7 +153,7 @@ jobs:
136153
use-mamba: 'true'
137154
channels: conda-forge
138155
conda-remove-defaults: 'true'
139-
python-version: ${{ matrix.python }}
156+
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
140157
activate-environment: ${{ env.TEST_ENV_NAME }}
141158

142159
- name: Install conda-index
@@ -158,8 +175,13 @@ jobs:
158175
echo PACKAGE_VERSION=${PACKAGE_VERSION}
159176
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
160177
178+
# conda-index does not support python 3.13
179+
- name: Remove conda-index
180+
run: mamba remove conda-index
181+
161182
- name: Install dpnp
162-
run: mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
183+
run: |
184+
mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
163185
env:
164186
TEST_CHANNELS: '-c ${{ env.channel-path }} ${{ env.CHANNELS }}'
165187
MAMBA_NO_LOW_SPEED_LIMIT: 1
@@ -193,19 +215,20 @@ jobs:
193215
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
194216
195217
test_windows:
196-
name: Test ['windows-2019', python='${{ matrix.python }}']
218+
name: Test
197219

198220
needs: build
199221

200-
runs-on: windows-2019
222+
runs-on: ${{ matrix.os }}
201223

202224
defaults:
203225
run:
204226
shell: cmd /C CALL {0}
205227

206228
strategy:
207229
matrix:
208-
python: ['3.9', '3.10', '3.11', '3.12']
230+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
231+
os: [windows-2019]
209232

210233
continue-on-error: true
211234

@@ -244,7 +267,7 @@ jobs:
244267
use-mamba: 'true'
245268
channels: conda-forge
246269
conda-remove-defaults: 'true'
247-
python-version: ${{ matrix.python }}
270+
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
248271
activate-environment: ${{ env.TEST_ENV_NAME }}
249272

250273
- name: Store conda paths as envs
@@ -279,6 +302,10 @@ jobs:
279302
echo PACKAGE_VERSION: %PACKAGE_VERSION%
280303
(echo PACKAGE_VERSION=%PACKAGE_VERSION%) >> %GITHUB_ENV%
281304
305+
# conda-index does not support python 3.13
306+
- name: Remove conda-index
307+
run: mamba remove conda-index
308+
282309
- name: Install dpnp
283310
run: |
284311
@echo on
@@ -325,13 +352,13 @@ jobs:
325352
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
326353
327354
upload:
328-
name: Upload ['${{ matrix.os }}', python='${{ matrix.python }}']
355+
name: Upload
329356

330357
needs: [test_linux, test_windows]
331358

332359
strategy:
333360
matrix:
334-
python: ['3.9', '3.10', '3.11', '3.12']
361+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
335362
os: [ubuntu-22.04, windows-2019]
336363

337364
runs-on: ${{ matrix.os }}
@@ -406,7 +433,7 @@ jobs:
406433
channels: conda-forge
407434
conda-remove-defaults: 'true'
408435
run-post: 'false'
409-
python-version: '3.12'
436+
python-version: '3.13'
410437
activate-environment: 'cleanup'
411438

412439
- name: Install anaconda-client

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

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ env:
1515
PACKAGE_NAME: dpnp
1616
CHANNELS: '-c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
1717
TEST_ENV_NAME: test
18-
RERUN_TESTS_ON_FAILURE: 'true'
1918
RUN_TESTS_MAX_ATTEMPTS: 2
2019

2120
jobs:
2221
test:
23-
name: Test ['${{ matrix.runner }}', python='${{ matrix.python }}']
22+
name: Test
23+
24+
# disable scheduled workflow to be run in forks
25+
if: github.event.repository.fork == false
2426

2527
runs-on: ${{ matrix.runner }}
2628

@@ -33,19 +35,42 @@ jobs:
3335
actions: write
3436

3537
strategy:
38+
fail-fast: false
3639
matrix:
37-
python: ['3.9', '3.10', '3.11', '3.12']
40+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
3841
runner: [ubuntu-22.04, ubuntu-24.04, windows-2019]
3942

40-
continue-on-error: false
41-
4243
steps:
4344
- name: Cancel Previous Runs
4445
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
4546
with:
4647
access_token: ${{ github.token }}
4748

49+
- name: Find the latest tag
50+
id: find_latest_tag
51+
uses: oprypin/find-latest-tag@dd2729fe78b0bb55523ae2b2a310c6773a652bd1 # 1.1.2
52+
with:
53+
repository: IntelPython/dpnp
54+
releases-only: false
55+
56+
- name: Print latest tag
57+
run: |
58+
echo "Latest tag is ${{ steps.find_latest_tag.outputs.tag }}"
59+
4860
- name: Setup miniconda
61+
id: setup_miniconda
62+
continue-on-error: true
63+
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
64+
with:
65+
miniforge-version: latest
66+
use-mamba: 'true'
67+
channels: conda-forge
68+
conda-remove-defaults: 'true'
69+
python-version: ${{ matrix.python }}
70+
activate-environment: ${{ env.TEST_ENV_NAME }}
71+
72+
- name: ReSetup miniconda
73+
if: steps.setup_miniconda.outcome == 'failure'
4974
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
5075
with:
5176
miniforge-version: latest
@@ -56,10 +81,15 @@ jobs:
5681
activate-environment: ${{ env.TEST_ENV_NAME }}
5782

5883
- name: Install dpnp
84+
id: install_dpnp
85+
continue-on-error: true
5986
run: |
60-
mamba install ${{ env.PACKAGE_NAME }} pytest ${{ env.CHANNELS }}
61-
env:
62-
MAMBA_NO_LOW_SPEED_LIMIT: 1
87+
mamba install ${{ env.PACKAGE_NAME }}=${{ steps.find_latest_tag.outputs.tag }} pytest ${{ env.CHANNELS }}
88+
89+
- name: ReInstall dpnp
90+
if: steps.install_dpnp.outcome == 'failure'
91+
run: |
92+
mamba install ${{ env.PACKAGE_NAME }}=${{ steps.find_latest_tag.outputs.tag }} pytest ${{ env.CHANNELS }}
6393
6494
- name: List installed packages
6595
run: mamba list
@@ -84,14 +114,15 @@ jobs:
84114
python -c "import dpnp; print(dpnp.__version__)"
85115
86116
- name: Run tests
87-
if: env.RERUN_TESTS_ON_FAILURE != 'true'
117+
id: run_tests
118+
continue-on-error: true
88119
run: |
89120
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
90121
env:
91122
SYCL_CACHE_PERSISTENT: 1
92123

93124
- name: ReRun tests on Linux
94-
if: env.RERUN_TESTS_ON_FAILURE == 'true' && matrix.runner != 'windows-2019'
125+
if: steps.run_tests.outcome == 'failure' && matrix.runner != 'windows-2019'
95126
id: run_tests_linux
96127
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
97128
with:
@@ -108,7 +139,7 @@ jobs:
108139
SYCL_CACHE_PERSISTENT: 1
109140

110141
- name: ReRun tests on Windows
111-
if: env.RERUN_TESTS_ON_FAILURE == 'true' && matrix.runner == 'windows-2019'
142+
if: steps.run_tests.outcome == 'failure' && matrix.runner == 'windows-2019'
112143
id: run_tests_win
113144
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
114145
with:

.github/workflows/openssf-scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ jobs:
6060
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6161
# format to the repository Actions tab.
6262
- name: "Upload artifact"
63-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
63+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
6464
with:
6565
name: SARIF file
6666
path: results.sarif
6767
retention-days: 14
6868

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

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions: read-all
99

1010
jobs:
1111
pre-commit:
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-22.04
1313
steps:
1414
- name: Set up clang-format
1515
run: |
@@ -31,7 +31,7 @@ jobs:
3131
- name: Set up python
3232
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
3333
with:
34-
python-version: '3.12'
34+
python-version: '3.13'
3535

3636
- name: Run pre-commit checks
3737
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016-2024, Intel Corporation
1+
Copyright (c) 2016-2025, Intel Corporation
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

benchmarks/pytest_benchmark/test_random.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# cython: language_level=3
22
# -*- coding: utf-8 -*-
33
# *****************************************************************************
4-
# Copyright (c) 2016-2024, Intel Corporation
4+
# Copyright (c) 2016-2025, Intel Corporation
55
# All rights reserved.
66
#
77
# Redistribution and use in source and binary forms, with or without

0 commit comments

Comments
 (0)