Skip to content

Triage ef #1880

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

Closed
wants to merge 4 commits into from
Closed
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: 1 addition & 1 deletion dpctl/tensor/libtensor/include/kernels/alignment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace kernels
namespace alignment_utils
{

static constexpr size_t required_alignment = 64;
static constexpr size_t required_alignment = 64UL;

template <std::uintptr_t alignment, typename Ptr> bool is_aligned(Ptr p)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
#include <type_traits>

#include "cabs_impl.hpp"
#include "kernels/elementwise_functions/common.hpp"
#include "vec_size_util.hpp"

#include "kernels/dpctl_tensor_types.hpp"
#include "kernels/elementwise_functions/common.hpp"

#include "utils/offset_utils.hpp"
#include "utils/type_dispatch_building.hpp"
#include "utils/type_utils.hpp"
Expand All @@ -50,6 +52,7 @@ namespace abs

namespace td_ns = dpctl::tensor::type_dispatch;

using dpctl::tensor::kernels::vec_size_utils::VecSize_v;
using dpctl::tensor::type_utils::is_complex;

template <typename argT, typename resT> struct AbsFunctor
Expand Down Expand Up @@ -89,8 +92,8 @@ template <typename argT, typename resT> struct AbsFunctor

template <typename argT,
typename resT = argT,
unsigned int vec_sz = 4,
unsigned int n_vecs = 2,
unsigned int vec_sz = VecSize_v<argT, resT>,
unsigned int n_vecs = 1,
bool enable_sg_loadstore = true>
using AbsContigFunctor =
elementwise_common::UnaryContigFunctor<argT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
#include <sycl/sycl.hpp>
#include <type_traits>

#include "kernels/elementwise_functions/common.hpp"
#include "sycl_complex.hpp"
#include "vec_size_util.hpp"

#include "kernels/dpctl_tensor_types.hpp"
#include "kernels/elementwise_functions/common.hpp"

#include "utils/offset_utils.hpp"
#include "utils/type_dispatch_building.hpp"
#include "utils/type_utils.hpp"
Expand All @@ -48,6 +50,7 @@ namespace acos

namespace td_ns = dpctl::tensor::type_dispatch;

using dpctl::tensor::kernels::vec_size_utils::VecSize_v;
using dpctl::tensor::type_utils::is_complex;

template <typename argT, typename resT> struct AcosFunctor
Expand Down Expand Up @@ -128,8 +131,8 @@ template <typename argT, typename resT> struct AcosFunctor

template <typename argTy,
typename resTy = argTy,
unsigned int vec_sz = 4,
unsigned int n_vecs = 2,
unsigned int vec_sz = VecSize_v<argTy, resTy>,
unsigned int n_vecs = 1,
bool enable_sg_loadstore = true>
using AcosContigFunctor =
elementwise_common::UnaryContigFunctor<argTy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
#include <sycl/sycl.hpp>
#include <type_traits>

#include "kernels/elementwise_functions/common.hpp"
#include "sycl_complex.hpp"
#include "vec_size_util.hpp"

#include "kernels/dpctl_tensor_types.hpp"
#include "kernels/elementwise_functions/common.hpp"

#include "utils/offset_utils.hpp"
#include "utils/type_dispatch_building.hpp"
#include "utils/type_utils.hpp"
Expand All @@ -48,6 +50,7 @@ namespace acosh

namespace td_ns = dpctl::tensor::type_dispatch;

using dpctl::tensor::kernels::vec_size_utils::VecSize_v;
using dpctl::tensor::type_utils::is_complex;

template <typename argT, typename resT> struct AcoshFunctor
Expand Down Expand Up @@ -155,8 +158,8 @@ template <typename argT, typename resT> struct AcoshFunctor

template <typename argTy,
typename resTy = argTy,
unsigned int vec_sz = 4,
unsigned int n_vecs = 2,
unsigned int vec_sz = VecSize_v<argTy, resTy>,
unsigned int n_vecs = 1,
bool enable_sg_loadstore = true>
using AcoshContigFunctor =
elementwise_common::UnaryContigFunctor<argTy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include <type_traits>

#include "sycl_complex.hpp"
#include "vec_size_util.hpp"

#include "utils/offset_utils.hpp"
#include "utils/type_dispatch_building.hpp"
#include "utils/type_utils.hpp"
Expand All @@ -50,6 +52,8 @@ namespace add
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

using dpctl::tensor::kernels::vec_size_utils::VecSize_v;

template <typename argT1, typename argT2, typename resT> struct AddFunctor
{

Expand Down Expand Up @@ -110,8 +114,8 @@ template <typename argT1, typename argT2, typename resT> struct AddFunctor
template <typename argT1,
typename argT2,
typename resT,
unsigned int vec_sz = 4,
unsigned int n_vecs = 2,
unsigned int vec_sz = VecSize_v<argT1, argT2, resT>,
unsigned int n_vecs = 1,
bool enable_sg_loadstore = true>
using AddContigFunctor =
elementwise_common::BinaryContigFunctor<argT1,
Expand Down Expand Up @@ -410,8 +414,8 @@ template <typename argT, typename resT> struct AddInplaceFunctor

template <typename argT,
typename resT,
unsigned int vec_sz = 4,
unsigned int n_vecs = 2,
unsigned int vec_sz = VecSize_v<argT, resT>,
unsigned int n_vecs = 1,
bool enable_sg_loadstore = true>
using AddInplaceContigFunctor = elementwise_common::BinaryInplaceContigFunctor<
argT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
#include <sycl/sycl.hpp>
#include <type_traits>

#include "kernels/elementwise_functions/common.hpp"
#include "sycl_complex.hpp"
#include "vec_size_util.hpp"

#include "kernels/dpctl_tensor_types.hpp"
#include "kernels/elementwise_functions/common.hpp"

#include "utils/offset_utils.hpp"
#include "utils/type_dispatch_building.hpp"
#include "utils/type_utils.hpp"
Expand All @@ -49,6 +51,7 @@ namespace angle

namespace td_ns = dpctl::tensor::type_dispatch;

using dpctl::tensor::kernels::vec_size_utils::VecSize_v;
using dpctl::tensor::type_utils::is_complex;

template <typename argT, typename resT> struct AngleFunctor
Expand All @@ -74,8 +77,8 @@ template <typename argT, typename resT> struct AngleFunctor

template <typename argTy,
typename resTy = argTy,
unsigned int vec_sz = 4,
unsigned int n_vecs = 2,
unsigned int vec_sz = VecSize_v<argTy, resTy>,
unsigned int n_vecs = 1,
bool enable_sg_loadstore = true>
using AngleContigFunctor =
elementwise_common::UnaryContigFunctor<argTy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
#include <sycl/sycl.hpp>
#include <type_traits>

#include "kernels/elementwise_functions/common.hpp"
#include "sycl_complex.hpp"
#include "vec_size_util.hpp"

#include "kernels/dpctl_tensor_types.hpp"
#include "kernels/elementwise_functions/common.hpp"

#include "utils/offset_utils.hpp"
#include "utils/type_dispatch_building.hpp"
#include "utils/type_utils.hpp"
Expand All @@ -48,6 +50,7 @@ namespace asin

namespace td_ns = dpctl::tensor::type_dispatch;

using dpctl::tensor::kernels::vec_size_utils::VecSize_v;
using dpctl::tensor::type_utils::is_complex;

template <typename argT, typename resT> struct AsinFunctor
Expand Down Expand Up @@ -148,8 +151,8 @@ template <typename argT, typename resT> struct AsinFunctor

template <typename argTy,
typename resTy = argTy,
unsigned int vec_sz = 4,
unsigned int n_vecs = 2,
unsigned int vec_sz = VecSize_v<argTy, resTy>,
unsigned int n_vecs = 1,
bool enable_sg_loadstore = true>
using AsinContigFunctor =
elementwise_common::UnaryContigFunctor<argTy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
#include <sycl/sycl.hpp>
#include <type_traits>

#include "kernels/elementwise_functions/common.hpp"
#include "sycl_complex.hpp"
#include "vec_size_util.hpp"

#include "kernels/dpctl_tensor_types.hpp"
#include "kernels/elementwise_functions/common.hpp"

#include "utils/offset_utils.hpp"
#include "utils/type_dispatch_building.hpp"
#include "utils/type_utils.hpp"
Expand All @@ -48,6 +50,7 @@ namespace asinh

namespace td_ns = dpctl::tensor::type_dispatch;

using dpctl::tensor::kernels::vec_size_utils::VecSize_v;
using dpctl::tensor::type_utils::is_complex;

template <typename argT, typename resT> struct AsinhFunctor
Expand Down Expand Up @@ -131,8 +134,8 @@ template <typename argT, typename resT> struct AsinhFunctor

template <typename argTy,
typename resTy = argTy,
unsigned int vec_sz = 4,
unsigned int n_vecs = 2,
unsigned int vec_sz = VecSize_v<argTy, resTy>,
unsigned int n_vecs = 1,
bool enable_sg_loadstore = true>
using AsinhContigFunctor =
elementwise_common::UnaryContigFunctor<argTy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
#include <sycl/sycl.hpp>
#include <type_traits>

#include "kernels/elementwise_functions/common.hpp"
#include "sycl_complex.hpp"
#include "vec_size_util.hpp"

#include "kernels/dpctl_tensor_types.hpp"
#include "kernels/elementwise_functions/common.hpp"

#include "utils/offset_utils.hpp"
#include "utils/type_dispatch_building.hpp"
#include "utils/type_utils.hpp"
Expand All @@ -49,6 +51,7 @@ namespace atan

namespace td_ns = dpctl::tensor::type_dispatch;

using dpctl::tensor::kernels::vec_size_utils::VecSize_v;
using dpctl::tensor::type_utils::is_complex;

template <typename argT, typename resT> struct AtanFunctor
Expand Down Expand Up @@ -138,8 +141,8 @@ template <typename argT, typename resT> struct AtanFunctor

template <typename argTy,
typename resTy = argTy,
unsigned int vec_sz = 4,
unsigned int n_vecs = 2,
unsigned int vec_sz = VecSize_v<argTy, resTy>,
unsigned int n_vecs = 1,
bool enable_sg_loadstore = true>
using AtanContigFunctor =
elementwise_common::UnaryContigFunctor<argTy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include <sycl/sycl.hpp>
#include <type_traits>

#include "vec_size_util.hpp"

#include "utils/offset_utils.hpp"
#include "utils/type_dispatch_building.hpp"
#include "utils/type_utils.hpp"
Expand All @@ -48,6 +50,8 @@ namespace atan2
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

using dpctl::tensor::kernels::vec_size_utils::VecSize_v;

template <typename argT1, typename argT2, typename resT> struct Atan2Functor
{

Expand All @@ -68,8 +72,8 @@ template <typename argT1, typename argT2, typename resT> struct Atan2Functor
template <typename argT1,
typename argT2,
typename resT,
unsigned int vec_sz = 4,
unsigned int n_vecs = 2,
unsigned int vec_sz = VecSize_v<argT1, argT2, resT>,
unsigned int n_vecs = 1,
bool enable_sg_loadstore = true>
using Atan2ContigFunctor =
elementwise_common::BinaryContigFunctor<argT1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
#include <sycl/sycl.hpp>
#include <type_traits>

#include "kernels/elementwise_functions/common.hpp"
#include "sycl_complex.hpp"
#include "vec_size_util.hpp"

#include "kernels/dpctl_tensor_types.hpp"
#include "kernels/elementwise_functions/common.hpp"

#include "utils/offset_utils.hpp"
#include "utils/type_dispatch_building.hpp"
#include "utils/type_utils.hpp"
Expand All @@ -49,6 +51,7 @@ namespace atanh

namespace td_ns = dpctl::tensor::type_dispatch;

using dpctl::tensor::kernels::vec_size_utils::VecSize_v;
using dpctl::tensor::type_utils::is_complex;

template <typename argT, typename resT> struct AtanhFunctor
Expand Down Expand Up @@ -132,8 +135,8 @@ template <typename argT, typename resT> struct AtanhFunctor

template <typename argTy,
typename resTy = argTy,
unsigned int vec_sz = 4,
unsigned int n_vecs = 2,
unsigned int vec_sz = VecSize_v<argTy, resTy>,
unsigned int n_vecs = 1,
bool enable_sg_loadstore = true>
using AtanhContigFunctor =
elementwise_common::UnaryContigFunctor<argTy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include <sycl/sycl.hpp>
#include <type_traits>

#include "vec_size_util.hpp"

#include "utils/offset_utils.hpp"
#include "utils/type_dispatch_building.hpp"
#include "utils/type_utils.hpp"
Expand All @@ -48,6 +50,8 @@ namespace bitwise_and
namespace td_ns = dpctl::tensor::type_dispatch;
namespace tu_ns = dpctl::tensor::type_utils;

using dpctl::tensor::kernels::vec_size_utils::VecSize_v;

template <typename argT1, typename argT2, typename resT>
struct BitwiseAndFunctor
{
Expand Down Expand Up @@ -91,8 +95,8 @@ struct BitwiseAndFunctor
template <typename argT1,
typename argT2,
typename resT,
unsigned int vec_sz = 4,
unsigned int n_vecs = 2,
unsigned int vec_sz = VecSize_v<argT1, argT2, resT>,
unsigned int n_vecs = 1,
bool enable_sg_loadstore = true>
using BitwiseAndContigFunctor = elementwise_common::BinaryContigFunctor<
argT1,
Expand Down Expand Up @@ -290,8 +294,8 @@ template <typename argT, typename resT> struct BitwiseAndInplaceFunctor

template <typename argT,
typename resT,
unsigned int vec_sz = 4,
unsigned int n_vecs = 2,
unsigned int vec_sz = VecSize_v<argT, resT>,
unsigned int n_vecs = 1,
bool enable_sg_loadstore = true>
using BitwiseAndInplaceContigFunctor =
elementwise_common::BinaryInplaceContigFunctor<
Expand Down
Loading
Loading