From 5edc96e674aeef71df55f3cf605c1a6d90f7952a Mon Sep 17 00:00:00 2001 From: OccupyMars2025 <31559413+OccupyMars2025@users.noreply.github.com> Date: Tue, 23 Aug 2022 11:06:36 +0800 Subject: [PATCH] modify something unimportant when I read source code (#45273) * Update scope.h * typo * Update dense_tensor.inl --- paddle/fluid/framework/scope.h | 4 ++-- paddle/fluid/framework/var_desc.cc | 4 ++-- paddle/phi/core/dense_tensor.inl | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/paddle/fluid/framework/scope.h b/paddle/fluid/framework/scope.h index 920d68a51d5..7f80bbc4fc8 100644 --- a/paddle/fluid/framework/scope.h +++ b/paddle/fluid/framework/scope.h @@ -118,10 +118,10 @@ class Scope : public ScopeBase { const std::list& kids() const { return kids_; } - // enumerate all the variable names current contains. + // enumerate all the variable names which current scope contains. std::vector LocalVarNames() const; - // enumerate all the variables current contains. + // enumerate all the variables which current scope contains. std::vector LocalVars(); // Rename variable to a new name diff --git a/paddle/fluid/framework/var_desc.cc b/paddle/fluid/framework/var_desc.cc index d015d91b45c..6f9574b3f2c 100644 --- a/paddle/fluid/framework/var_desc.cc +++ b/paddle/fluid/framework/var_desc.cc @@ -221,11 +221,11 @@ const proto::VarType::TensorDesc &VarDesc::tensor_desc() const { PADDLE_ENFORCE_EQ( desc_.has_type(), true, - platform::errors::NotFound("The variable's type was not be set.")); + platform::errors::NotFound("The variable's type was not set.")); PADDLE_ENFORCE_EQ( desc_.type().has_type(), true, - platform::errors::NotFound("The variable's type was not be set.")); + platform::errors::NotFound("The variable's type was not set.")); switch (desc_.type().type()) { case proto::VarType::SELECTED_ROWS: return desc_.type().selected_rows(); diff --git a/paddle/phi/core/dense_tensor.inl b/paddle/phi/core/dense_tensor.inl index 01c19e8a55f..eead55d8a00 100644 --- a/paddle/phi/core/dense_tensor.inl +++ b/paddle/phi/core/dense_tensor.inl @@ -38,15 +38,15 @@ T* mutable_data(const DDim& dims, size_t requested_size = 0); void* mutable_data(const phi::Place& place, - paddle::experimental::DataType type, - size_t requested_size = 0); + paddle::experimental::DataType type, + size_t requested_size = 0); void* mutable_data(const phi::Place& place, - size_t requested_size = 0); + size_t requested_size = 0); void* mutable_data(const phi::Place& place, - paddle::experimental::DataType type, - const phi::Stream& stream); + paddle::experimental::DataType type, + const phi::Stream& stream); /* @jim19930609: Remove dependency on protobuf after Tensor Unification. */ -- GitLab