Skip to content

Extend _tensor_elementwise_impl (unary) part 2#2796

Open
vlad-perevezentsev wants to merge 10 commits intomove_tensor_elementwise_impl_unaryfrom
move_tensor_elementwise_impl_unary_par_2
Open

Extend _tensor_elementwise_impl (unary) part 2#2796
vlad-perevezentsev wants to merge 10 commits intomove_tensor_elementwise_impl_unaryfrom
move_tensor_elementwise_impl_unary_par_2

Conversation

@vlad-perevezentsev
Copy link
Contributor

@vlad-perevezentsev vlad-perevezentsev commented Mar 4, 2026

This PR extends _tensor_elementwise_impl with part of the unary functions:

cos,
cosh,
exp,
expm1,
floor,
imag,
isfinite,
isinf,
isnan,
log,
log1p,
log2,
log10,
logical_not,
negative,
positive,
  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

@vlad-perevezentsev vlad-perevezentsev self-assigned this Mar 4, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

View rendered docs @ https://intelpython.github.io/dpnp/pull/2796/index.html

@vlad-perevezentsev vlad-perevezentsev force-pushed the move_tensor_elementwise_impl_unary_par_2 branch from 0cdc3e4 to 7f444bd Compare March 5, 2026 09:43
@vlad-perevezentsev vlad-perevezentsev changed the title Move _tensor_elementwise_impl (unary) part 2 Extend _tensor_elementwise_impl (unary) part 2 Mar 5, 2026
@vlad-perevezentsev vlad-perevezentsev marked this pull request as ready for review March 11, 2026 13:24
Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked over includes and nothing stood out, this one LGTM

//===---------------------------------------------------------------------===//

#pragma once
#include <cmath>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This header is not needed. The file uses sycl::floor() (line 83), not any std:: math functions from


template <typename argT,
typename resT = bool,
std::uint8_t vec_sz = 4u,
Copy link
Contributor

@antonwolfy antonwolfy Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file uses std::uint8_t at line 78 but doesn't include <cstdint>

@@ -0,0 +1,115 @@
//===----------- Implementation of _tensor_impl module ---------*-C++-*-/===//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong license header

@@ -0,0 +1,118 @@
//===----------- Implementation of _tensor_impl module ---------*-C++-*-/===//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong license header

@@ -0,0 +1,117 @@
//===----------- Implementation of _tensor_impl module ---------*-C++-*-/===//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong license header

@@ -0,0 +1,117 @@
//===----------- Implementation of _tensor_impl module ---------*-C++-*-/===//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong license header

@@ -0,0 +1,115 @@
//===----------- Implementation of _tensor_impl module ---------*-C++-*-/===//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong license header

@@ -0,0 +1,117 @@
//===----------- Implementation of _tensor_impl module ---------*-C++-*-/===//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong license header

import dpctl_ext.tensor._tensor_elementwise_impl as ti_ext
import dpnp
import dpnp.backend.extensions.ufunc._ufunc_impl as ufi
from dpnp.dpnp_algo.dpnp_elementwise_common import DPNPBinaryFunc, DPNPUnaryFunc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from dpnp.dpnp_algo.dpnp_elementwise_common import DPNPBinaryFunc, DPNPUnaryFunc
from .dpnp_algo.dpnp_elementwise_common import DPNPBinaryFunc, DPNPUnaryFunc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants