Skip to content

Commit d2c9aa4

Browse files
Use sycl::isinf for vec, but std::inf for scalars
1 parent 1798bf2 commit d2c9aa4

File tree

1 file changed

+3
-3
lines changed
  • dpctl/tensor/libtensor/include/kernels/elementwise_functions

1 file changed

+3
-3
lines changed

dpctl/tensor/libtensor/include/kernels/elementwise_functions/isinf.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ template <typename argT, typename resT> struct IsInfFunctor
3232
using is_constant = typename std::disjunction<std::is_same<argT, bool>,
3333
std::is_integral<argT>>;
3434
static constexpr resT constant_value = false;
35-
using supports_vec = typename std::false_type;
35+
using supports_vec =
36+
typename std::disjunction<std::is_same<argT, sycl::half>,
37+
std::is_floating_point<argT>>;
3638
using supports_sg_loadstore = typename std::negation<
3739
std::disjunction<is_complex<resT>, is_complex<argT>>>;
3840

@@ -56,8 +58,6 @@ template <typename argT, typename resT> struct IsInfFunctor
5658
}
5759
}
5860

59-
// unused (since support_vec is set to false_type) due to bug in sycl::isinf
60-
// implementation in OpenCL CPU RT
6161
template <int vec_sz>
6262
sycl::vec<resT, vec_sz> operator()(const sycl::vec<argT, vec_sz> &in)
6363
{

0 commit comments

Comments
 (0)