Skip to content

clean up legacy implementation form backend #2115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions dpnp/backend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ set(DPNP_SRC
kernels/dpnp_krnl_indexing.cpp
kernels/dpnp_krnl_mathematical.cpp
kernels/dpnp_krnl_random.cpp
kernels/dpnp_krnl_reduction.cpp
kernels/dpnp_krnl_searching.cpp
kernels/dpnp_krnl_sorting.cpp
kernels/dpnp_krnl_statistics.cpp
src/constants.cpp
Expand Down
67 changes: 0 additions & 67 deletions dpnp/backend/examples/example8.cpp

This file was deleted.

65 changes: 0 additions & 65 deletions dpnp/backend/examples/example9.cpp

This file was deleted.

189 changes: 0 additions & 189 deletions dpnp/backend/include/dpnp_iface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,52 +163,6 @@ INP_DLLEXPORT void dpnp_dot_c(void *result_out,
const shape_elem_type *input2_shape,
const shape_elem_type *input2_strides);

/**
* @ingroup BACKEND_API
* @brief Compute summary of input array elements.
*
* Input array is expected as @ref _DataType_input type and assume result as
* @ref _DataType_output type. The function creates no memory.
*
* Empty @ref input_shape means scalar.
*
* @param [in] q_ref Reference to SYCL queue.
* @param [out] result_out Output array pointer. @ref _DataType_output
* type is expected
* @param [in] input_in Input array pointer. @ref _DataType_input type
* is expected
* @param [in] input_shape Shape of @ref input_in
* @param [in] input_shape_ndim Number of elements in @ref input_shape
* @param [in] axes Array of axes to apply to @ref input_shape
* @param [in] axes_ndim Number of elements in @ref axes
* @param [in] initial Pointer to initial value for the algorithm.
* @ref _DataType_input is expected
* @param [in] where mask array
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
template <typename _DataType_output, typename _DataType_input>
INP_DLLEXPORT DPCTLSyclEventRef
dpnp_sum_c(DPCTLSyclQueueRef q_ref,
void *result_out,
const void *input_in,
const shape_elem_type *input_shape,
const size_t input_shape_ndim,
const shape_elem_type *axes,
const size_t axes_ndim,
const void *initial,
const long *where,
const DPCTLEventVectorRef dep_event_vec_ref);

template <typename _DataType_output, typename _DataType_input>
INP_DLLEXPORT void dpnp_sum_c(void *result_out,
const void *input_in,
const shape_elem_type *input_shape,
const size_t input_shape_ndim,
const shape_elem_type *axes,
const size_t axes_ndim,
const void *initial,
const long *where);

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

/**
* @ingroup BACKEND_API
* @brief Compute Product of input array elements.
*
* Input array is expected as @ref _DataType_input type and assume result as
* @ref _DataType_output type. The function creates no memory.
*
* Empty @ref input_shape means scalar.
*
* @param [in] q_ref Reference to SYCL queue.
* @param [out] result_out Output array pointer. @ref _DataType_output
* type is expected
* @param [in] input_in Input array pointer. @ref _DataType_input type
* is expected
* @param [in] input_shape Shape of @ref input_in
* @param [in] input_shape_ndim Number of elements in @ref input_shape
* @param [in] axes Array of axes to apply to @ref input_shape
* @param [in] axes_ndim Number of elements in @ref axes
* @param [in] initial Pointer to initial value for the algorithm.
* @ref _DataType_input is expected
* @param [in] where mask array
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
template <typename _DataType_output, typename _DataType_input>
INP_DLLEXPORT DPCTLSyclEventRef
dpnp_prod_c(DPCTLSyclQueueRef q_ref,
void *result_out,
const void *input_in,
const shape_elem_type *input_shape,
const size_t input_shape_ndim,
const shape_elem_type *axes,
const size_t axes_ndim,
const void *initial,
const long *where,
const DPCTLEventVectorRef dep_event_vec_ref);

template <typename _DataType_output, typename _DataType_input>
INP_DLLEXPORT void dpnp_prod_c(void *result_out,
const void *input_in,
const shape_elem_type *input_shape,
const size_t input_shape_ndim,
const shape_elem_type *axes,
const size_t axes_ndim,
const void *initial,
const long *where);

/**
* @ingroup BACKEND_API

* @brief math library implementation of argsort function
*
* @param [in] q_ref Reference to SYCL queue.
* @param [in] array Input array with data.
* @param [out] result Output array with indices.
* @param [in] size Number of elements in input arrays.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
template <typename _DataType, typename _idx_DataType>
INP_DLLEXPORT DPCTLSyclEventRef
dpnp_argsort_c(DPCTLSyclQueueRef q_ref,
void *array,
void *result,
size_t size,
const DPCTLEventVectorRef dep_event_vec_ref);

template <typename _DataType, typename _idx_DataType>
INP_DLLEXPORT void dpnp_argsort_c(void *array, void *result, size_t size);

/**
* @ingroup BACKEND_API
* @brief math library implementation of searchsorted function
*
* @param [in] q_ref Reference to SYCL queue.
* @param [out] result Output array.
* @param [in] array Input array with data.
* @param [in] v Input values to insert into array.
* @param [in] side Param for choosing a case of searching for
* elements.
* @param [in] arr_size Number of elements in input arrays.
* @param [in] v_size Number of elements in input values arrays.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
template <typename _DataType, typename _IndexingType>
INP_DLLEXPORT DPCTLSyclEventRef
dpnp_searchsorted_c(DPCTLSyclQueueRef q_ref,
void *result,
const void *array,
const void *v,
bool side,
const size_t arr_size,
const size_t v_size,
const DPCTLEventVectorRef dep_event_vec_ref);

template <typename _DataType, typename _IndexingType>
INP_DLLEXPORT void dpnp_searchsorted_c(void *result,
const void *array,
const void *v,
bool side,
const size_t arr_size,
const size_t v_size);

/**
* @ingroup BACKEND_API
* @brief math library implementation of sort function
Expand Down Expand Up @@ -497,48 +350,6 @@ INP_DLLEXPORT void dpnp_median_c(void *array,
const shape_elem_type *axis,
size_t naxis);

/**
* @ingroup BACKEND_API
* @brief math library implementation of argmax function
*
* @param [in] q_ref Reference to SYCL queue.
* @param [in] array Input array with data.
* @param [out] result Output array with indices.
* @param [in] size Number of elements in input array.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
template <typename _DataType, typename _idx_DataType>
INP_DLLEXPORT DPCTLSyclEventRef
dpnp_argmax_c(DPCTLSyclQueueRef q_ref,
void *array,
void *result,
size_t size,
const DPCTLEventVectorRef dep_event_vec_ref);

template <typename _DataType, typename _idx_DataType>
INP_DLLEXPORT void dpnp_argmax_c(void *array, void *result, size_t size);

/**
* @ingroup BACKEND_API
* @brief math library implementation of argmin function
*
* @param [in] q_ref Reference to SYCL queue.
* @param [in] array Input array with data.
* @param [out] result Output array with indices.
* @param [in] size Number of elements in input array.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
template <typename _DataType, typename _idx_DataType>
INP_DLLEXPORT DPCTLSyclEventRef
dpnp_argmin_c(DPCTLSyclQueueRef q_ref,
void *array,
void *result,
size_t size,
const DPCTLEventVectorRef dep_event_vec_ref);

template <typename _DataType, typename _idx_DataType>
INP_DLLEXPORT void dpnp_argmin_c(void *array, void *result, size_t size);

#define MACRO_1ARG_1TYPE_OP(__name__, __operation1__, __operation2__) \
template <typename _DataType> \
INP_DLLEXPORT DPCTLSyclEventRef __name__( \
Expand Down
6 changes: 0 additions & 6 deletions dpnp/backend/include/dpnp_iface_fptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@
enum class DPNPFuncName : size_t
{
DPNP_FN_NONE, /**< Very first element of the enumeration */
DPNP_FN_ARGMAX, /**< Used in numpy.argmax() impl */
DPNP_FN_ARGMIN, /**< Used in numpy.argmin() impl */
DPNP_FN_ARGSORT, /**< Used in numpy.argsort() impl */
DPNP_FN_CHOOSE, /**< Used in numpy.choose() impl */
DPNP_FN_CHOOSE_EXT, /**< Used in numpy.choose() impl, requires extra
parameters */
Expand Down Expand Up @@ -89,7 +86,6 @@ enum class DPNPFuncName : size_t
DPNP_FN_PARTITION, /**< Used in numpy.partition() impl */
DPNP_FN_PARTITION_EXT, /**< Used in numpy.partition() impl, requires extra
parameters */
DPNP_FN_PROD, /**< Used in numpy.prod() impl */
DPNP_FN_RNG_BETA, /**< Used in numpy.random.beta() impl */
DPNP_FN_RNG_BETA_EXT, /**< Used in numpy.random.beta() impl, requires extra
parameters */
Expand Down Expand Up @@ -207,9 +203,7 @@ enum class DPNPFuncName : size_t
DPNP_FN_RNG_ZIPF, /**< Used in numpy.random.zipf() impl */
DPNP_FN_RNG_ZIPF_EXT, /**< Used in numpy.random.zipf() impl, requires extra
parameters */
DPNP_FN_SEARCHSORTED, /**< Used in numpy.searchsorted() impl */
DPNP_FN_SORT, /**< Used in numpy.sort() impl */
DPNP_FN_SUM, /**< Used in numpy.sum() impl */
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
Loading