Skip to content

Commit 2f4e7d1

Browse files
committed
Merge branch 'master' into gold/2021
2 parents c9fab4c + 78c4b8b commit 2f4e7d1

21 files changed

+1178
-475
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Cancel Previous Runs
23-
uses: styfle/cancel-workflow-action@0.10.0
23+
uses: styfle/cancel-workflow-action@0.11.0
2424
with:
2525
access_token: ${{ github.token }}
2626

@@ -54,11 +54,11 @@ jobs:
5454
sudo apt-get install -y nvidia-cuda-toolkit clinfo
5555
5656
- name: Checkout repo
57-
uses: actions/checkout@v3
57+
uses: actions/checkout@v3.1.0
5858

5959
# https://github.com/marketplace/actions/setup-miniconda
6060
- name: Setup miniconda
61-
uses: conda-incubator/setup-miniconda@v2
61+
uses: conda-incubator/setup-miniconda@v2.1.1
6262
with:
6363
auto-update-conda: true
6464
python-version: ${{ env.python-ver }}
@@ -106,7 +106,7 @@ jobs:
106106
if: |
107107
!github.event.pull_request.head.repo.fork &&
108108
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
109-
uses: peaceiris/actions-gh-pages@v3
109+
uses: peaceiris/actions-gh-pages@v3.8.0
110110
with:
111111
github_token: ${{ secrets.GITHUB_TOKEN }}
112112
publish_dir: doc/_build/html/

.github/workflows/conda-package.yml

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,24 @@ jobs:
3131

3232
steps:
3333
- name: Cancel Previous Runs
34-
uses: styfle/cancel-workflow-action@0.10.0
34+
uses: styfle/cancel-workflow-action@0.11.0
3535
with:
3636
access_token: ${{ github.token }}
3737

3838
- name: Checkout DPNP repo
39-
uses: actions/checkout@v3
39+
uses: actions/checkout@v3.1.0
4040
with:
4141
fetch-depth: 0
4242

4343
- name: Checkout oneDPL
44-
uses: actions/checkout@v3
44+
uses: actions/checkout@v3.1.0
4545
with:
4646
repository: oneapi-src/oneDPL
4747
path: oneDPL
4848
ref: oneDPL-2021.7.0-release
4949

5050
- name: Setup miniconda
51-
uses: conda-incubator/setup-miniconda@v2
51+
uses: conda-incubator/setup-miniconda@v2.1.1
5252
with:
5353
auto-update-conda: true
5454
python-version: ${{ matrix.python }}
@@ -63,7 +63,7 @@ jobs:
6363
run: conda install conda-build
6464

6565
- name: Cache conda packages
66-
uses: actions/cache@v3
66+
uses: actions/cache@v3.0.11
6767
env:
6868
CACHE_NUMBER: 1 # Increase to reset cache
6969
with:
@@ -80,7 +80,7 @@ jobs:
8080
DPLROOT: '${{ github.workspace }}/oneDPL'
8181

8282
- name: Upload artifact
83-
uses: actions/upload-artifact@v2
83+
uses: actions/upload-artifact@v3.1.0
8484
with:
8585
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
8686
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
@@ -101,24 +101,24 @@ jobs:
101101

102102
steps:
103103
- name: Cancel Previous Runs
104-
uses: styfle/cancel-workflow-action@0.10.0
104+
uses: styfle/cancel-workflow-action@0.11.0
105105
with:
106106
access_token: ${{ github.token }}
107107

108108
- name: Checkout DPNP repo
109-
uses: actions/checkout@v3
109+
uses: actions/checkout@v3.1.0
110110
with:
111111
fetch-depth: 0
112112

113113
- name: Checkout oneDPL
114-
uses: actions/checkout@v3
114+
uses: actions/checkout@v3.1.0
115115
with:
116116
repository: oneapi-src/oneDPL
117117
path: oneDPL
118118
ref: oneDPL-2021.7.0-release
119119

