Skip to content

Commit 5da8575

Browse files
Merge branch 'master' into task/SAT-7028
2 parents 76c65de + def2ea1 commit 5da8575

50 files changed

Lines changed: 3330 additions & 1127 deletions

Some content is hidden

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

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ e62718415aa3660da5f607e352c991a063a54219
2020

2121
# Bump clang-format from 12.0.1 to 22.1.0 version
2222
c2d65bd451a7d8e5b6319147da95e9dabf7a382b
23+
24+
# cython-lint cleanup
25+
6afda951b26d59aee7488f40c40968feb4725ad8

.github/workflows/build-sphinx.yml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ permissions: read-all
1111
env:
1212
GH_BOT_NAME: 'github-actions[bot]'
1313
GH_BOT_EMAIL: 'github-actions[bot]@users.noreply.github.com'
14-
GH_EVENT_OPEN_PR_UPSTREAM: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' &&
15-
github.event.pull_request && !github.event.pull_request.base.repo.fork }}
1614
GH_EVENT_PUSH_UPSTREAM: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' &&
1715
github.event.ref == 'refs/heads/master' && github.event.repository && !github.event.repository.fork }}
16+
GH_EVENT_PR_OPEN: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' }}
1817
PUBLISH_DIR: doc/_build/html/
1918

2019
defaults:
@@ -25,7 +24,7 @@ jobs:
2524
build-and-deploy:
2625
name: Build and Deploy Docs
2726

28-
runs-on: ubuntu-22.04
27+
runs-on: ubuntu-latest
2928
timeout-minutes: 90
3029

3130
permissions:
@@ -71,13 +70,6 @@ jobs:
7170
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
7271
sudo apt update
7372
74-
- name: Update libstdc++-dev
75-
run: |
76-
sudo apt remove -y gcc-7 g++-7 gcc-8 g++-8 gcc-10 g++-10
77-
sudo apt remove -y libstdc++-10-dev
78-
sudo apt autoremove
79-
sudo apt install --reinstall -y gcc-9 g++-9 libstdc++-9-dev
80-
8173
- name: Install Intel OneAPI
8274
if: env.oneapi-pkgs-env == ''
8375
run: |
@@ -98,7 +90,7 @@ jobs:
9890
run: |
9991
sudo add-apt-repository ppa:graphics-drivers/ppa
10092
sudo apt-get update
101-
sudo apt-get install -y libnvidia-gl-450
93+
sudo apt-get install -y libnvidia-gl-550
10294
sudo apt-get install -y nvidia-cuda-toolkit clinfo
10395
10496
- name: Checkout repo
@@ -191,10 +183,30 @@ jobs:
191183
- name: Copy backend docs
192184
run: cp -r dpnp/backend/doc/html ${{ env.PUBLISH_DIR }}/backend_doc
193185

186+
# Detect if this is a fork PR
187+
- name: Check if fork PR
188+
id: check_fork
189+
run: |
190+
IS_FORK="false"
191+
if [ "${{ github.event_name }}" == "pull_request" ] && [ "${{ github.event.pull_request.head.repo.fork }}" == "true" ]; then
192+
IS_FORK="true"
193+
fi
194+
echo "is_fork=$IS_FORK" >> "$GITHUB_OUTPUT"
195+
echo "Is fork PR: $IS_FORK"
196+
197+
# Upload artifact for fork PRs
198+
- name: Upload docs artifact (Fork PRs)
199+
if: env.GH_EVENT_PR_OPEN == 'true' && steps.check_fork.outputs.is_fork == 'true'
200+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
201+
with:
202+
name: pr-${{ github.event.number }}-docs
203+
path: ${{ env.PUBLISH_DIR }}
204+
retention-days: 30
205+
194206
# The step is only used to build docs while pushing a PR to "master"
195207
- name: Deploy docs
196208
if: env.GH_EVENT_PUSH_UPSTREAM == 'true'
197-
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
209+
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
198210
with:
199211
github_token: ${{ secrets.GITHUB_TOKEN }}
200212
publish_dir: ${{ env.PUBLISH_DIR }}
@@ -206,8 +218,8 @@ jobs:
206218

207219
# The step is only used to build docs while pushing to PR branch
208220
- name: Publish pull-request docs
209-
if: env.GH_EVENT_OPEN_PR_UPSTREAM == 'true'
210-
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
221+
if: env.GH_EVENT_PR_OPEN == 'true' && steps.check_fork.outputs.is_fork == 'false'
222+
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
211223
with:
212224
github_token: ${{ secrets.GITHUB_TOKEN }}
213225
publish_dir: ${{ env.PUBLISH_DIR }}
@@ -220,8 +232,10 @@ jobs:
220232
user_email: ${{ env.GH_BOT_EMAIL }}
221233

