Skip to content

Commit 9e4d1ce

Browse files
committed
Merge branch 'master' into 'gold/2021'
2 parents 0cbec60 + a8d7135 commit 9e4d1ce

Some content is hidden

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

57 files changed

+2328
-1355
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ jobs:
6767
channels: intel, conda-forge
6868

6969
- name: Install sphinx dependencies
70-
run: conda install sphinx sphinx_rtd_theme
70+
run: |
71+
conda install sphinx sphinx_rtd_theme
72+
pip install sphinxcontrib-googleanalytics
7173
7274
- name: Install dpnp dependencies
7375
run: |

.github/workflows/conda-package.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ env:
1212
CHANNELS: '-c dppy/label/dev -c intel -c main --override-channels'
1313
TEST_SCOPE: >-
1414
test_arraycreation.py
15+
test_dot.py
1516
test_dparray.py
1617
test_fft.py
1718
test_linalg.py

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# CMake build and local install directory
22
build
33
build_cython
4+
dpnp.egg-info
45

56
# Byte-compiled / optimized / DLL files
67
__pycache__/
@@ -14,6 +15,9 @@ coverage.xml
1415
# Backup files kept after git merge/rebase
1516
*.orig
1617

18+
# Build examples
19+
example3
20+
1721
*dpnp_backend*
1822
dpnp/**/*.cpython*.so
1923
dpnp/**/*.pyd

doc/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# -- Project information -----------------------------------------------------
2828

2929
project = 'dpnp'
30-
copyright = '2020-2022, Intel'
30+
copyright = '2020-2023, Intel Corporation'
3131
author = 'Intel'
3232

3333
# The short X.Y version
@@ -54,8 +54,12 @@
5454
'sphinx.ext.napoleon',
5555
'sphinx.ext.autodoc',
5656
'sphinx.ext.autosummary',
57+
'sphinxcontrib.googleanalytics',
5758
]
5859

60+
googleanalytics_id = 'G-554F8VNE28'
61+
googleanalytics_enabled = True
62+
5963
# Add any paths that contain templates here, relative to this directory.
6064
templates_path = ['_templates']
6165

dpnp/backend/include/dpnp_gen_2arg_3type_tbl.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ MACRO_2ARG_3TYPES_OP(dpnp_multiply_c,
176176
MACRO_UNPACK_TYPES(float, double, std::complex<float>, std::complex<double>))
177177

178178
MACRO_2ARG_3TYPES_OP(dpnp_power_c,
179-
sycl::pow((double)input1_elem, (double)input2_elem),
180-
nullptr,
181-
std::false_type,
179+
static_cast<_DataType_output>(std::pow(input1_elem, input2_elem)),
180+
sycl::pow(x1, x2),
181+
MACRO_UNPACK_TYPES(float, double),
182182
oneapi::mkl::vm::pow,
183-
MACRO_UNPACK_TYPES(float, double))
183+
MACRO_UNPACK_TYPES(float, double, std::complex<float>, std::complex<double>))
184184

185185
MACRO_2ARG_3TYPES_OP(dpnp_subtract_c,
186186
input1_elem - input2_elem,

dpnp/backend/include/dpnp_iface.hpp

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,6 +1683,57 @@ INP_DLLEXPORT void dpnp_var_c(void* array,
16831683
size_t naxis,
16841684
size_t ddof);
16851685

1686+
/**
1687+
* @ingroup BACKEND_API
1688+
* @brief Implementation of where function
1689+
*
1690+
* @param [in] q_ref Reference to SYCL queue.
1691+
* @param [out] result_out Output array.
1692+
* @param [in] result_size Size of output array.
1693+
* @param [in] result_ndim Number of output array dimensions.
1694+
* @param [in] result_shape Shape of output array.
1695+
* @param [in] result_strides Strides of output array.
1696+
* @param [in] condition_in Condition array.
1697+
* @param [in] condition_size Size of condition array.
1698+
* @param [in] condition_ndim Number of condition array dimensions.
1699+
* @param [in] condition_shape Shape of condition array.
1700+
* @param [in] condition_strides Strides of condition array.
1701+
* @param [in] input1_in First input array.
1702+
* @param [in] input1_size Size of first input array.
1703+
* @param [in] input1_ndim Number of first input array dimensions.
1704+
* @param [in] input1_shape Shape of first input array.
1705+
* @param [in] input1_strides Strides of first input array.
1706+
* @param [in] input2_in Second input array.
1707+
* @param [in] input2_size Size of second input array.
1708+
* @param [in] input2_ndim Number of second input array dimensions.
1709+
* @param [in] input2_shape Shape of second input array.
1710+
* @param [in] input2_strides Strides of second input array.
1711+
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
1712+
*/
1713+
template <typename _DataType_output, typename _DataType_input1, typename _DataType_input2>
1714+
INP_DLLEXPORT DPCTLSyclEventRef dpnp_where_c(DPCTLSyclQueueRef q_ref,
1715+
void* result_out,
1716+
const size_t result_size,
1717+
const size_t result_ndim,
1718+
const shape_elem_type* result_shape,
1719+
const shape_elem_type* result_strides,
1720+
const void* condition_in,
1721+
const size_t condition_size,
1722+
const size_t condition_ndim,
1723+
const shape_elem_type* condition_shape,
1724+
const shape_elem_type* condition_strides,
1725+
const void* input1_in,
1726+
const size_t input1_size,
1727+
const size_t input1_ndim,
1728+
const shape_elem_type* input1_shape,
1729+
const shape_elem_type* input1_strides,
1730+
const void* input2_in,
1731+
const size_t input2_size,
1732+
const size_t input2_ndim,
1733+
const shape_elem_type* input2_shape,
1734+
const shape_elem_type* input2_strides,
1735+
const DPCTLEventVectorRef dep_event_vec_ref);
1736+
16861737
/**
16871738
* @ingroup BACKEND_API
16881739
* @brief Implementation of invert function

dpnp/backend/include/dpnp_iface_fptr.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ enum class DPNPFuncName : size_t
234234
DPNP_FN_NEGATIVE, /**< Used in numpy.negative() impl */
235235
DPNP_FN_NEGATIVE_EXT, /**< Used in numpy.negative() impl, requires extra parameters */
236236
DPNP_FN_NONZERO, /**< Used in numpy.nonzero() impl */
237-
DPNP_FN_NONZERO_EXT, /**< Used in numpy.nonzero() impl, requires extra parameters */
238237
DPNP_FN_NOT_EQUAL_EXT, /**< Used in numpy.not_equal() impl, requires extra parameters */
239238
DPNP_FN_ONES, /**< Used in numpy.ones() impl */
240239
DPNP_FN_ONES_LIKE, /**< Used in numpy.ones_like() impl */
@@ -377,6 +376,7 @@ enum class DPNPFuncName : size_t
377376
DPNP_FN_VANDER_EXT, /**< Used in numpy.vander() impl, requires extra parameters */
378377
DPNP_FN_VAR, /**< Used in numpy.var() impl */
379378
DPNP_FN_VAR_EXT, /**< Used in numpy.var() impl, requires extra parameters */
379+
DPNP_FN_WHERE_EXT, /**< Used in numpy.where() impl, requires extra parameters */
380380
DPNP_FN_ZEROS, /**< Used in numpy.zeros() impl */
381381
DPNP_FN_ZEROS_LIKE, /**< Used in numpy.zeros_like() impl */
382382
DPNP_FN_LAST, /**< The latest element of the enumeration */

0 commit comments

Comments
 (0)