From 03c80a0c663931617897af910fdd906f317f27a7 Mon Sep 17 00:00:00 2001 From: Liu Yiqun Date: Fri, 17 Sep 2021 09:33:20 +0000 Subject: [PATCH] Correct the return type of elementwise kernel to avoid many compiling warnings. --- .../operators/elementwise/elementwise_op_impl.cu.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/paddle/fluid/operators/elementwise/elementwise_op_impl.cu.h b/paddle/fluid/operators/elementwise/elementwise_op_impl.cu.h index 83aff3b55771e..81dff9473074f 100644 --- a/paddle/fluid/operators/elementwise/elementwise_op_impl.cu.h +++ b/paddle/fluid/operators/elementwise/elementwise_op_impl.cu.h @@ -75,13 +75,13 @@ int GetVectorizedSizeForTensors( template struct ElementwisePrimitiveCaller { - __device__ inline OutT operator()(Functor func, InT (*args)[VecSize], + __device__ inline void operator()(Functor func, InT (*args)[VecSize], OutT *result); }; template struct ElementwisePrimitiveCaller { - __device__ inline OutT operator()(Functor func, InT (*args)[VecSize], + __device__ inline void operator()(Functor func, InT (*args)[VecSize], OutT *result) { kps::ElementwiseAny(result, args, func); @@ -90,7 +90,7 @@ struct ElementwisePrimitiveCaller { template struct ElementwisePrimitiveCaller { - __device__ inline OutT operator()(Functor func, InT (*args)[VecSize], + __device__ inline void operator()(Functor func, InT (*args)[VecSize], OutT *result) { kps::ElementwiseUnary(result, args[0], func); @@ -99,7 +99,7 @@ struct ElementwisePrimitiveCaller { template struct ElementwisePrimitiveCaller { - __device__ inline OutT operator()(Functor func, InT (*args)[VecSize], + __device__ inline void operator()(Functor func, InT (*args)[VecSize], OutT *result) { kps::ElementwiseBinary(result, args[0], args[1], func); @@ -108,7 +108,7 @@ struct ElementwisePrimitiveCaller { template struct ElementwisePrimitiveCaller { - __device__ inline OutT operator()(Functor func, InT **args, OutT *result) { + __device__ inline void operator()(Functor func, InT **args, OutT *result) { kps::ElementwiseTernary( result, args[0], args[1], args[2], func); }