Skip to content

Commit fb93a76

Browse files
authored
Merge branch 'master' into align-third-party-tests
2 parents de1c46d + 9127df2 commit fb93a76

File tree

17 files changed

+1351
-167
lines changed

17 files changed

+1351
-167
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919

2020
defaults:
2121
run:
22-
shell: bash -l {0}
22+
shell: bash -el {0}
2323

2424
jobs:
2525
build-and-deploy:
@@ -36,7 +36,7 @@ jobs:
3636
pull-requests: write
3737

3838
env:
39-
python-ver: '3.9'
39+
python-ver: '3.12'
4040
CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
4141
NO_INTEL_CHANNELS: '-c dppy/label/dev -c conda-forge --override-channels'
4242
# Install the latest oneAPI compiler to work around an issue
@@ -59,13 +59,13 @@ jobs:
5959
with:
6060
docker-images: false
6161

62-
- name: Install Intel repository
62+
- name: Add Intel repository
6363
run: |
64-
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
65-
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
66-
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
67-
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
68-
sudo apt-get update
64+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
65+
cat GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
66+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
67+
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
68+
sudo apt update
6969
7070
- name: Update libstdc++-dev
7171
run: |
@@ -76,11 +76,13 @@ jobs:
7676
7777
- name: Install Intel OneAPI
7878
run: |
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*
79+
sudo apt install hwloc \
80+
intel-oneapi-mkl \
81+
intel-oneapi-umf \
82+
intel-oneapi-mkl-devel \
83+
intel-oneapi-tbb-devel \
84+
intel-oneapi-libdpstd-devel \
85+
intel-oneapi-compiler-dpcpp-cpp
8486
8587
# required by sphinxcontrib-spelling extension
8688
- name: Install enchant package
@@ -130,16 +132,16 @@ jobs:
130132
- name: Install dpnp dependencies
131133
if: env.INSTALL_ONE_API == 'yes'
132134
run: |
133-
mamba install numpy"<1.24" dpctl">=0.18.0dev0" cmake cython pytest ninja scikit-build ${{ env.NO_INTEL_CHANNELS }}
135+
mamba install numpy dpctl">=0.18.0dev0" cmake cython pytest ninja scikit-build ${{ env.NO_INTEL_CHANNELS }}
134136
135137
- name: Install dpnp dependencies
136138
if: env.INSTALL_ONE_API != 'yes'
137139
run: |
138-
mamba install numpy"<1.24" dpctl">=0.18.0dev0" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
140+
mamba install numpy dpctl">=0.18.0dev0" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
139141
cmake cython pytest ninja scikit-build ${{ env.CHANNELS }}
140142
141143
- name: Install cuPy dependencies
142-
run: mamba install cupy cudatoolkit=10.0
144+
run: mamba install cupy
143145

144146
- name: Conda info
145147
run: mamba info

.github/workflows/conda-package.yml

