Skip to content

Commit 49788c6

Browse files
authored
Merge branch 'master' into i0-impl
2 parents 035e9d6 + 687b8ea commit 49788c6

File tree

123 files changed

+7248
-825
lines changed

Some content is hidden

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

123 files changed

+7248
-825
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212
GH_BOT_NAME: 'github-actions[bot]'
1313
GH_BOT_EMAIL: 'github-actions[bot]@users.noreply.github.com'
1414
GH_EVENT_OPEN_PR_UPSTREAM: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' &&
15-
github.event.pull_request && !github.event.pull_request.head.repo.fork }}
15+
github.event.pull_request && !github.event.pull_request.base.repo.fork }}
1616
GH_EVENT_PUSH_UPSTREAM: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' &&
1717
github.event.ref == 'refs/heads/master' && github.event.repository && !github.event.repository.fork }}
1818
PUBLISH_DIR: doc/_build/html/
@@ -76,11 +76,11 @@ jobs:
7676
7777
- name: Install Intel OneAPI
7878
run: |
79-
sudo apt-get install intel-oneapi-mkl \
80-
intel-oneapi-mkl-devel \
81-
intel-oneapi-tbb-devel \
82-
intel-oneapi-libdpstd-devel \
83-
intel-oneapi-compiler-dpcpp-cpp
79+
sudo apt-get install intel-oneapi-mkl-2024.2* \
80+
intel-oneapi-mkl-devel-2024.2* \
81+
intel-oneapi-tbb-devel-2021.13* \
82+
intel-oneapi-libdpstd-devel-2022.6* \
83+
intel-oneapi-compiler-dpcpp-cpp-2024.2*
8484
8585
# required by sphinxcontrib-spelling extension
8686
- name: Install enchant package
@@ -96,7 +96,7 @@ jobs:
9696
sudo apt-get install -y nvidia-cuda-toolkit clinfo
9797
9898
- name: Checkout repo
99-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
99+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
100100
with:
101101
fetch-depth: 0
102102

@@ -224,7 +224,7 @@ jobs:
224224
clean:
225225
if: |
226226
github.event_name == 'pull_request' && github.event.action == 'closed' &&
227-
github.event.pull_request && !github.event.pull_request.head.repo.fork
227+
github.event.pull_request && !github.event.pull_request.base.repo.fork
228228
229229
needs: build-and-deploy
230230

@@ -237,7 +237,7 @@ jobs:
237237
runs-on: ubuntu-latest
238238

239239
steps:
240-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
240+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
241241
with:
242242
fetch-depth: 0
243243

.github/workflows/conda-package.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ env:
2525
test_arithmetic.py
2626
test_arraycreation.py
2727
test_arraymanipulation.py
28+
test_arraypad.py
2829
test_bitwise.py
2930
test_copy.py
3031
test_counting.py
3132
test_fft.py
33+
test_fill.py
3234
test_flat.py
3335
test_histogram.py
3436
test_indexing.py
@@ -59,10 +61,12 @@ env:
5961
third_party/cupy/logic_tests
6062
third_party/cupy/manipulation_tests
6163
third_party/cupy/math_tests
64+
third_party/cupy/padding_tests
6265
third_party/cupy/sorting_tests
6366
third_party/cupy/statistics_tests/test_histogram.py
6467
third_party/cupy/statistics_tests/test_meanvar.py
6568
third_party/cupy/test_ndim.py
69+
third_party/cupy/test_type_routines.py
6670
VER_JSON_NAME: 'version.json'
6771
VER_SCRIPT1: "import json; f = open('version.json', 'r'); j = json.load(f); f.close(); "
6872
VER_SCRIPT2: "d = j['dpnp'][0]; print('='.join((d[s] for s in ('version', 'build'))))"
@@ -95,7 +99,7 @@ jobs:
9599
access_token: ${{ github.token }}
96100

97101
- name: Checkout DPNP repo
98-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
102+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
99103
with:
100104
fetch-depth: 0
101105

@@ -129,7 +133,7 @@ jobs:
129133
run: mamba install conda-build=${{ env.CONDA_BUILD_VERSION}}
130134

