Skip to content

Commit efff029

Browse files
author
Diptorup Deb
committed
Merge branch 'main' into gold/2021
2 parents 4c39fde + 39dfbec commit efff029

Some content is hidden

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

67 files changed

+2377
-1411
lines changed

.github/workflows/conda-package.yml

Lines changed: 59 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ jobs:
2323
python: ["3.8", "3.9", "3.10"]
2424

2525
steps:
26-
- uses: actions/checkout@v3
26+
- name: Checkout repo
27+
uses: actions/checkout@v3
2728
with:
2829
fetch-depth: 0
2930

@@ -35,6 +36,11 @@ jobs:
3536
CHANNELS: -c dppy/label/dev -c intel -c defaults -c numba -c numba/label/dev --override-channels
3637
run: ./scripts/build_conda_package.sh ${{ matrix.python }}
3738

39+
- name: Dump build linux conda environment
40+
run: |
41+
conda env export > /tmp/env-build-linux.yml
42+
cat /tmp/env-build-linux.yml
43+
3844
- name: Upload artifact
3945
uses: actions/upload-artifact@v3
4046
with:
@@ -55,10 +61,13 @@ jobs:
5561
conda-bld: C:\Miniconda\conda-bld\win-64\
5662

5763
steps:
58-
- uses: actions/checkout@v3
64+
- name: Checkout repo
65+
uses: actions/checkout@v3
5966
with:
6067
fetch-depth: 0
61-
- uses: conda-incubator/setup-miniconda@v2
68+
69+
- name: Setup miniconda
70+
uses: conda-incubator/setup-miniconda@v2
6271
with:
6372
auto-activate-base: true
6473
activate-environment: ""
@@ -74,10 +83,18 @@ jobs:
7483
restore-keys: |
7584
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
7685
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
86+
7787
- name: Install conda-build
7888
run: conda install conda-build
89+
7990
- name: Build conda package
8091
run: conda build --no-test --python ${{ matrix.python }} ${{ env.CHANNELS }} conda-recipe
92+
93+
- name: Dump build windows conda environment
94+
run: |
95+
conda env export > env-build-win.yml
96+
type env-build-win.yml
97+
8198
- name: Upload artifact
8299
uses: actions/upload-artifact@v3
83100
with:
@@ -100,7 +117,8 @@ jobs:
100117
with:
101118
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
102119

103-
- uses: actions/checkout@v3
120+
- name: Checkout repo
121+
uses: actions/checkout@v3
104122
with:
105123
path: numba-dpex
106124

