Skip to content

Commit 573490e

Browse files
authored
fix SameDimsAddFunctor (PaddlePaddle#78781)
1 parent 272eee3 commit 573490e

1 file changed

Lines changed: 1 addition & 19 deletions

File tree

paddle/phi/kernels/cpu/elementwise.h

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,7 @@ struct SameDimsAddFunctor {
3535
};
3636

3737
template <typename DevCtx, typename T>
38-
struct SameDimsAddFunctor<
39-
DevCtx,
40-
T,
41-
typename std::enable_if<std::is_floating_point<T>::value>::type> {
42-
void operator()(const DevCtx& dev_ctx,
43-
const DenseTensor& x,
44-
const DenseTensor& y,
45-
DenseTensor* z) {
46-
auto blas = funcs::GetBlas<DevCtx, T>(dev_ctx);
47-
blas.VADD(
48-
x.numel(), x.data<T>(), y.data<T>(), dev_ctx.template Alloc<T>(z));
49-
}
50-
};
51-
52-
template <typename DevCtx, typename T>
53-
struct SameDimsAddFunctor<
54-
DevCtx,
55-
T,
56-
typename std::enable_if<!std::is_floating_point<T>::value>::type> {
38+
struct SameDimsAddFunctor<DevCtx, T> {
5739
void operator()(const DevCtx& dev_ctx,
5840
const DenseTensor& x,
5941
const DenseTensor& y,

0 commit comments

Comments
 (0)