120120
- name: Setup miniconda
121-
uses: conda-incubator/setup-miniconda@v2
121+
uses: conda-incubator/setup-miniconda@v2.1.1
122122
with:
123123
auto-update-conda: true
124124
python-version: ${{ matrix.python }}
@@ -132,7 +132,7 @@ jobs:
132132
(echo CONDA_BLD=%CONDA_PREFIX%\conda-bld\win-64\) >> %GITHUB_ENV%
133133
134134
- name: Cache conda packages
135-
uses: actions/cache@v3
135+
uses: actions/cache@v3.0.11
136136
env:
137137
CACHE_NUMBER: 1 # Increase to reset cache
138138
with:
@@ -152,7 +152,7 @@ jobs:
152152
DPLROOT: '%GITHUB_WORKSPACE%\oneDPL'
153153

154154
- name: Upload artifact
155-
uses: actions/upload-artifact@v2
155+
uses: actions/upload-artifact@v3.1.0
156156
with:
157157
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
158158
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
@@ -184,7 +184,7 @@ jobs:
184184

185185
steps:
186186
- name: Download artifact
187-
uses: actions/download-artifact@v2
187+
uses: actions/download-artifact@v3.0.0
188188
with:
189189
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
190190
path: ${{ env.pkg-path-in-channel }}
@@ -195,7 +195,7 @@ jobs:
195195
tar -xvf ${{ env.pkg-path-in-channel }}/${{ env.PACKAGE_NAME }}-*.tar.bz2 -C ${{ env.extracted-pkg-path }}
196196
197197
- name: Setup miniconda
198-
uses: conda-incubator/setup-miniconda@v2
198+
uses: conda-incubator/setup-miniconda@v2.1.1
199199
with:
200200
auto-update-conda: true
201201
python-version: ${{ matrix.python }}
@@ -227,7 +227,7 @@ jobs:
227227
TEST_CHANNELS: '-c ${{ env.channel-path }} ${{ env.CHANNELS }}'
228228

229229
- name: Cache conda packages
230-
uses: actions/cache@v3
230+
uses: actions/cache@v3.0.11
231231
env:
232232
CACHE_NUMBER: 1 # Increase to reset cache
233233
with:
@@ -248,12 +248,14 @@ jobs:
248248

249249
- name: Smoke test
250250
run: python -c "import dpnp, dpctl; dpctl.lsplatform()"
251+
env:
252+
OCL_ICD_FILENAMES: 'libintelocl.so'
251253

252254
# TODO: run the whole scope once the issues on CPU are resolved
253255
- name: Run tests
254-
run: python -m pytest -q -ra --disable-warnings -vv test_arraycreation.py test_dparray.py test_mathematical.py test_special.py
256+
run: python -m pytest -q -ra --disable-warnings -vv test_arraycreation.py test_dparray.py test_fft.py test_linalg.py test_mathematical.py test_special.py
255257
env:
256-
SYCL_ENABLE_HOST_DEVICE: '1'
258+
OCL_ICD_FILENAMES: 'libintelocl.so'
257259
working-directory: ${{ env.tests-path }}
258260

259261
test_windows:
@@ -284,7 +286,7 @@ jobs:
284286

285287
steps:
286288
- name: Download artifact
287-
uses: actions/download-artifact@v2
289+
uses: actions/download-artifact@v3.0.0
288290
with:
289291
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
290292
path: ${{ env.pkg-path-in-channel }}
@@ -304,7 +306,7 @@ jobs:
304306
dir ${{ env.extracted-pkg-path }}
305307
306308
- name: Setup miniconda
307-
uses: conda-incubator/setup-miniconda@v2
309+
uses: conda-incubator/setup-miniconda@v2.1.1
308310
with:
309311
auto-update-conda: true
310312
python-version: ${{ matrix.python }}
@@ -350,7 +352,7 @@ jobs:
350352
run: more lockfile
351353

352354
- name: Cache conda packages
353-
uses: actions/cache@v3
355+
uses: actions/cache@v3.0.11
354356
env:
355357
CACHE_NUMBER: 1 # Increase to reset cache
356358
with:
@@ -426,7 +428,7 @@ jobs:
426428

