From 71f051fb40b8fea91e40c9af84c1e6eace32aa98 Mon Sep 17 00:00:00 2001 From: Yiqun Liu Date: Sat, 18 Sep 2021 16:33:45 +0800 Subject: [PATCH] Correct the return type of elementwise kernel to avoid many compiling warnings. (#35839) --- .../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 83aff3b5577..81dff947307 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); } -- GitLab