@@ -124,22 +142,31 @@ jobs:
124142
conda create -n numba_dpex_env $PACKAGE_NAME pytest dpcpp_linux-64 python=${{ matrix.python }} numba=${{ matrix.numba }} dpctl dpnp=${{ matrix.dpnp }} dpcpp-llvm-spirv $CHANNELS
125143
# Test installed packages
126144
conda list
145+
127146
- name: Check DPNP
128147
run: |
129148
source $CONDA/etc/profile.d/conda.sh
130149
conda activate numba_dpex_env
131150
python -c "import dpnp"
151+
132152
- name: Check dpcpp-llvm-spirv
133153
run: |
134154
source $CONDA/etc/profile.d/conda.sh
135155
conda activate numba_dpex_env
136156
python -c "import dpcpp_llvm_spirv as p; print(p.get_llvm_spirv_path())"
157+
158+
- name: Dump test linux conda environment
159+
run: |
160+
conda env export > /tmp/env-test-linux.yml
161+
cat /tmp/env-test-linux.yml
162+
137163
- name: Run tests
138164
run: |
139165
source $CONDA/etc/profile.d/conda.sh
140166
conda activate numba_dpex_env
141167
# echo "libintelocl.so" | tee /etc/OpenCL/vendors/intel-cpu.icd
142168
pytest -q -ra --disable-warnings --pyargs $MODULE_NAME -vv
169+
143170
- name: Run examples
144171
run: |
145172
ls
@@ -148,7 +175,7 @@ jobs:
148175
source $CONDA/etc/profile.d/conda.sh
149176
conda activate numba_dpex_env
150177
# echo "libintelocl.so" | tee /etc/OpenCL/vendors/intel-cpu.icd
151-
for script in $(find . \( -not -name "_*" -not -name "vector_sum2D.py" -not -name "vectorize.py" -not -name "scan.py" -and -name "*.py" \))
178+
for script in $(find . \( -not -name "_*" -not -name "side-by-side*" -not -name "vectorize.py" -not -name "scan.py" -and -name "*.py" \))
152179
do
153180
echo "Executing ${script}"
154181
python ${script} || exit 1
@@ -172,30 +199,38 @@ jobs:
172199
- name: Create dir for numba-dpex repo
173200
run: |
174201
mkdir -p ${{ github.workspace }}/dpex-repo
175-
- uses: actions/checkout@v3
202+
203+
- name: Checout repo
204+
uses: actions/checkout@v3
176205
with:
177206
path: dpex-repo
178207
fetch-depth: 0
208+
179209
- name: Download artifact
180210
uses: actions/download-artifact@v3
181211
with:
182212
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
183-
- uses: conda-incubator/setup-miniconda@v2
213+
214+
- name: Setup miniconda
215+
uses: conda-incubator/setup-miniconda@v2
184216
with:
185217
use-only-tar-bz2: true
186218
auto-update-conda: true
187219
conda-build-version: '*'
188220
miniconda-version: 'latest'
189221
activate-environment: "numba_dpex_wintest"
222+
190223
- name: Create conda channel
191224
run: |
192225
mkdir -p $env:GITHUB_WORKSPACE/channel/win-64
193226
mv ${{ env.PACKAGE_NAME }}-*.tar.bz2 $env:GITHUB_WORKSPACE/channel/win-64
194227
conda index $env:GITHUB_WORKSPACE/channel
195228
# Test channel
196229
conda search ${{ env.PACKAGE_NAME }} -c $env:GITHUB_WORKSPACE/channel --override-channels
230+
197231
- name: Collect dependencies
198-
run: conda install ${{ env.PACKAGE_NAME }} python=${{ matrix.python }} -c $env:GITHUB_WORKSPACE/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
232+
run: conda install ${{ env.PACKAGE_NAME }} python=${{ matrix.bpython }} -c $env:GITHUB_WORKSPACE/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
233+
199234
- name: Cache conda packages
200235
uses: actions/cache@v3
201236
env:
@@ -207,11 +242,13 @@ jobs:
207242
restore-keys: |
208243
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
209244
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
245+
210246
- name: Install numba-dpex
211247
run: |
212248
conda install ${{ env.PACKAGE_NAME }} pytest dpcpp_win-64 dpcpp-llvm-spirv python=${{ matrix.python }} dpctl -c $env:GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}
213249
# Test installed packages
214250
conda list
251+
215252
- name: Install opencl_rt
216253
run: conda install opencl_rt -c intel --override-channels
217254

@@ -226,10 +263,18 @@ jobs:
226263
227264
- name: Add dpnp skip variable
228265
run: echo "NUMBA_DPEX_TESTING_SKIP_NO_DPNP=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
266+
229267
- name: Smoke test
230268
run: python -c "import numba_dpex.core.runtime._dpexrt_python"
269+
231270
- name: Smoke test for dpcpp-llvm-spirv
232271
run: python -c "import dpcpp_llvm_spirv as p; print(p.get_llvm_spirv_path())"
272+
273+
- name: Dump test windows conda environment
274+
run: |
275+
conda env export > env-test-win.yml
276+
type env-test-win.yml
277+
233278
- name: Run tests
234279
run: |
235280
pytest -q -ra --disable-warnings --pyargs ${{ env.MODULE_NAME }} -vv
@@ -247,10 +292,12 @@ jobs:
247292
with:
248293
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
249294

250-
- uses: conda-incubator/setup-miniconda@v2
295+
- name: Setup miniconda
296+
uses: conda-incubator/setup-miniconda@v2
251297
with:
252298
auto-activate-base: true
253299
activate-environment: ""
300+
254301
- name: Install anaconda-client
255302
run: conda install anaconda-client
256303

@@ -275,10 +322,12 @@ jobs:
275322
with:
276323
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
277324

278-
- uses: conda-incubator/setup-miniconda@v2
325+
- name: Setup miniconda
326+
uses: conda-incubator/setup-miniconda@v2
279327
with:
280328
auto-activate-base: true
281329
activate-environment: ""
330+
282331
- name: Install anaconda-client
283332
run: conda install anaconda-client
284333

.github/workflows/coverage.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
conda list
3535
python -c "import numba_dpex; print(numba_dpex.__file__)"
3636
37+
- name: Dump coverage test environment
38+
run: |
39+
conda env export > /tmp/env-cov.yml
40+
cat /tmp/env-cov.yml
41+
3742
- name: Run tests with coverage
3843
run: |
3944
pytest -q -ra --disable-warnings --cov --cov-report term-missing --pyargs numba_dpex -vv

0 commit comments

Comments
 (0)