222234
# The step is only used to build docs while pushing to PR branch
235+
# Note: Fork PRs have read-only GITHUB_TOKEN and cannot post comments
236+
# See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflows-in-forked-repositories
223237
- name: Comment with URL to published pull-request docs
224-
if: env.GH_EVENT_OPEN_PR_UPSTREAM == 'true'
238+
if: env.GH_EVENT_PR_OPEN == 'true' && steps.check_fork.outputs.is_fork == 'false'
225239
env:
226240
PR_NUM: ${{ github.event.number }}
227241
uses: mshick/add-pr-comment@8e4927817251f1ff60c001f04568532b38e0b4a0 # v3.11.0.8.3.11.0
@@ -235,7 +249,7 @@ jobs:
235249
clean:
236250
if: |
237251
github.event_name == 'pull_request' && github.event.action == 'closed' &&
238-
github.event.pull_request && !github.event.pull_request.base.repo.fork
252+
github.event.pull_request.head.repo && !github.event.pull_request.head.repo.fork
239253
240254
needs: build-and-deploy
241255

.github/workflows/check-onemath.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
fail-fast: false
7272
matrix:
7373
python: ['3.13'] # no dpctl package on PyPI with enabled python 3.14 support
74-
os: [ubuntu-22.04] # windows-2022 - no DFT support for Windows in oneMKL
74+
os: [ubuntu-latest] # windows-2022 - no DFT support for Windows in oneMKL
7575

7676
runs-on: ${{ matrix.os }}
7777
timeout-minutes: 120
@@ -188,7 +188,7 @@ jobs:
188188
fail-fast: false
189189
matrix:
190190
python: ['3.13'] # no dpctl package on PyPI with enabled python 3.14 support
191-
os: [ubuntu-22.04] # windows-2022 - no DFT support for Windows in oneMKL
191+
os: [ubuntu-latest] # windows-2022 - no DFT support for Windows in oneMKL
192192

193193
runs-on: ${{ matrix.os }}
194194
timeout-minutes: 60

.github/workflows/conda-package.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ jobs:
457457
fail-fast: false
458458
matrix:
459459
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
460-
os: [ubuntu-22.04, windows-2022]
460+
os: [ubuntu-latest, windows-2022]
461461

462462
runs-on: ${{ matrix.os }}
463463
timeout-minutes: 10
@@ -537,11 +537,7 @@ jobs:
537537
# Needed to add a comment to a pull request's issue
538538
pull-requests: write
539539

540-
strategy:
541-
matrix:
542-
os: [ubuntu-22.04]
543-
544-
runs-on: ${{ matrix.os }}
540+
runs-on: ubuntu-latest
545541
timeout-minutes: 15
546542

547543
defaults:
@@ -707,7 +703,7 @@ jobs:
707703

708704
needs: [upload]
709705

710-
runs-on: 'ubuntu-latest'
706+
runs-on: ubuntu-latest
711707
timeout-minutes: 10
712708

713709
defaults:

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ jobs:
8181
python-version: ${{ matrix.python }}
8282
activate-environment: ${{ env.test-env-name }}
8383

84+
- name: Install OCL CPU RT from Intel channel
85+
run: mamba install intel-opencl-rt=*=intel_* ${{ env.channels-list }}
86+
8487
- name: Install dpnp
8588
id: install_dpnp
8689
continue-on-error: true
@@ -92,9 +95,6 @@ jobs:
9295
run: |
9396
mamba install ${{ env.package-name }}=${{ steps.find_latest_tag.outputs.tag }} ${{ env.test-packages }} ${{ env.channels-list }}
9497
95-
- name: Install OCL CPU RT from Intel channel
96-
run: mamba install intel-opencl-rt=*=intel_* ${{ env.channels-list }}
97-
9898
- name: List installed packages
9999
run: mamba list
100100

.github/workflows/generate_coverage.yaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,18 @@ jobs:
4646
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
4747
sudo apt update
4848
49-
- name: Install latest Intel OneAPI
49+
# Pinned to OneAPI 2025.3 due to known 2026.0 DPC++ compiler issue with Segfault during the sycl-post-link
50+
# TODO: renmove once CMPLRLLVM-75178 is resolved and released
51+
- name: Install Intel OneAPI
5052
if: env.oneapi-pkgs-env == ''
5153
run: |
52-
sudo apt install hwloc \
53-
intel-oneapi-mkl \
54-
intel-oneapi-umf \
55-
intel-oneapi-mkl-devel \
56-
intel-oneapi-tbb-devel \
57-
intel-oneapi-libdpstd-devel \
58-
intel-oneapi-compiler-dpcpp-cpp
54+
sudo apt install hwloc \
55+
intel-oneapi-mkl-2025.3 \
56+
intel-oneapi-umf-1.0 \
57+
intel-oneapi-mkl-devel-2025.3 \
58+
intel-oneapi-tbb-devel-2022.3 \
59+
intel-oneapi-libdpstd-devel-2022.10 \
60+
intel-oneapi-compiler-dpcpp-cpp-2025.3
5961
6062
- name: Checkout repo
6163
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -107,10 +109,14 @@ jobs:
107109
# with a newer version of the DPC++ compiler).
108110
# Installing dpctl via the pip manager has no such limitation, as the package has no
109111
# run dependency on the DPC++ RT pip package, so this is why the step is necessary here.
112+
# - name: Install dpctl
113+
# if: env.oneapi-pkgs-env == ''
114+
# run: |
115+
# pip install -r ${{ env.dpctl-pkg-txt }}
116+
# TODO: renmove pinning once CMPLRLLVM-75178 is resolved and released
110117
- name: Install dpctl
111-
if: env.oneapi-pkgs-env == ''
112118
run: |
113-
pip install -r ${{ env.dpctl-pkg-txt }}
119+
pip install dpctl>=0.23.0dev0 --index-url https://pypi.anaconda.org/dppy/label/coverage/simple
114120
115121
- name: Conda info
116122
run: |