427429
# TODO: run the whole scope once the issues on CPU are resolved
428430
- name: Run tests
429-
run: python -m pytest -q -ra --disable-warnings -vv test_arraycreation.py test_dparray.py test_mathematical.py test_special.py
431+
run: python -m pytest -q -ra --disable-warnings -vv test_arraycreation.py test_dparray.py test_fft.py test_linalg.py test_mathematical.py test_special.py
430432
working-directory: ${{ env.tests-path }}
431433

432434
upload_linux:
@@ -448,12 +450,12 @@ jobs:
448450

449451
steps:
450452
- name: Download artifact
451-
uses: actions/download-artifact@v2
453+
uses: actions/download-artifact@v3.0.0
452454
with:
453455
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
454456

455457
- name: Setup miniconda
456-
uses: conda-incubator/setup-miniconda@v2
458+
uses: conda-incubator/setup-miniconda@v2.1.1
457459
with:
458460
auto-update-conda: true
459461
python-version: ${{ matrix.python }}
@@ -486,12 +488,12 @@ jobs:
486488
python: ['3.8', '3.9']
487489
steps:
488490
- name: Download artifact
489-
uses: actions/download-artifact@v2
491+
uses: actions/download-artifact@v3.0.0
490492
with:
491493
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
492494

493495
- name: Setup miniconda
494-
uses: conda-incubator/setup-miniconda@v2
496+
uses: conda-incubator/setup-miniconda@v2.1.1
495497
with:
496498
auto-update-conda: true
497499
python-version: ${{ matrix.python }}

.github/workflows/pre-commit.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
pre-commit:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-python@v2
14-
- uses: pre-commit/[email protected]
12+
- uses: actions/[email protected]
13+
- uses: actions/[email protected]
14+
with:
15+
python-version: '3.10'
16+
- uses: pre-commit/[email protected]

dpnp/backend/kernels/dpnp_krnl_common.cpp

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//*****************************************************************************
2-
// Copyright (c) 2016-2020, Intel Corporation
2+
// Copyright (c) 2016-2022, Intel Corporation
33
// All rights reserved.
44
//
55
// Redistribution and use in source and binary forms, with or without
@@ -97,6 +97,7 @@ void dpnp_astype_c(const void* array1_in, void* result1, const size_t size)
9797
size,
9898
dep_event_vec_ref);
9999
DPCTLEvent_WaitAndThrow(event_ref);
100+
DPCTLEvent_Delete(event_ref);
100101
}
101102

102103
template <typename _DataType, typename _ResultType>
@@ -477,6 +478,7 @@ void dpnp_dot_c(void* result_out,
477478
input2_strides,
478479
dep_event_vec_ref);
479480
DPCTLEvent_WaitAndThrow(event_ref);
481+
DPCTLEvent_Delete(event_ref);
480482
}
481483

482484
template <typename _DataType_output, typename _DataType_input1, typename _DataType_input2>
@@ -614,6 +616,7 @@ void dpnp_eig_c(const void* array_in, void* result1, void* result2, size_t size)
614616
size,
615617
dep_event_vec_ref);
616618
DPCTLEvent_WaitAndThrow(event_ref);
619+
DPCTLEvent_Delete(event_ref);
617620
}
618621

619622
template <typename _DataType, typename _ResultType>
@@ -707,6 +710,7 @@ void dpnp_eigvals_c(const void* array_in, void* result1, size_t size)
707710
size,
708711
dep_event_vec_ref);
709712
DPCTLEvent_WaitAndThrow(event_ref);
713+
DPCTLEvent_Delete(event_ref);
710714
}
711715

712716
template <typename _DataType, typename _ResultType>
@@ -774,7 +778,7 @@ void dpnp_initval_c(void* result1, void* value, size_t size)
774778
size,
775779
dep_event_vec_ref);
776780
DPCTLEvent_WaitAndThrow(event_ref);
777-
781+
DPCTLEvent_Delete(event_ref);
778782
}
779783

