Skip to content

Commit b26c4d4

Browse files
authored
Merge branch 'master' into remove-wa-and-enable-opencl-gpu-tests
2 parents 3a718d8 + 11f251d commit b26c4d4

24 files changed

+1569
-217
lines changed

.github/workflows/build-sphinx.yml

+21-25
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
@@ -102,21 +104,15 @@ jobs:
102104

103105
# https://github.com/marketplace/actions/setup-miniconda
104106
- name: Setup miniconda
105-
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
107+
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
106108
with:
107109
miniforge-version: latest
108-
use-mamba: true
110+
use-mamba: 'true'
109111
channels: conda-forge
112+
conda-remove-defaults: 'true'
110113
python-version: ${{ env.python-ver }}
111114
activate-environment: 'docs'
112115

113-
# Here is an issue in conda gh-12356 causing adding defaults to the list of channels
114-
# upon running `conda config --append channels conda-forge`, while mamba requires to have only conda-forge channel
115-
- name: Remove defaults channel
116-
run: |
117-
conda config --remove channels defaults
118-
conda config --show
119-
120116
# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
121117
- name: Disable speed limit check in mamba
122118
run: echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
@@ -130,16 +126,16 @@ jobs:
130126
- name: Install dpnp dependencies
131127
if: env.INSTALL_ONE_API == 'yes'
132128
run: |
133-
mamba install numpy"<1.24" dpctl">=0.18.0dev0" cmake cython pytest ninja scikit-build ${{ env.NO_INTEL_CHANNELS }}
129+
mamba install numpy dpctl">=0.18.0dev0" cmake cython pytest ninja scikit-build ${{ env.NO_INTEL_CHANNELS }}
134130
135131
- name: Install dpnp dependencies
136132
if: env.INSTALL_ONE_API != 'yes'
137133
run: |
138-
mamba install numpy"<1.24" dpctl">=0.18.0dev0" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
134+
mamba install numpy dpctl">=0.18.0dev0" mkl-devel-dpcpp onedpl-devel tbb-devel dpcpp_linux-64 \
139135
cmake cython pytest ninja scikit-build ${{ env.CHANNELS }}
140136
141137
- name: Install cuPy dependencies
142-
run: mamba install cupy cudatoolkit=10.0
138+
run: mamba install cupy
143139

144140
- name: Conda info
145141
run: mamba info

.github/workflows/conda-package.yml

+36-90
Original file line numberDiff line numberDiff line change
@@ -19,54 +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/test_histogram.py
67-
third_party/cupy/statistics_tests/test_meanvar.py
68-
third_party/cupy/test_ndim.py
69-
third_party/cupy/test_type_routines.py
7022
VER_JSON_NAME: 'version.json'
7123
VER_SCRIPT1: "import json; f = open('version.json', 'r'); j = json.load(f); f.close(); "
7224
VER_SCRIPT2: "d = j['dpnp'][0]; print('='.join((d[s] for s in ('version', 'build'))))"
@@ -88,7 +40,7 @@ jobs:
8840

8941
defaults:
9042
run:
91-
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}' }}
9244

9345
continue-on-error: true
9446

@@ -104,27 +56,21 @@ jobs:
10456
fetch-depth: 0
10557

10658
- name: Setup miniconda
107-
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
59+
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
10860
with:
10961
miniforge-version: latest
110-
use-mamba: true
62+
use-mamba: 'true'
11163
channels: conda-forge
64+
conda-remove-defaults: 'true'
11265
python-version: ${{ matrix.python }}
11366
activate-environment: 'build'
11467

115-
# Here is an issue in conda gh-12356 causing adding defaults to the list of channels
116-
# upon running `conda config --append channels conda-forge`, while mamba requires to have only conda-forge channel
117-
- name: Remove defaults channel
118-
run: |
119-
conda config --remove channels defaults
120-
conda config --show
121-
12268
# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
12369
- name: Disable speed limit check in mamba
12470
run: echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
12571

12672
- name: Store conda paths as envs
127-
shell: bash -l {0}
73+
shell: bash -el {0}
12874
run: |
12975
echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/${{ runner.os == 'Linux' && 'linux' || 'win' }}-64/" | tr "\\\\" '/' >> $GITHUB_ENV
13076
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
@@ -137,7 +83,7 @@ jobs:
13783
env:
13884
CACHE_NUMBER: 1 # Increase to reset cache
13985
with:
140-
path: ${{ env.CONDA_PKGS_DIR }}
86+
path: ${{ runner.os == 'Linux' && '/home/runner/conda_pkgs_dir' || 'C:\Users\runneradmin\conda_pkgs_dir' }}
14187
key:
14288
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('**/meta.yaml') }}
14389
restore-keys: |
@@ -147,7 +93,7 @@ jobs:
14793
- name: Build conda package
14894
run: conda build --no-test --python ${{ matrix.python }} --numpy 2.0 ${{ env.CHANNELS }} conda-recipe
14995
env:
150-
MAX_BUILD_CMPL_MKL_VERSION: '2024.3a0'
96+
MAX_BUILD_CMPL_MKL_VERSION: '2025.1a0'
15197

15298
- name: Upload artifact
15399
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
@@ -170,7 +116,7 @@ jobs:
170116

171117
defaults:
172118
run:
173-
shell: bash -l {0}
119+
shell: bash -el {0}
174120