.github/workflows/openssf-scorecard.yml

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

7373
# Upload the results to GitHub's code scanning dashboard.
7474
- name: "Upload to code-scanning"
75-
uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
75+
uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
7676
with:
7777
sarif_file: results.sarif

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
pre-commit:
1212
name: Check
1313

14-
runs-on: ubuntu-22.04
14+
runs-on: ubuntu-latest
1515
timeout-minutes: 10
1616

1717
steps:

.pre-commit-config.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ repos:
6464
additional_dependencies:
6565
- tomli
6666
- repo: https://github.com/psf/black
67-
rev: 26.3.1
67+
rev: 26.5.1
6868
hooks:
6969
- id: black
7070
exclude: "dpnp/_version.py"
@@ -89,7 +89,7 @@ repos:
8989
- flake8-docstrings==1.7.0
9090
- flake8-bugbear==24.12.12
9191
- repo: https://github.com/pre-commit/mirrors-clang-format
92-
rev: v22.1.4
92+
rev: v22.1.5
9393
hooks:
9494
- id: clang-format
9595
args: ["-i"]
@@ -128,8 +128,13 @@ repos:
128128
hooks:
129129
- id: actionlint
130130
- repo: https://github.com/BlankSpruce/gersemi-pre-commit
131-
rev: 0.27.2
131+
rev: 0.27.6
132132
hooks:
133133
- id: gersemi
134134
exclude: "dpnp/backend/cmake/Modules/"
135135
args: ["-i", "-l", "88", "--no-warn-about-unknown-commands"]
136+
- repo: https://github.com/MarcoGorelli/cython-lint
137+
rev: v0.19.0
138+
hooks:
139+
- id: cython-lint
140+
- id: double-quote-cython-strings

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,22 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [0.21.0] - MM/DD/2026
7+
## [0.21.0] - 2026-MM-DD
8+
9+
This release is compatible with NumPy 2.4.5.
810

911
### Added
1012
* Added `dpnp.broadcast` class implementation [#2901](https://github.com/IntelPython/dpnp/pull/2901)
1113

14+
* Added C API functions for `dpnp.tensor.usm_ndarray` setters and getters to avoid ABI breakage if `dpnp.tensor.usm_ndarray` is modified [gh-2866](https://github.com/IntelPython/dpnp/pull/2866)
15+
* Added support for buffer protocol objects as advanced index keys in `dpnp.ndarray` [#2889](https://github.com/IntelPython/dpnp/pull/2889)
16+
1217
### Changed
1318

19+
* Changed `dpnp.meshgrid` and `dpnp.tensor.meshgrid` to return a tuple instead of a list, aligning with NumPy 2.5+ behavior and 2025.12 version of the Python array API standard [#2854](https://github.com/IntelPython/dpnp/pull/2854)
20+
* Updated `searchsorted` implementations to align with the 2025.12 array API spec [gh-2902](https://github.com/IntelPython/dpnp/pull/2902)
21+
* Updated tests to align with NumPy 2.4.5 compatibility [gh-2920](https://github.com/IntelPython/dpnp/pull/2920)
22+
1423
### Deprecated
1524

1625
### Removed
@@ -19,6 +28,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1928

2029
* Fixed incorrect in-place advanced indexing for 4D arrays when using `range` or `list` as index keys [#2872](https://github.com/IntelPython/dpnp/pull/2872)
2130
* Fixed `conda build` command syntax in GitHub workflows and documentation to use `conda-build` [#2888](https://github.com/IntelPython/dpnp/pull/2888)
31+
* Fixed incorrect `dpnp.tensor.acosh` result for `complex(±0, NaN)` special case to match the Python Array API specification [#2914](https://github.com/IntelPython/dpnp/pull/2914)
32+
* Fixed fork PR documentation workflow failures by implementing conditional publishing strategy: upstream PRs publish to GitHub Pages with comment, fork PRs upload artifacts [#2910](https://github.com/IntelPython/dpnp/pull/2910)
33+
* Fixed missing `libtensor` headers in the installed `dpnp` package [#2915](https://github.com/IntelPython/dpnp/pull/2915)
34+
* Fixed boolean mask indexing to raise `IndexError` when mask dimensions don't match the indexed array dimensions, aligning with NumPy behavior. Previously, incompatible boolean masks silently returned incorrect results instead of raising an error [#2929](https://github.com/IntelPython/dpnp/pull/2929)
35+
* Fixed a bug in `astype` where casting floating point types to unsigned integral types could cause an intermediate signed integral type to overflow, leading to incorrect results [#2930](https://github.com/IntelPython/dpnp/pull/2930)
2236

2337
### Security
2438

0 commit comments

Comments
 (0)