File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
extensions/ufunc/elementwise_functions
kernels/elementwise_functions Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -62,10 +62,15 @@ namespace td_ns = dpctl::tensor::type_dispatch;
62
62
template <typename T>
63
63
struct OutputType
64
64
{
65
- using value_type =
66
- typename std::disjunction<td_ns::TypeMapResultEntry<T, float >,
67
- td_ns::TypeMapResultEntry<T, double >,
68
- td_ns::DefaultResultEntry<void >>::result_type;
65
+ /* *
66
+ * scipy>=1.16 assumes a pair 'e->d', but dpnp 'e->f' without an extra
67
+ * kernel 'e->d' (when fp64 supported) to reduce memory footprint
68
+ */
69
+ using value_type = typename std::disjunction<
70
+ td_ns::TypeMapResultEntry<T, sycl::half, float >,
71
+ td_ns::TypeMapResultEntry<T, float >,
72
+ td_ns::TypeMapResultEntry<T, double >,
73
+ td_ns::DefaultResultEntry<void >>::result_type;
69
74
};
70
75
71
76
using dpnp::kernels::erf::ErfFunctor;
Original file line number Diff line number Diff line change @@ -45,7 +45,13 @@ struct ErfFunctor
45
45
46
46
Tp operator ()(const argT &x) const
47
47
{
48
- return sycl::erf (x);
48
+ if constexpr (std::is_same_v<argT, sycl::half> &&
49
+ std::is_same_v<Tp, float >) {
50
+ return sycl::erf (float (x));
51
+ }
52
+ else {
53
+ return sycl::erf (x);
54
+ }
49
55
}
50
56
};
51
57
} // namespace dpnp::kernels::erf
You can’t perform that action at this time.
0 commit comments