175121
strategy:
176122
matrix:
@@ -199,17 +145,15 @@ jobs:
199145
tar -xvf ${{ env.pkg-path-in-channel }}/${{ env.PACKAGE_NAME }}-*.tar.bz2 -C ${{ env.extracted-pkg-path }}
200146
201147
- name: Setup miniconda
202-
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
148+
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
203149
with:
204150
miniforge-version: latest
205-
use-mamba: true
151+
use-mamba: 'true'
206152
channels: conda-forge
153+
conda-remove-defaults: 'true'
207154
python-version: ${{ matrix.python }}
208155
activate-environment: ${{ env.TEST_ENV_NAME }}
209156

210-
- name: Remove defaults channel
211-
run: conda config --remove channels defaults
212-
213157
- name: Install conda-index
214158
run: mamba install conda-index=${{ env.CONDA_INDEX_VERSION }}
215159

@@ -263,7 +207,7 @@ jobs:
263207
- name: Run tests
264208
if: env.RERUN_TESTS_ON_FAILURE != 'true'
265209
run: |
266-
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
210+
python -m pytest -q -ra --disable-warnings -vv .
267211
working-directory: ${{ env.tests-path }}
268212

269213
- name: Run tests
@@ -279,7 +223,7 @@ jobs:
279223
. $CONDA/etc/profile.d/conda.sh
280224
conda activate ${{ env.TEST_ENV_NAME }}
281225
cd ${{ env.tests-path }}
282-
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
226+
python -m pytest -q -ra --disable-warnings -vv .
283227
284228
test_windows:
285229
name: Test ['windows-2019', python='${{ matrix.python }}']
@@ -328,17 +272,15 @@ jobs:
328272
dir ${{ env.extracted-pkg-path }}
329273
330274
- name: Setup miniconda
331-
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
275+
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
332276
with:
333277
miniforge-version: latest
334-
use-mamba: true
278+
use-mamba: 'true'
335279
channels: conda-forge
280+
conda-remove-defaults: 'true'
336281
python-version: ${{ matrix.python }}
337282
activate-environment: ${{ env.TEST_ENV_NAME }}
338283

339-
- name: Remove defaults channel
340-
run: conda config --remove channels defaults
341-
342284
- name: Store conda paths as envs
343285
run: |
344286
@echo on
@@ -366,7 +308,7 @@ jobs:
366308
@echo on
367309
set "SCRIPT=${{ env.VER_SCRIPT1 }} ${{ env.VER_SCRIPT2 }}"
368310
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
369-
SET PACKAGE_VERSION=%%F
311+
set PACKAGE_VERSION=%%F
370312
)
371313
echo PACKAGE_VERSION: %PACKAGE_VERSION%
372314
(echo PACKAGE_VERSION=%PACKAGE_VERSION%) >> %GITHUB_ENV%
@@ -405,7 +347,11 @@ jobs:
405347
shell: pwsh
406348
run: |
407349
$script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1"
408-
&$script_path
350+
if (Test-Path $script_path) {
351+
&$script_path
352+
} else {
353+
Write-Warning "File $script_path was NOT found!"
354+
}
409355
# Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
410356
$cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg"
411357
Get-Content -Tail 5 -Path $cl_cfg
@@ -418,7 +364,7 @@ jobs:
418364
- name: Run tests
419365
if: env.RERUN_TESTS_ON_FAILURE != 'true'
420366
run: |
421-
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
367+
python -m pytest -q -ra --disable-warnings -vv .
422368
working-directory: ${{ env.tests-path }}
423369

424370
- name: Run tests
@@ -433,7 +379,7 @@ jobs:
433379
command: >-
434380
mamba activate ${{ env.TEST_ENV_NAME }}
435381
& cd ${{ env.tests-path }}
436-
& python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
382+
& python -m pytest -q -ra --disable-warnings -vv .
437383
438384
upload:
439385
name: Upload ['${{ matrix.os }}', python='${{ matrix.python }}']
@@ -449,7 +395,7 @@ jobs:
449395

450396
defaults:
451397
run:
452-
shell: bash -l {0}
398+
shell: bash -el {0}
453399

454400
continue-on-error: true
455401

@@ -469,17 +415,15 @@ jobs:
469415
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
470416

471417
- name: Setup miniconda
472-
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
418+
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
473419
with:
474420
miniforge-version: latest
475-
use-mamba: true
421+
use-mamba: 'true'
476422
channels: conda-forge
423+
conda-remove-defaults: 'true'
477424
python-version: ${{ matrix.python }}
478425
activate-environment: 'upload'
479426

480-
- name: Remove defaults channel
481-
run: conda config --remove channels defaults
482-
483427
- name: Install anaconda-client
484428
run: mamba install anaconda-client
485429

@@ -498,24 +442,26 @@ jobs:
498442

499443
cleanup_packages:
500444
name: Clean up anaconda packages
445+
501446
needs: [upload]
447+
502448
runs-on: 'ubuntu-latest'
449+
503450
defaults:
504451
run:
505452
shell: bash -el {0}
453+
506454
steps:
507-
- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
455+
- uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
508456
with:
509457
miniforge-version: latest
510-
use-mamba: true
458+
use-mamba: 'true'
511459
channels: conda-forge
512-
run-post: false
460+
conda-remove-defaults: 'true'
461+
run-post: 'false'
513462
python-version: '3.12'
514463
activate-environment: 'cleanup'
515464

516-
- name: Remove defaults channel
517-
run: conda config --remove channels defaults
518-
519465
- name: Install anaconda-client
520466
run: mamba install anaconda-client
521467

0 commit comments

Comments
 (0)