131135
- name: Cache conda packages
132-
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
136+
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
133137
env:
134138
CACHE_NUMBER: 1 # Increase to reset cache
135139
with:
@@ -142,6 +146,8 @@ jobs:
142146
143147
- name: Build conda package
144148
run: conda build --no-test --python ${{ matrix.python }} --numpy 2.0 ${{ env.CHANNELS }} conda-recipe
149+
env:
150+
MAX_BUILD_CMPL_MKL_VERSION: '2024.3a0'
145151

146152
- name: Upload artifact
147153
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
@@ -229,7 +235,7 @@ jobs:
229235
TEST_CHANNELS: '-c ${{ env.channel-path }} ${{ env.CHANNELS }}'
230236

231237
- name: Cache conda packages
232-
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
238+
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
233239
env:
234240
CACHE_NUMBER: 1 # Increase to reset cache
235241
with:
@@ -373,7 +379,7 @@ jobs:
373379
run: more lockfile
374380

375381
- name: Cache conda packages
376-
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
382+
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
377383
env:
378384
CACHE_NUMBER: 1 # Increase to reset cache
379385
with:
@@ -514,7 +520,7 @@ jobs:
514520
run: mamba install anaconda-client
515521

516522
- name: Checkout repo
517-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
523+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
518524
with:
519525
repository: IntelPython/devops-tools
520526
fetch-depth: 0

.github/workflows/generate_coverage.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
access_token: ${{ github.token }}
3434

3535
- name: Checkout repo
36-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
36+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3737
with:
3838
fetch-depth: 0
3939

@@ -49,11 +49,11 @@ jobs:
4949
- name: Install latest Intel OneAPI
5050
if: env.INSTALL_ONE_API == 'yes'
5151
run: |
52-
sudo apt-get install intel-oneapi-mkl \
53-
intel-oneapi-mkl-devel \
54-
intel-oneapi-tbb-devel \
55-
intel-oneapi-libdpstd-devel \
56-
intel-oneapi-compiler-dpcpp-cpp
52+
sudo apt-get install intel-oneapi-mkl-2024.2* \
53+
intel-oneapi-mkl-devel-2024.2* \
54+
intel-oneapi-tbb-devel-2021.13* \
55+
intel-oneapi-libdpstd-devel-2022.6* \
56+
intel-oneapi-compiler-dpcpp-cpp-2024.2*
5757
5858
- name: Install Lcov
5959
run: |

.github/workflows/openssf-scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
steps:
3535
- name: "Checkout code"
36-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
36+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3737
with:
3838
persist-credentials: false
3939

@@ -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@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
71+
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
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
@@ -26,10 +26,10 @@ jobs:
2626
pylint
2727
2828
- name: Checkout DPNP repo
29-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3030

3131
- name: Set up python
32-
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
32+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
3333
with:
3434
python-version: '3.12'
3535

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ repos:
5252
rev: 24.4.2
5353
hooks:
5454
- id: black
55-
args: ["--check", "--diff", "--color"]
5655
- repo: https://github.com/pycqa/isort
5756
rev: 5.13.2
5857
hooks:

conda-recipe/meta.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
{% set max_compiler_and_mkl_version = environ.get("MAX_BUILD_CMPL_MKL_VERSION", "2026.0a0") %}
12
{% set required_compiler_and_mkl_version = "2024.2" %}
2-
{% set required_dpctl_version = "0.18.0*" %}
3+
{% set required_dpctl_version = "0.18.1" %}
34

45
package:
56
name: dpnp
@@ -17,14 +18,14 @@ requirements:
1718
- ninja
1819
- git
1920
- dpctl >={{ required_dpctl_version }}
20-
- mkl-devel-dpcpp >={{ required_compiler_and_mkl_version }}
21+
- mkl-devel-dpcpp >={{ required_compiler_and_mkl_version }},<{{ max_compiler_and_mkl_version }}
2122
- onedpl-devel
2223
- tbb-devel
2324
- wheel
2425
- scikit-build
2526
build:
2627
- {{ compiler('cxx') }}
27-
- {{ compiler('dpcpp') }} >={{ required_compiler_and_mkl_version }}
28+
- {{ compiler('dpcpp') }} >={{ required_compiler_and_mkl_version }},<{{ max_compiler_and_mkl_version }}
2829
- sysroot_linux-64 >=2.28 # [linux]
2930
run:
3031
- python