780784
template <typename _DataType>
@@ -941,6 +945,7 @@ void dpnp_matmul_c(void* result_out,
941945
input2_strides,
942946
dep_event_vec_ref);
943947
DPCTLEvent_WaitAndThrow(event_ref);
948+
DPCTLEvent_Delete(event_ref);
944949
}
945950

946951
template <typename _DataType>
@@ -1112,11 +1117,25 @@ void func_map_init_linalg(func_map_t& fmap)
11121117
fmap[DPNPFuncName::DPNP_FN_EIG][eft_FLT][eft_FLT] = {eft_FLT, (void*)dpnp_eig_default_c<float, float>};
11131118
fmap[DPNPFuncName::DPNP_FN_EIG][eft_DBL][eft_DBL] = {eft_DBL, (void*)dpnp_eig_default_c<double, double>};
11141119

1120+
fmap[DPNPFuncName::DPNP_FN_EIG_EXT][eft_INT][eft_INT] = {eft_DBL, (void*)dpnp_eig_ext_c<int32_t, double>};
1121+
fmap[DPNPFuncName::DPNP_FN_EIG_EXT][eft_LNG][eft_LNG] = {eft_DBL, (void*)dpnp_eig_ext_c<int64_t, double>};
1122+
fmap[DPNPFuncName::DPNP_FN_EIG_EXT][eft_FLT][eft_FLT] = {eft_FLT, (void*)dpnp_eig_ext_c<float, float>};
1123+
fmap[DPNPFuncName::DPNP_FN_EIG_EXT][eft_DBL][eft_DBL] = {eft_DBL, (void*)dpnp_eig_ext_c<double, double>};
1124+
11151125
fmap[DPNPFuncName::DPNP_FN_EIGVALS][eft_INT][eft_INT] = {eft_DBL, (void*)dpnp_eigvals_default_c<int32_t, double>};
11161126
fmap[DPNPFuncName::DPNP_FN_EIGVALS][eft_LNG][eft_LNG] = {eft_DBL, (void*)dpnp_eigvals_default_c<int64_t, double>};
11171127
fmap[DPNPFuncName::DPNP_FN_EIGVALS][eft_FLT][eft_FLT] = {eft_FLT, (void*)dpnp_eigvals_default_c<float, float>};
11181128
fmap[DPNPFuncName::DPNP_FN_EIGVALS][eft_DBL][eft_DBL] = {eft_DBL, (void*)dpnp_eigvals_default_c<double, double>};
11191129

1130+
fmap[DPNPFuncName::DPNP_FN_EIGVALS_EXT][eft_INT][eft_INT] = {eft_DBL,
1131+
(void*)dpnp_eigvals_ext_c<int32_t, double>};
1132+
fmap[DPNPFuncName::DPNP_FN_EIGVALS_EXT][eft_LNG][eft_LNG] = {eft_DBL,
1133+
(void*)dpnp_eigvals_ext_c<int64_t, double>};
1134+
fmap[DPNPFuncName::DPNP_FN_EIGVALS_EXT][eft_FLT][eft_FLT] = {eft_FLT,
1135+
(void*)dpnp_eigvals_ext_c<float, float>};
1136+
fmap[DPNPFuncName::DPNP_FN_EIGVALS_EXT][eft_DBL][eft_DBL] = {eft_DBL,
1137+
(void*)dpnp_eigvals_ext_c<double, double>};
1138+
11201139
fmap[DPNPFuncName::DPNP_FN_INITVAL][eft_BLN][eft_BLN] = {eft_BLN, (void*)dpnp_initval_default_c<bool>};
11211140
fmap[DPNPFuncName::DPNP_FN_INITVAL][eft_INT][eft_INT] = {eft_INT, (void*)dpnp_initval_default_c<int32_t>};
11221141
fmap[DPNPFuncName::DPNP_FN_INITVAL][eft_LNG][eft_LNG] = {eft_LNG, (void*)dpnp_initval_default_c<int64_t>};

0 commit comments

Comments
 (0)