diff --git a/dpnp/backend/kernels/dpnp_krnl_elemwise.cpp b/dpnp/backend/kernels/dpnp_krnl_elemwise.cpp index 2576f6d0bb7..5e7cc4490d5 100644 --- a/dpnp/backend/kernels/dpnp_krnl_elemwise.cpp +++ b/dpnp/backend/kernels/dpnp_krnl_elemwise.cpp @@ -30,23 +30,9 @@ #include #include "dpnp_fptr.hpp" -#include "dpnp_iterator.hpp" #include "dpnp_utils.hpp" -#include "dpnpc_memory_adapter.hpp" #include "queue_sycl.hpp" -// dpctl tensor headers -#include "kernels/alignment.hpp" - -using dpctl::tensor::kernels::alignment_utils::is_aligned; -using dpctl::tensor::kernels::alignment_utils::required_alignment; - -namespace syclex = sycl::ext::oneapi::experimental; -using syclex::group_load; -using syclex::group_store; - -constexpr auto striped = syclex::properties{syclex::data_placement_striped}; - template constexpr T dispatch_erf_op(T elem) { diff --git a/dpnp/backend/src/dpnp_fptr.hpp b/dpnp/backend/src/dpnp_fptr.hpp index 2ba85c40c38..cc509d6d8f3 100644 --- a/dpnp/backend/src/dpnp_fptr.hpp +++ b/dpnp/backend/src/dpnp_fptr.hpp @@ -69,93 +69,6 @@ const DPNPFuncType eft_C64 = DPNPFuncType::DPNP_FT_CMPLX64; const DPNPFuncType eft_C128 = DPNPFuncType::DPNP_FT_CMPLX128; const DPNPFuncType eft_BLN = DPNPFuncType::DPNP_FT_BOOL; -/** - * An internal structure to build a pair of Data type enum value with C++ type - */ -template -struct func_type_pair_t -{ - using type = T; - - static func_type_pair_t - get_pair(std::integral_constant) - { - return {}; - } -}; - -/** - * An internal structure to create a map of Data type enum value associated with - * C++ type - */ -template -struct func_type_map_factory_t : public Ps... -{ - using Ps::get_pair...; - - template - using find_type = typename decltype(get_pair( - std::integral_constant{}))::type; -}; - -/** - * A map of the FPTR interface to link Data type enum value with associated C++ - * type - */ -typedef func_type_map_factory_t< - func_type_pair_t, - func_type_pair_t, - func_type_pair_t, - func_type_pair_t, - func_type_pair_t, - func_type_pair_t>, - func_type_pair_t>> - func_type_map_t; - -/** - * Return an enum value of result type populated from input types. - */ -template -static constexpr DPNPFuncType populate_func_types() -{ - if constexpr (FT1 == DPNPFuncType::DPNP_FT_NONE) { - throw std::runtime_error("Templated enum value of FT1 is None"); - } - else if constexpr (FT2 == DPNPFuncType::DPNP_FT_NONE) { - throw std::runtime_error("Templated enum value of FT2 is None"); - } - return (FT1 < FT2) ? FT2 : FT1; -} - -/** - * @brief A helper function to cast SYCL vector between types. - */ -template -static auto dpnp_vec_cast_impl(const Vec &v, std::index_sequence) -{ - return Op{v[I]...}; -} - -/** - * @brief A casting function for SYCL vector. - * - * @tparam dstT A result type upon casting. - * @tparam srcT An incoming type of the vector. - * @tparam N A number of elements with the vector. - * @tparam Indices A sequence of integers - * @param s An incoming SYCL vector to cast. - * @return SYCL vector casted to desctination type. - */ -template > -static auto dpnp_vec_cast(const sycl::vec &s) -{ - return dpnp_vec_cast_impl, sycl::vec>( - s, Indices{}); -} - /** * Implements std::is_same<> with variadic number of types to compare with * and when type T has to match only one of types Ts. @@ -188,21 +101,6 @@ template constexpr auto both_types_are_same = std::conjunction_v, are_same>; -/** - * A template constat to check if both types T1 and T2 match any type from Ts. - */ -template -constexpr auto both_types_are_any_of = - std::conjunction_v, is_any>; - -/** - * A template constat to check if both types T1 and T2 don't match any type from - * Ts sequence. - */ -template -constexpr auto none_of_both_types = - !std::disjunction_v, is_any>; - /** * @brief If the type _Tp is a reference type, provides the member typedef type * which is the type referred to by _Tp with its topmost cv-qualifiers removed. diff --git a/dpnp/backend/src/dpnp_utils.hpp b/dpnp/backend/src/dpnp_utils.hpp index 9f8da7f97cc..cec94a46ded 100644 --- a/dpnp/backend/src/dpnp_utils.hpp +++ b/dpnp/backend/src/dpnp_utils.hpp @@ -54,15 +54,6 @@ #define __SYCL_COMPILER_VECTOR_ABS_CHANGED 20230503L #endif -/** - * Version of SYCL DPC++ 2023 compiler at which transition to SYCL 2020 occurs. - * Intel(R) oneAPI DPC++ 2022.2.1 compiler has version 20221020L on Linux and - * 20221101L on Windows. - */ -#ifndef __SYCL_COMPILER_VERSION_REQUIRED -#define __SYCL_COMPILER_VERSION_REQUIRED 20221102L -#endif - /** * Version of Intel MKL at which transition to OneMKL release 2023.0.0 occurs. */ @@ -221,32 +212,6 @@ static inline bool array_equal(const _DataType *input1, std::begin(input2_vec)); } -/** - * @ingroup BACKEND_UTILS - * @brief Cast vector of DPCtl events to vector of SYCL enents. - * - * @param [in] events_ref Reference to vector of DPCtl events. - * - * @return Vector of SYCL events. - */ -namespace -{ -[[maybe_unused]] std::vector - cast_event_vector(const DPCTLEventVectorRef event_vec_ref) -{ - const size_t event_vec_size = DPCTLEventVector_Size(event_vec_ref); - - std::vector event_vec; - event_vec.reserve(event_vec_size); - for (size_t i = 0; i < event_vec_size; ++i) { - DPCTLSyclEventRef event_ref = DPCTLEventVector_GetAt(event_vec_ref, i); - sycl::event event = *(reinterpret_cast(event_ref)); - event_vec.push_back(event); - } - return event_vec; -} -} // namespace - /** * @ingroup BACKEND_UTILS * @brief Normalizes an axes into a non-negative integer axes.