doc/reference/binary.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Bit-wise operations
2-
=================
2+
===================
33

44
.. https://numpy.org/doc/stable/reference/routines.bitwise.html
55
@@ -22,7 +22,6 @@ Element-wise bit operations
2222
dpnp.bitwise_right_shift
2323
dpnp.bitwise_count
2424

25-
2625
Bit packing
2726
-----------
2827

@@ -33,7 +32,6 @@ Bit packing
3332
dpnp.packbits
3433
dpnp.unpackbits
3534

36-
3735
Output formatting
3836
-----------------
3937

doc/reference/linalg.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ Other matrix operations
8787
-----------------------
8888
.. autosummary::
8989
:toctree: generated/
90+
:nosignatures:
9091

9192
dpnp.diagonal
9293
dpnp.linalg.diagonal (Array API compatible)
@@ -96,5 +97,6 @@ Exceptions
9697
----------
9798
.. autosummary::
9899
:toctree: generated/
100+
:nosignatures:
99101

100102
dpnp.linalg.linAlgError

doc/reference/ndarray.rst

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ Array conversion
134134

135135
dpnp.ndarray.item
136136
dpnp.ndarray.tolist
137-
dpnp.ndarray.itemset
138137
dpnp.ndarray.tostring
139138
dpnp.ndarray.tobytes
140139
dpnp.ndarray.tofile
@@ -250,7 +249,7 @@ Comparison operators:
250249
dpnp.ndarray.__eq__
251250
dpnp.ndarray.__ne__
252251

253-
Truth value of an array (:func:`bool()`):
252+
Truth value of an array (:class:`bool() <bool>`):
254253

255254
.. autosummary::
256255
:toctree: generated/
@@ -261,11 +260,11 @@ Truth value of an array (:func:`bool()`):
261260

262261
Truth-value testing of an array invokes
263262
:meth:`dpnp.ndarray.__bool__`, which raises an error if the number of
264-
elements in the array is larger than 1, because the truth value
263+
elements in the array is not 1, because the truth value
265264
of such arrays is ambiguous. Use :meth:`.any() <dpnp.ndarray.any>` and
266265
:meth:`.all() <dpnp.ndarray.all>` instead to be clear about what is meant
267-
in such cases. (If the number of elements is 0, the array evaluates
268-
to ``False``.)
266+
in such cases. (If you wish to check for whether an array is empty,
267+
use for example ``.size > 0``.)
269268

270269

271270
Unary operations:
@@ -301,6 +300,26 @@ Arithmetic:
301300
dpnp.ndarray.__xor__
302301

303302

303+
Arithmetic, reflected:
304+
305+
.. autosummary::
306+
:toctree: generated/
307+
:nosignatures:
308+
309+
dpnp.ndarray.__radd__
310+
dpnp.ndarray.__rsub__
311+
dpnp.ndarray.__rmul__
312+
dpnp.ndarray.__rtruediv__
313+
dpnp.ndarray.__rfloordiv__
314+
dpnp.ndarray.__rmod__
315+
dpnp.ndarray.__rpow__
316+
dpnp.ndarray.__rlshift__
317+
dpnp.ndarray.__rrshift__
318+
dpnp.ndarray.__rand__
319+
dpnp.ndarray.__ror__
320+
dpnp.ndarray.__rxor__
321+
322+
304323
Arithmetic, in-place:
305324

306325
.. autosummary::
@@ -327,6 +346,8 @@ Matrix Multiplication:
327346
:toctree: generated/
328347

329348
dpnp.ndarray.__matmul__
349+
dpnp.ndarray.__rmatmul__
350+
dpnp.ndarray.__imatmul__
330351

331352

332353
Special methods

0 commit comments

Comments
 (0)