From 06304ade015cfae4730267a5eccce4b88de581cf Mon Sep 17 00:00:00 2001 From: RedContritio Date: Fri, 2 Jun 2023 20:49:17 +0800 Subject: [PATCH] fix typo (#54299) --- paddle/fluid/framework/operator.cc | 4 ++-- paddle/fluid/operators/optimizers/sparse_momentum_op.h | 2 +- paddle/phi/kernels/impl/momentum_kernel_impl.h | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/paddle/fluid/framework/operator.cc b/paddle/fluid/framework/operator.cc index 27a5f778f90..1ca558a8d89 100644 --- a/paddle/fluid/framework/operator.cc +++ b/paddle/fluid/framework/operator.cc @@ -2819,7 +2819,7 @@ void OperatorWithKernel::ParseMultiInputDataType( platform::errors::InvalidArgument( "The DataType of %s Op's duplicable or different " "slot Variable %s must be " - "consistent or reigster GetExpectedKernelType. The " + "consistent or register GetExpectedKernelType. The " "current variable type is (%s), but the " "previous variable type is (%s).", Type(), @@ -2849,7 +2849,7 @@ void OperatorWithKernel::ParseMultiInputDataType( platform::errors::InvalidArgument( "The DataType of %s Op's duplicable or different " "slot Variable %s must be " - "consistent or reigster GetExpectedKernelType. The " + "consistent or register GetExpectedKernelType. The " "current variable type is (%s), but the " "previous variable type is (%s).", Type(), diff --git a/paddle/fluid/operators/optimizers/sparse_momentum_op.h b/paddle/fluid/operators/optimizers/sparse_momentum_op.h index 8de0afcd6c3..38de9c43903 100644 --- a/paddle/fluid/operators/optimizers/sparse_momentum_op.h +++ b/paddle/fluid/operators/optimizers/sparse_momentum_op.h @@ -286,7 +286,7 @@ class IndexMomentumFunctor { MT velocity_out = velocity * mu_ + grad; MT velocity_tmp = update_method_(grad, velocity_out, mu_); MT param_out = param - velocity_tmp * lr; - // write reigster to memory + // write register to memory velocity_out_[i] = velocity_out; param_out_[i] = static_cast(param_out); if (master_param_out_) { diff --git a/paddle/phi/kernels/impl/momentum_kernel_impl.h b/paddle/phi/kernels/impl/momentum_kernel_impl.h index 17917b15951..56f23f84026 100644 --- a/paddle/phi/kernels/impl/momentum_kernel_impl.h +++ b/paddle/phi/kernels/impl/momentum_kernel_impl.h @@ -168,7 +168,7 @@ class DenseMomentumFunctor { MT velocity_out = velocity * mu_ + grad; MT param_out = param - (grad + velocity_out * mu_) * lr; - // write reigster to memory + // write register to memory velocity_out_[i] = velocity_out; param_out_[i] = static_cast(param_out); if (master_param_out_) { @@ -232,7 +232,7 @@ class DenseMomentumFunctor { MT velocity_out = velocity * mu_ + grad; MT param_out = param - lr * velocity_out; - // write reigster to memory + // write register to memory velocity_out_[i] = velocity_out; param_out_[i] = static_cast(param_out); if (master_param_out_) { @@ -315,7 +315,7 @@ class SparseMomentumFunctor { MT velocity_out = velocity * mu_ + grad; MT param_out = param - (grad + velocity_out * mu_) * lr; - // write reigster to memory + // write register to memory velocity_out_[i] = velocity_out; param_out_[i] = static_cast(param_out); if (master_param_out_) { @@ -395,7 +395,7 @@ class SparseMomentumFunctor { MT velocity_out = velocity * mu_ + grad; MT param_out = param - velocity_out * lr; - // write reigster to memory + // write register to memory velocity_out_[i] = velocity_out; param_out_[i] = static_cast(param_out); if (master_param_out_) { -- GitLab