Skip to content

Commit 57ce272

Browse files
antonwolfyvlad-perevezentsevnpolina4
authored
Merge master to gold/2021 (#1441)
* Add a copy for strided arrays in dpnp.dot() * update versions * Rework transpose methods to use dpctl.tensor functions (#1389) * Rework transpose methods to call dpctl.tensor functions * Applied review comments & added more tests * Obtain a proper result type on device without fp64 (#1429) * Obtain a proper result type on device without fp64 * remove excess defenitions * Reuse dpctl.tensor.reshape (#1391) * Rework transpose methods to call dpctl.tensor functions * Reuse dpctl.tensor.reshape * added dpnp.shape() and unmuted more tests * fixed compiling issue & unmuted reshaper tests with order param * Resolve merge issues * resolve type mismatch on Win * Use MCG59 engine on GPU device (#1423) * Use MCG59 engine on GPU device * Fix issue for Windows * reduce precision in tests * move w/a before import dpctl * Reuse add(), multiply() and subtract() from dpctl (#1430) * Reuse add(), multiply() and subtract() from dpctl * add in-place support * Reuse dpctl.tensor.sum for dpnp.sum (#1426) * Reuse dpctl.tensor.sun for dpnp.sum * Update tests for dpnp.sum * Fix remarks * Update tests/third_party/cupy/testing/helper.py --------- Co-authored-by: Anton <[email protected]> * Workaround to Klocwork (#1433) * Add inplace support of divide (#1434) * Add dpnp.result_type() support (#1435) * Add dpnp.result_type() support * Update dpnp/dpnp_iface_manipulation.py Co-authored-by: Natalia Polina <[email protected]> --------- Co-authored-by: Natalia Polina <[email protected]> * Implementation of dpnp.mean() (#1431) * Reuse dpctl.tensor.sun for dpnp.sum * Update tests for dpnp.sum * Fix remarks * Implementation of dpnp.mean * Update logic for dpnp.mean function * add normalize_axis_tuple * Additional tests for dpnp.mean * Fix minor remarks * Add inplace support of divide * Use inplace divide only for dpnp.inexact types * Update tests for dpnp.mean * Skip test_sample.py::TestRandint2::test_bound_float1 * Remove unused import * Update dtype check * Update dpnp/dpnp_iface_statistics.py * Return deleted skips --------- Co-authored-by: Anton Volkov <[email protected]> Co-authored-by: Anton <[email protected]> * New implementation of dpnp.outer (#1436) * Add a new implementation of dpnp.outer * Update dpnp.outer implementation --------- Co-authored-by: Anton <[email protected]> * Set dpnp dependency on dpctl>=0.14.3 (#1437) * Implement dpnp.cov() though existing dpnp methods (#1396) * Implement dpnp.cov() though existing dpnp methods * Applied review comments * Clean up the code to get rid of todo * use dpnp.mean() * Added ChangeLog.md (#1439) * Added ChangeLog.md * exclude PR for comprasion ops * Update version to 0.12.0 (#1440) --------- Co-authored-by: vlad-perevezentsev <[email protected]> Co-authored-by: Natalia Polina <[email protected]>
1 parent 67bead1 commit 57ce272

Some content is hidden

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

51 files changed

+1737
-1146
lines changed

.github/workflows/conda-package.yml

-4
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ jobs:
196196
run: |
197197
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
198198
working-directory: ${{ env.tests-path }}
199-
env:
200-
SYCL_QUEUE_THREAD_POOL_SIZE: 6
201199

202200
test_windows:
203201
name: Test ['windows-latest', python='${{ matrix.python }}']
@@ -335,8 +333,6 @@ jobs:
335333
run: |
336334
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
337335
working-directory: ${{ env.tests-path }}
338-
env:
339-
SYCL_QUEUE_THREAD_POOL_SIZE: 6
340336

341337
upload:
342338
name: Upload ['${{ matrix.os }}', python='${{ matrix.python }}']

.github/workflows/generate_coverage.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ jobs:
6666
env:
6767
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6868
COVERALLS_PARALLEL: true
69-
SYCL_QUEUE_THREAD_POOL_SIZE: 6
7069

7170
coveralls:
7271
name: Indicate completion to coveralls.io

CHANGELOG.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [0.12.0] - 06/15/2023
8+
9+
### Added
10+
11+
* Implemented `dpnp.broadcast_to` function [#1333](https://github.com/IntelPython/dpnp/pull/1333)
12+
* Implemented `dpnp.extract` function [#1340](https://github.com/IntelPython/dpnp/pull/1340)
13+
* Implemented `dpnp.linalg.eigh` function through pybind11 extension of OneMKL call [#1383](https://github.com/IntelPython/dpnp/pull/1383)
14+
* Implemented `dpnp.mean` function [#1431](https://github.com/IntelPython/dpnp/pull/1431)
15+
* Added support of bool types in bitwise operations [#1334](https://github.com/IntelPython/dpnp/pull/1334)
16+
* Added `out` parameter in `dpnp.add` function [#1329](https://github.com/IntelPython/dpnp/pull/1329)
17+
* Added `out` parameter in `dpnp.multiply` function [#1365](https://github.com/IntelPython/dpnp/pull/1365)
18+
* Added `out` parameter in `dpnp.sqrt` function [#1332](https://github.com/IntelPython/dpnp/pull/1332)
19+
* Added `rowvar` parameter in `dpnp.cov` function [#1371](https://github.com/IntelPython/dpnp/pull/1371)
20+
* Added `nbytes` property to dpnp array [#1359](https://github.com/IntelPython/dpnp/pull/1359)
21+
* Introduced a new github Action to control code coverage [#1373](https://github.com/IntelPython/dpnp/pull/1373)
22+
* Added change log [#1439](https://github.com/IntelPython/dpnp/pull/1439)
23+
24+
25+
### Changed
26+
27+
* Leveraged `dpctl.tensor` implementation for `dpnp.place` function [#1337](https://github.com/IntelPython/dpnp/pull/1337)
28+
* Leveraged `dpctl.tensor` implementation for `dpnp.moveaxis` function [#1382](https://github.com/IntelPython/dpnp/pull/1382)
29+
* Leveraged `dpctl.tensor` implementation for `dpnp.squeeze` function [#1381](https://github.com/IntelPython/dpnp/pull/1381)
30+
* Leveraged `dpctl.tensor` implementation for `dpnp.where` function [#1380](https://github.com/IntelPython/dpnp/pull/1380)
31+
* Leveraged `dpctl.tensor` implementation for `dpnp.transpose` function [#1389](https://github.com/IntelPython/dpnp/pull/1389)
32+
* Leveraged `dpctl.tensor` implementation for `dpnp.reshape` function [#1391](https://github.com/IntelPython/dpnp/pull/1391)
33+
* Leveraged `dpctl.tensor` implementation for `dpnp.add`, `dpnp.multiply` and `dpnp.subtract` functions [#1430](https://github.com/IntelPython/dpnp/pull/1430)
34+
* Leveraged `dpctl.tensor` implementation for `dpnp.sum` function [#1426](https://github.com/IntelPython/dpnp/pull/1426)
35+
* Leveraged `dpctl.tensor` implementation for `dpnp.result_type` function [#1435](https://github.com/IntelPython/dpnp/pull/1435)
36+
* Reused OneDPL `std::nth_element` function in `dpnp.partition` with 1d array [#1406](https://github.com/IntelPython/dpnp/pull/1406)
37+
* Transitioned dpnp build system to use scikit-build [#1349](https://github.com/IntelPython/dpnp/pull/1349)
38+
* Renamed included dpnp_algo_*.pyx files to *.pxi [#1356](https://github.com/IntelPython/dpnp/pull/1356)
39+
* Implemented support of key as a tuple in `dpnp.__getitem__()` and `dpnp.__setitem__()` functions [#1362](https://github.com/IntelPython/dpnp/pull/1362)
40+
* Selected dpnp own kernels for elementwise functions instead of OneMKL VM calls on a device without fp64 aspect [#1386](https://github.com/IntelPython/dpnp/pull/1386)
41+
* Pinned to `sysroot>=2.28` and transitioned to `conda-forge` channel [#1408](https://github.com/IntelPython/dpnp/pull/1408)
42+
* Redesigned `dpnp.divide` implementation to call `div` from OneMKL for C-contiguous data or to use `dpctl.tensor` library otherwise [#1418](https://github.com/IntelPython/dpnp/pull/1418)
43+
* Changed an engine used for random generated array on GPU device from MT19937 to MCG59 [#1423](https://github.com/IntelPython/dpnp/pull/1423)
44+
* Implemented in-place support of `dpnp.divide` [#1434](https://github.com/IntelPython/dpnp/pull/1434)
45+
* Redesigned `dpnp.outer` implementation through `dpnp.multiply` with broadcasted arrays [#1436](https://github.com/IntelPython/dpnp/pull/1436)
46+
* Pinned to `dpctl>=0.14.3` as host and run dependencies [#1437](https://github.com/IntelPython/dpnp/pull/1437)
47+
* Reimplemented `dpnp.cov` through existing dpnp function instead of a separate kernel [#1396](https://github.com/IntelPython/dpnp/pull/1396)
48+
49+
50+
### Fixed
51+
52+
* Fixed `dpnp.asarray` function to accept a sequence of dpnp arrays [#1355](https://github.com/IntelPython/dpnp/pull/1355)
53+
* Fixed crash in `dpnp.sum` with an empty array [#1369](https://github.com/IntelPython/dpnp/pull/1369)
54+
* Fixed compilation error around `sycl::abs` with DPC++ 2023.2.0 [#1393](https://github.com/IntelPython/dpnp/pull/1393)
55+
* Fixed Klockwork run and enabled cmake verbose mode for conda build [#1433](https://github.com/IntelPython/dpnp/pull/1433)

conda-recipe/bld.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set "DPL_ROOT_HINT=%PREFIX%/Library"
1818
%PYTHON% -m dpctl --cmakedir > Output
1919
set /p DPCTL_CMAKE_DIR= < Output
2020

21-
set "SKBUILD_ARGS=-G Ninja -- -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx"
21+
set "SKBUILD_ARGS=-G Ninja -- -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
2222
set "SKBUILD_ARGS=%SKBUILD_ARGS% -DDPCTL_MODULE_PATH:PATH=%DPCTL_CMAKE_DIR% "
2323
set "SKBUILD_ARGS=%SKBUILD_ARGS% -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
2424

conda-recipe/build.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/bin/bash
22

3+
# Workaround to Klocwork overwriting LD_LIBRARY_PATH that was modified
4+
# by DPC++ compiler conda packages. Will need to be added to DPC++ compiler
5+
# activation scripts.
6+
export LDFLAGS="$LDFLAGS -Wl,-rpath,$PREFIX/lib"
7+
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PREFIX/compiler/lib/intel64_lin:$PREFIX/compiler/lib:$PREFIX/lib"
8+
39
# Intel LLVM must cooperate with compiler and sysroot from conda
410
echo "--gcc-toolchain=${BUILD_PREFIX} --sysroot=${BUILD_PREFIX}/${HOST}/sysroot -target ${HOST}" > icpx_for_conda.cfg
511
export ICPXCFG="$(pwd)/icpx_for_conda.cfg"
@@ -10,7 +16,7 @@ export TBB_ROOT_HINT=$PREFIX
1016
export DPL_ROOT_HINT=$PREFIX
1117
export MKL_ROOT_HINT=$PREFIX
1218
SKBUILD_ARGS="-- -DDPCTL_MODULE_PATH=$($PYTHON -m dpctl --cmakedir) "
13-
SKBUILD_ARGS="${SKBUILD_ARGS} -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx"
19+
SKBUILD_ARGS="${SKBUILD_ARGS} -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
1420
SKBUILD_ARGS="${SKBUILD_ARGS} -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
1521

1622
# Build wheel package

conda-recipe/meta.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ requirements:
1313
- cmake >=3.21
1414
- ninja
1515
- git
16-
- dpctl >=0.14.2
16+
- dpctl >=0.14.3
1717
- mkl-devel-dpcpp {{ environ.get('MKL_VER', '>=2023.1.0') }}
1818
- onedpl-devel
1919
- tbb-devel
@@ -25,7 +25,7 @@ requirements:
2525
- sysroot_linux-64 >=2.28 # [linux]
2626
run:
2727
- python
28-
- dpctl >=0.14.2
28+
- dpctl >=0.14.3
2929
- {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
3030
- {{ pin_compatible('mkl-dpcpp', min_pin='x.x', max_pin='x') }}
3131
- {{ pin_compatible('numpy', min_pin='x.x', max_pin='x') }}

doc/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
author = 'Intel'
3232

3333
# The short X.Y version
34-
version = '0.11'
34+
version = '0.12'
3535
# The full version, including alpha/beta/rc tags
36-
release = '0.11.2dev1'
36+
release = '0.12.0'
3737

3838

3939
# -- General configuration ---------------------------------------------------

dpnp/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
import os
2828
mypath = os.path.dirname(os.path.realpath(__file__))
2929

30+
# workaround against hanging in OneMKL calls and in DPCTL
31+
os.environ.setdefault('SYCL_QUEUE_THREAD_POOL_SIZE', '6')
32+
3033
import dpctl
3134
dpctlpath = os.path.dirname(dpctl.__file__)
3235

@@ -41,9 +44,6 @@
4144
os.add_dll_directory(dpctlpath)
4245
os.environ["PATH"] = os.pathsep.join([os.getenv("PATH", ""), mypath, dpctlpath])
4346

44-
# workaround against hanging in OneMKL calls
45-
os.environ.setdefault('SYCL_QUEUE_THREAD_POOL_SIZE', '6')
46-
4747
from dpnp.dpnp_array import dpnp_array as ndarray
4848
from dpnp.dpnp_flatiter import flatiter as flatiter
4949

dpnp/backend/doc/Doxyfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "DPNP C++ backend kernel library"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 0.11.2dev1
41+
PROJECT_NUMBER = 0.12.0
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

dpnp/backend/include/dpnp_iface_fptr.hpp

-3
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ enum class DPNPFuncName : size_t
124124
DPNP_FN_COUNT_NONZERO, /**< Used in numpy.count_nonzero() impl */
125125
DPNP_FN_COUNT_NONZERO_EXT, /**< Used in numpy.count_nonzero() impl, requires extra parameters */
126126
DPNP_FN_COV, /**< Used in numpy.cov() impl */
127-
DPNP_FN_COV_EXT, /**< Used in numpy.cov() impl, requires extra parameters */
128127
DPNP_FN_CROSS, /**< Used in numpy.cross() impl */
129128
DPNP_FN_CROSS_EXT, /**< Used in numpy.cross() impl, requires extra parameters */
130129
DPNP_FN_CUMPROD, /**< Used in numpy.cumprod() impl */
@@ -218,7 +217,6 @@ enum class DPNPFuncName : size_t
218217
DPNP_FN_MAXIMUM, /**< Used in numpy.maximum() impl */
219218
DPNP_FN_MAXIMUM_EXT, /**< Used in numpy.maximum() impl , requires extra parameters */
220219
DPNP_FN_MEAN, /**< Used in numpy.mean() impl */
221-
DPNP_FN_MEAN_EXT, /**< Used in numpy.mean() impl, requires extra parameters */
222220
DPNP_FN_MEDIAN, /**< Used in numpy.median() impl */
223221
DPNP_FN_MEDIAN_EXT, /**< Used in numpy.median() impl, requires extra parameters */
224222
DPNP_FN_MIN, /**< Used in numpy.min() impl */
@@ -360,7 +358,6 @@ enum class DPNPFuncName : size_t
360358
DPNP_FN_TANH, /**< Used in numpy.tanh() impl */
361359
DPNP_FN_TANH_EXT, /**< Used in numpy.tanh() impl, requires extra parameters */
362360
DPNP_FN_TRANSPOSE, /**< Used in numpy.transpose() impl */
363-
DPNP_FN_TRANSPOSE_EXT, /**< Used in numpy.transpose() impl, requires extra parameters */
364361
DPNP_FN_TRACE, /**< Used in numpy.trace() impl */
365362
DPNP_FN_TRACE_EXT, /**< Used in numpy.trace() impl, requires extra parameters */
366363
DPNP_FN_TRAPZ, /**< Used in numpy.trapz() impl */

dpnp/backend/kernels/dpnp_krnl_manipulation.cpp

+2-22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//*****************************************************************************
2-
// Copyright (c) 2016-2020, Intel Corporation
2+
// Copyright (c) 2016-2023, Intel Corporation
33
// All rights reserved.
44
//
55
// Redistribution and use in source and binary forms, with or without
@@ -211,6 +211,7 @@ void dpnp_elemwise_transpose_c(void* array1_in,
211211
size,
212212
dep_event_vec_ref);
213213
DPCTLEvent_WaitAndThrow(event_ref);
214+
DPCTLEvent_Delete(event_ref);
214215
}
215216

216217
template <typename _DataType>
@@ -222,17 +223,6 @@ void (*dpnp_elemwise_transpose_default_c)(void*,
222223
void*,
223224
size_t) = dpnp_elemwise_transpose_c<_DataType>;
224225

225-
template <typename _DataType>
226-
DPCTLSyclEventRef (*dpnp_elemwise_transpose_ext_c)(DPCTLSyclQueueRef,
227-
void*,
228-
const shape_elem_type*,
229-
const shape_elem_type*,
230-
const shape_elem_type*,
231-
size_t,
232-
void*,
233-
size_t,
234-
const DPCTLEventVectorRef) = dpnp_elemwise_transpose_c<_DataType>;
235-
236226
void func_map_init_manipulation(func_map_t& fmap)
237227
{
238228
fmap[DPNPFuncName::DPNP_FN_REPEAT][eft_INT][eft_INT] = {eft_INT, (void*)dpnp_repeat_default_c<int32_t>};
@@ -253,15 +243,5 @@ void func_map_init_manipulation(func_map_t& fmap)
253243
(void*)dpnp_elemwise_transpose_default_c<float>};
254244
fmap[DPNPFuncName::DPNP_FN_TRANSPOSE][eft_DBL][eft_DBL] = {eft_DBL,
255245
(void*)dpnp_elemwise_transpose_default_c<double>};
256-
257-
fmap[DPNPFuncName::DPNP_FN_TRANSPOSE_EXT][eft_INT][eft_INT] = {eft_INT,
258-
(void*)dpnp_elemwise_transpose_ext_c<int32_t>};
259-
fmap[DPNPFuncName::DPNP_FN_TRANSPOSE_EXT][eft_LNG][eft_LNG] = {eft_LNG,
260-
(void*)dpnp_elemwise_transpose_ext_c<int64_t>};
261-
fmap[DPNPFuncName::DPNP_FN_TRANSPOSE_EXT][eft_FLT][eft_FLT] = {eft_FLT,
262-
(void*)dpnp_elemwise_transpose_ext_c<float>};
263-
fmap[DPNPFuncName::DPNP_FN_TRANSPOSE_EXT][eft_DBL][eft_DBL] = {eft_DBL,
264-
(void*)dpnp_elemwise_transpose_ext_c<double>};
265-
266246
return;
267247
}

0 commit comments

Comments
 (0)