Skip to content

Commit

Permalink
Remove legacy correlate, dot, and multiply from backend
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderKalistratov committed Nov 20, 2024
1 parent 2514037 commit e3feeef
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 1,592 deletions.
1 change: 0 additions & 1 deletion dpnp/backend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ set(DPNP_SRC
kernels/dpnp_krnl_mathematical.cpp
kernels/dpnp_krnl_random.cpp
kernels/dpnp_krnl_sorting.cpp
kernels/dpnp_krnl_statistics.cpp
src/constants.cpp
src/dpnp_iface_fptr.cpp
src/memory_sycl.cpp
Expand Down
3 changes: 1 addition & 2 deletions dpnp/backend/extensions/statistics/sliding_window1d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,7 @@ void submit_sliding_window1d_small_kernel(const PaddedSpan<const T, SizeT> &a,

auto results_num = get_results_num(WorkPI, out.size(), glid, item);

process_block(results, results_num, a_data, v_data, v_size, op,
red);
process_block(results, results_num, a_data, v_data, v_size, op, red);

auto *const out_ptr = out.begin();
auto *const out_end = out.end();
Expand Down
121 changes: 0 additions & 121 deletions dpnp/backend/include/dpnp_gen_2arg_3type_tbl.hpp

This file was deleted.

142 changes: 0 additions & 142 deletions dpnp/backend/include/dpnp_iface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,69 +100,6 @@ INP_DLLEXPORT void dpnp_memory_memcpy_c(DPCTLSyclQueueRef q_ref,
INP_DLLEXPORT void
dpnp_memory_memcpy_c(void *dst, const void *src, size_t size_in_bytes);

/**
* @ingroup BACKEND_API
* @brief Custom implementation of dot 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] 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_dot_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 *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);

template <typename _DataType_output,
typename _DataType_input1,
typename _DataType_input2>
INP_DLLEXPORT void dpnp_dot_c(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 *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);

/**
* @ingroup BACKEND_API
* @brief Return a partitioned copy of an array.
Expand Down Expand Up @@ -195,54 +132,6 @@ INP_DLLEXPORT void dpnp_partition_c(void *array,
const shape_elem_type *shape,
const size_t ndim);

/**
* @ingroup BACKEND_API
* @brief correlate function
*
* @param [in] q_ref Reference to SYCL queue.
* @param [out] result_out Output array.
* @param [in] input1_in First input array.
* @param [in] input1_size Size of first input array.
* @param [in] input1_shape Shape of first input array.
* @param [in] input1_shape_ndim Number of first array dimensions.
* @param [in] input2_in Second input array.
* @param [in] input2_size Shape of second input array.
* @param [in] input2_shape Shape of first input array.
* @param [in] input2_shape_ndim Number of second array dimensions.
* @param [in] where Mask 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_correlate_c(DPCTLSyclQueueRef q_ref,
void *result_out,
const void *input1_in,
const size_t input1_size,
const shape_elem_type *input1_shape,
const size_t input1_shape_ndim,
const void *input2_in,
const size_t input2_size,
const shape_elem_type *input2_shape,
const size_t input2_shape_ndim,
const size_t *where,
const DPCTLEventVectorRef dep_event_vec_ref);

template <typename _DataType_output,
typename _DataType_input1,
typename _DataType_input2>
INP_DLLEXPORT void dpnp_correlate_c(void *result_out,
const void *input1_in,
const size_t input1_size,
const shape_elem_type *input1_shape,
const size_t input1_shape_ndim,
const void *input2_in,
const size_t input2_size,
const shape_elem_type *input2_shape,
const size_t input2_shape_ndim,
const size_t *where);

/**
* @ingroup BACKEND_API
* @brief Construct an array from an index array and a list of arrays to choose
Expand Down Expand Up @@ -319,37 +208,6 @@ INP_DLLEXPORT void dpnp_initval_c(void *result1, void *value, size_t size);

#include <dpnp_gen_1arg_1type_tbl.hpp>

#define MACRO_2ARG_3TYPES_OP(__name__, __operation__, __vec_operation__, \
__vec_types__, __mkl_operation__, __mkl_types__) \
template <typename _DataType_output, typename _DataType_input1, \
typename _DataType_input2> \
INP_DLLEXPORT DPCTLSyclEventRef __name__( \
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 *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 size_t *where, \
const DPCTLEventVectorRef dep_event_vec_ref); \
\
template <typename _DataType_output, typename _DataType_input1, \
typename _DataType_input2> \
INP_DLLEXPORT void __name__( \
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 *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 size_t *where);

#include <dpnp_gen_2arg_3type_tbl.hpp>

/**
* @ingroup BACKEND_API
* @brief modf function.
Expand Down
13 changes: 4 additions & 9 deletions dpnp/backend/include/dpnp_iface_fptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,10 @@
*/
enum class DPNPFuncName : size_t
{
DPNP_FN_NONE, /**< Very first element of the enumeration */
DPNP_FN_CHOOSE, /**< Used in numpy.choose() impl */
DPNP_FN_CHOOSE_EXT, /**< Used in numpy.choose() impl, requires extra
parameters */
DPNP_FN_CORRELATE, /**< Used in numpy.correlate() impl */
DPNP_FN_CORRELATE_EXT, /**< Used in numpy.correlate() impl, requires extra
parameters */
DPNP_FN_DOT, /**< Used in numpy.dot() impl */
DPNP_FN_DOT_EXT, /**< Used in numpy.dot() impl, requires extra parameters */
DPNP_FN_NONE, /**< Very first element of the enumeration */
DPNP_FN_CHOOSE, /**< Used in numpy.choose() impl */
DPNP_FN_CHOOSE_EXT, /**< Used in numpy.choose() impl, requires extra
parameters */
DPNP_FN_ERF, /**< Used in scipy.special.erf impl */
DPNP_FN_ERF_EXT, /**< Used in scipy.special.erf impl, requires extra
parameters */
Expand Down
Loading

0 comments on commit e3feeef

Please sign in to comment.