From 08186f14a12b2d532ddd3b19d02703cd9844d440 Mon Sep 17 00:00:00 2001 From: Zhang Zheng <32410583+ZzSean@users.noreply.github.com> Date: Fri, 16 Sep 2022 15:38:44 +0800 Subject: [PATCH] Correct spelling errors (#46108) --- paddle/phi/kernels/gpu/cast_impl.h | 4 ++-- paddle/phi/kernels/gpu/full_kernel.cu | 8 ++++---- paddle/phi/kernels/sparse/gpu/full_kernel.cu | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/paddle/phi/kernels/gpu/cast_impl.h b/paddle/phi/kernels/gpu/cast_impl.h index f73d3965725..c209705a741 100644 --- a/paddle/phi/kernels/gpu/cast_impl.h +++ b/paddle/phi/kernels/gpu/cast_impl.h @@ -20,7 +20,7 @@ namespace phi { template -struct CastFuctor { +struct CastFunctor { __device__ __forceinline__ OutT operator()(const InT x) const { return static_cast(x); } @@ -36,7 +36,7 @@ void CastCUDAKernelImpl(const GPUContext& dev_ctx, outputs.emplace_back(out); dev_ctx.Alloc(out); phi::funcs::ElementwiseKernel( - dev_ctx, inputs, &outputs, CastFuctor()); + dev_ctx, inputs, &outputs, CastFunctor()); } } // namespace phi diff --git a/paddle/phi/kernels/gpu/full_kernel.cu b/paddle/phi/kernels/gpu/full_kernel.cu index 684e9156609..120e908ae8c 100644 --- a/paddle/phi/kernels/gpu/full_kernel.cu +++ b/paddle/phi/kernels/gpu/full_kernel.cu @@ -20,11 +20,11 @@ limitations under the License. */ namespace phi { template -struct FullFuctor { +struct FullFunctor { OutT value; template - explicit inline FullFuctor(VType val) { + explicit inline FullFunctor(VType val) { value = static_cast(val); } @@ -50,7 +50,7 @@ void FullKernel(const Context& dev_ctx, // the data will not be loaded in the kernel because the number of // parameters in the operator is 0 phi::funcs::ElementwiseKernel( - dev_ctx, inputs, &outputs, FullFuctor(val.to())); + dev_ctx, inputs, &outputs, FullFunctor(val.to())); } } @@ -104,7 +104,7 @@ void FullLikeKernel(const Context& dev_ctx, int numel = out->numel(); if (numel > 0) { phi::funcs::ElementwiseKernel( - dev_ctx, inputs, &outputs, FullFuctor(value)); + dev_ctx, inputs, &outputs, FullFunctor(value)); } } diff --git a/paddle/phi/kernels/sparse/gpu/full_kernel.cu b/paddle/phi/kernels/sparse/gpu/full_kernel.cu index d5ccfc95c6a..223561bc179 100644 --- a/paddle/phi/kernels/sparse/gpu/full_kernel.cu +++ b/paddle/phi/kernels/sparse/gpu/full_kernel.cu @@ -23,11 +23,11 @@ limitations under the License. */ namespace phi { template -struct FullFuctor { +struct FullFunctor { OutT value; template - explicit inline FullFuctor(VType val) { + explicit inline FullFunctor(VType val) { value = static_cast(val); } @@ -54,7 +54,7 @@ void CooFullLikeKernel(const Context& dev_ctx, int numel = values->numel(); if (numel > 0) { phi::funcs::ElementwiseKernel( - dev_ctx, inputs, &outputs, FullFuctor(val.to())); + dev_ctx, inputs, &outputs, FullFunctor(val.to())); } out->set_dims(x.dims()); } @@ -80,7 +80,7 @@ void CsrFullLikeKernel(const Context& dev_ctx, int numel = values->numel(); if (numel > 0) { phi::funcs::ElementwiseKernel( - dev_ctx, inputs, &outputs, FullFuctor(val.to())); + dev_ctx, inputs, &outputs, FullFunctor(val.to())); } out->set_dims(x.dims()); } -- GitLab