Skip to content

Commit

Permalink
Merge pull request #1331 from antonwolfy/merge_to_gold
Browse files Browse the repository at this point in the history
Merge master into gold/2021
  • Loading branch information
antonwolfy authored Mar 6, 2023
2 parents 0cbec60 + 9e4d1ce commit b675679
Show file tree
Hide file tree
Showing 57 changed files with 2,328 additions and 1,355 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ jobs:
channels: intel, conda-forge

- name: Install sphinx dependencies
run: conda install sphinx sphinx_rtd_theme
run: |
conda install sphinx sphinx_rtd_theme
pip install sphinxcontrib-googleanalytics
- name: Install dpnp dependencies
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
CHANNELS: '-c dppy/label/dev -c intel -c main --override-channels'
TEST_SCOPE: >-
test_arraycreation.py
test_dot.py
test_dparray.py
test_fft.py
test_linalg.py
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CMake build and local install directory
build
build_cython
dpnp.egg-info

# Byte-compiled / optimized / DLL files
__pycache__/
Expand All @@ -14,6 +15,9 @@ coverage.xml
# Backup files kept after git merge/rebase
*.orig

# Build examples
example3

*dpnp_backend*
dpnp/**/*.cpython*.so
dpnp/**/*.pyd
Expand Down
6 changes: 5 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# -- Project information -----------------------------------------------------

project = 'dpnp'
copyright = '2020-2022, Intel'
copyright = '2020-2023, Intel Corporation'
author = 'Intel'

# The short X.Y version
Expand All @@ -54,8 +54,12 @@
'sphinx.ext.napoleon',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinxcontrib.googleanalytics',
]

googleanalytics_id = 'G-554F8VNE28'
googleanalytics_enabled = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down
8 changes: 4 additions & 4 deletions dpnp/backend/include/dpnp_gen_2arg_3type_tbl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ MACRO_2ARG_3TYPES_OP(dpnp_multiply_c,
MACRO_UNPACK_TYPES(float, double, std::complex<float>, std::complex<double>))

MACRO_2ARG_3TYPES_OP(dpnp_power_c,
sycl::pow((double)input1_elem, (double)input2_elem),
nullptr,
std::false_type,
static_cast<_DataType_output>(std::pow(input1_elem, input2_elem)),
sycl::pow(x1, x2),
MACRO_UNPACK_TYPES(float, double),
oneapi::mkl::vm::pow,
MACRO_UNPACK_TYPES(float, double))
MACRO_UNPACK_TYPES(float, double, std::complex<float>, std::complex<double>))

MACRO_2ARG_3TYPES_OP(dpnp_subtract_c,
input1_elem - input2_elem,
Expand Down
51 changes: 51 additions & 0 deletions dpnp/backend/include/dpnp_iface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,57 @@ INP_DLLEXPORT void dpnp_var_c(void* array,
size_t naxis,
size_t ddof);

/**
* @ingroup BACKEND_API
* @brief Implementation of where function
*
* @param [in] q_ref Reference to SYCL queue.
* @param [out] result_out Output array.
* @param [in] result_size Size of output array.
* @param [in] result_ndim Number of output array dimensions.
* @param [in] result_shape Shape of output array.
* @param [in] result_strides Strides of output array.
* @param [in] condition_in Condition array.
* @param [in] condition_size Size of condition array.
* @param [in] condition_ndim Number of condition array dimensions.
* @param [in] condition_shape Shape of condition array.
* @param [in] condition_strides Strides of condition array.
* @param [in] input1_in First input array.
* @param [in] input1_size Size of first input array.
* @param [in] input1_ndim Number of first input array dimensions.
* @param [in] input1_shape Shape of first input array.
* @param [in] input1_strides Strides of first input array.
* @param [in] input2_in Second input array.
* @param [in] input2_size Size of second input array.
* @param [in] input2_ndim Number of second input array dimensions.
* @param [in] input2_shape Shape of second input array.
* @param [in] input2_strides Strides of second input array.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
template <typename _DataType_output, typename _DataType_input1, typename _DataType_input2>
INP_DLLEXPORT DPCTLSyclEventRef dpnp_where_c(DPCTLSyclQueueRef q_ref,
void* result_out,
const size_t result_size,
const size_t result_ndim,
const shape_elem_type* result_shape,
const shape_elem_type* result_strides,
const void* condition_in,
const size_t condition_size,
const size_t condition_ndim,
const shape_elem_type* condition_shape,
const shape_elem_type* condition_strides,
const void* input1_in,
const size_t input1_size,
const size_t input1_ndim,
const shape_elem_type* input1_shape,
const shape_elem_type* input1_strides,
const void* input2_in,
const size_t input2_size,
const size_t input2_ndim,
const shape_elem_type* input2_shape,
const shape_elem_type* input2_strides,
const DPCTLEventVectorRef dep_event_vec_ref);

/**
* @ingroup BACKEND_API
* @brief Implementation of invert function
Expand Down
2 changes: 1 addition & 1 deletion dpnp/backend/include/dpnp_iface_fptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ enum class DPNPFuncName : size_t
DPNP_FN_NEGATIVE, /**< Used in numpy.negative() impl */
DPNP_FN_NEGATIVE_EXT, /**< Used in numpy.negative() impl, requires extra parameters */
DPNP_FN_NONZERO, /**< Used in numpy.nonzero() impl */
DPNP_FN_NONZERO_EXT, /**< Used in numpy.nonzero() impl, requires extra parameters */
DPNP_FN_NOT_EQUAL_EXT, /**< Used in numpy.not_equal() impl, requires extra parameters */
DPNP_FN_ONES, /**< Used in numpy.ones() impl */
DPNP_FN_ONES_LIKE, /**< Used in numpy.ones_like() impl */
Expand Down Expand Up @@ -377,6 +376,7 @@ enum class DPNPFuncName : size_t
DPNP_FN_VANDER_EXT, /**< Used in numpy.vander() impl, requires extra parameters */
DPNP_FN_VAR, /**< Used in numpy.var() impl */
DPNP_FN_VAR_EXT, /**< Used in numpy.var() impl, requires extra parameters */
DPNP_FN_WHERE_EXT, /**< Used in numpy.where() impl, requires extra parameters */
DPNP_FN_ZEROS, /**< Used in numpy.zeros() impl */
DPNP_FN_ZEROS_LIKE, /**< Used in numpy.zeros_like() impl */
DPNP_FN_LAST, /**< The latest element of the enumeration */
Expand Down
Loading

0 comments on commit b675679

Please sign in to comment.