Lines changed: 19 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -19,55 +19,6 @@ env:
1919
RERUN_TESTS_ON_FAILURE: 'true'
2020
RUN_TESTS_MAX_ATTEMPTS: 2
2121
TEST_ENV_NAME: 'test'
22-
TEST_SCOPE: >-
23-
test_absolute.py
24-
test_amin_amax.py
25-
test_arithmetic.py
26-
test_arraycreation.py
27-
test_arraymanipulation.py
28-
test_arraypad.py
29-
test_bitwise.py
30-
test_copy.py
31-
test_counting.py
32-
test_fft.py
33-
test_fill.py
34-
test_flat.py
35-
test_histogram.py
36-
test_indexing.py
37-
test_linalg.py
38-
test_logic.py
39-
test_manipulation.py
40-
test_mathematical.py
41-
test_mixins.py
42-
test_nanfunctions.py
43-
test_ndarray.py
44-
test_outer.py
45-
test_product.py
46-
test_random_state.py
47-
test_search.py
48-
test_sort.py
49-
test_special.py
50-
test_statistics.py
51-
test_sum.py
52-
test_sycl_queue.py
53-
test_umath.py
54-
test_usm_type.py
55-
third_party/cupy/core_tests
56-
third_party/cupy/fft_tests
57-
third_party/cupy/creation_tests
58-
third_party/cupy/indexing_tests
59-
third_party/cupy/lib_tests
60-
third_party/cupy/linalg_tests
61-
third_party/cupy/logic_tests
62-
third_party/cupy/manipulation_tests
63-
third_party/cupy/math_tests
64-
third_party/cupy/padding_tests
65-
third_party/cupy/sorting_tests
66-
third_party/cupy/statistics_tests
67-
third_party/cupy/test_ndim.py
68-
third_party/cupy/test_numpy_interop.py
69-
third_party/cupy/test_type_routines.py
70-
third_party/cupy/test_typing.py
7122
VER_JSON_NAME: 'version.json'
7223
VER_SCRIPT1: "import json; f = open('version.json', 'r'); j = json.load(f); f.close(); "
7324
VER_SCRIPT2: "d = j['dpnp'][0]; print('='.join((d[s] for s in ('version', 'build'))))"
@@ -89,7 +40,7 @@ jobs:
8940

9041
defaults:
9142
run:
92-
shell: ${{ matrix.os == 'windows-2019' && 'cmd /C CALL {0}' || 'bash -l {0}' }}
43+
shell: ${{ matrix.os == 'windows-2019' && 'cmd /C CALL {0}' || 'bash -el {0}' }}
9344

9445
continue-on-error: true
9546

@@ -125,7 +76,7 @@ jobs:
12576
run: echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
12677

12778
- name: Store conda paths as envs
128-
shell: bash -l {0}
79+
shell: bash -el {0}
12980
run: |
13081
echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/${{ runner.os == 'Linux' && 'linux' || 'win' }}-64/" | tr "\\\\" '/' >> $GITHUB_ENV
13182
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
@@ -148,7 +99,7 @@ jobs:
14899
- name: Build conda package
149100
run: conda build --no-test --python ${{ matrix.python }} --numpy 2.0 ${{ env.CHANNELS }} conda-recipe
150101
env:
151-
MAX_BUILD_CMPL_MKL_VERSION: '2024.3a0'
102+
MAX_BUILD_CMPL_MKL_VERSION: '2025.1a0'
152103

153104
- name: Upload artifact
154105
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
@@ -171,7 +122,7 @@ jobs:
171122

172123
defaults:
173124
run:
174-
shell: bash -l {0}
125+
shell: bash -el {0}
175126

176127
strategy:
177128
matrix:
@@ -264,7 +215,7 @@ jobs:
264215
- name: Run tests
265216
if: env.RERUN_TESTS_ON_FAILURE != 'true'
266217
run: |
267-
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
218+
python -m pytest -q -ra --disable-warnings -vv .
268219
working-directory: ${{ env.tests-path }}
269220

270221
- name: Run tests
@@ -280,7 +231,7 @@ jobs:
280231
. $CONDA/etc/profile.d/conda.sh
281232
conda activate ${{ env.TEST_ENV_NAME }}
282233
cd ${{ env.tests-path }}
283-
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
234+
python -m pytest -q -ra --disable-warnings -vv .
284235
285236
test_windows:
286237
name: Test ['windows-2019', python='${{ matrix.python }}']
@@ -367,7 +318,7 @@ jobs:
367318
@echo on
368319
set "SCRIPT=${{ env.VER_SCRIPT1 }} ${{ env.VER_SCRIPT2 }}"
369320
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
370-
SET PACKAGE_VERSION=%%F
321+
set PACKAGE_VERSION=%%F
371322
)
372323
echo PACKAGE_VERSION: %PACKAGE_VERSION%
373324
(echo PACKAGE_VERSION=%PACKAGE_VERSION%) >> %GITHUB_ENV%
@@ -406,7 +357,11 @@ jobs:
406357
shell: pwsh
407358
run: |
408359
$script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1"
409-
&$script_path
360+
if (Test-Path $script_path) {
361+
&$script_path
362+
} else {
363+
Write-Warning "File $script_path was NOT found!"
364+
}
410365
# Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
411366
$cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg"
412367
Get-Content -Tail 5 -Path $cl_cfg
@@ -419,7 +374,7 @@ jobs:
419374
- name: Run tests
420375
if: env.RERUN_TESTS_ON_FAILURE != 'true'
421376
run: |
422-
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
377+
python -m pytest -q -ra --disable-warnings -vv .
423378
working-directory: ${{ env.tests-path }}
424379

425380
- name: Run tests
@@ -434,7 +389,7 @@ jobs:
434389
command: >-
435390
mamba activate ${{ env.TEST_ENV_NAME }}
436391
& cd ${{ env.tests-path }}
437-
& python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
392+
& python -m pytest -q -ra --disable-warnings -vv .
438393
439394
upload:
440395
name: Upload ['${{ matrix.os }}', python='${{ matrix.python }}']
@@ -450,7 +405,7 @@ jobs:
450405

451406
defaults:
452407
run:
453-
shell: bash -l {0}
408+
shell: bash -el {0}
454409

455410
continue-on-error: true
456411

@@ -499,11 +454,15 @@ jobs:
499454

500455
cleanup_packages:
501456
name: Clean up anaconda packages
457+
502458
needs: [upload]
459+
503460
runs-on: 'ubuntu-latest'
461+
504462
defaults:
505463
run:
506464
shell: bash -el {0}
465+
507466
steps:
508467
- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
509468
with:

.github/workflows/generate_coverage.yaml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
defaults:
1919
run:
20-
shell: bash -l {0}
20+
shell: bash -el {0}
2121

2222
env:
2323
python-ver: '3.12'
@@ -40,20 +40,22 @@ jobs:
4040
- name: Add Intel repository
4141
if: env.INSTALL_ONE_API == 'yes'
4242
run: |
43-
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
44-
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
45-
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
46-
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
47-
sudo apt-get update
43+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
44+
cat GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
45+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
46+
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
47+
sudo apt update
4848
4949
- name: Install latest Intel OneAPI
5050
if: env.INSTALL_ONE_API == 'yes'
5151
run: |
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*
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
5759
5860
- name: Install Lcov
5961
run: |
@@ -109,7 +111,7 @@ jobs:
109111
conda activate coverage
110112
[ -f /opt/intel/oneapi/setvars.sh ] && source /opt/intel/oneapi/setvars.sh
111113
git clean -fxd
112-
python scripts/gen_coverage.py --pytest-opts="--ignore tests/test_random.py" --verbose
114+
python scripts/gen_coverage.py --verbose
113115
114116
- name: Total number of coverage attempts
115117
run: |

conda-recipe/meta.yaml

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

55
package:
66
name: dpnp

doc/reference/ndarray.rst

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ Comparison operators:
249249
dpnp.ndarray.__eq__
250250
dpnp.ndarray.__ne__
251251

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

254254
.. autosummary::
255255
:toctree: generated/
@@ -260,11 +260,11 @@ Truth value of an array (:func:`bool()`):
260260

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

269269

270270
Unary operations:
@@ -300,6 +300,26 @@ Arithmetic:
300300
dpnp.ndarray.__xor__
301301

302302

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+
303323
Arithmetic, in-place:
304324

305325
.. autosummary::
@@ -326,6 +346,8 @@ Matrix Multiplication:
326346
:toctree: generated/
327347

328348
dpnp.ndarray.__matmul__
349+
dpnp.ndarray.__rmatmul__
350+
dpnp.ndarray.__imatmul__
329351

330352

331353
Special methods

0 commit comments

Comments
 (0)