From 72116696b23bc0c5e680899cf77f3232282fe21d Mon Sep 17 00:00:00 2001 From: Sing_chan <51314274+betterpig@users.noreply.github.com> Date: Tue, 28 Jun 2022 21:11:22 +0800 Subject: [PATCH] make eager_utils.h in the begining of all headers (#43896) --- paddle/fluid/pybind/eager_utils.cc | 7 ++----- paddle/fluid/pybind/eager_utils.h | 4 ++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/paddle/fluid/pybind/eager_utils.cc b/paddle/fluid/pybind/eager_utils.cc index 408fcea412d..9e8065a6a43 100644 --- a/paddle/fluid/pybind/eager_utils.cc +++ b/paddle/fluid/pybind/eager_utils.cc @@ -9,14 +9,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +#include "paddle/fluid/pybind/eager_utils.h" + #include #include #include -// clang-format will try to move eager_utils.h in front of other headers -// according to google c++ style, and that cause compiling problems. -// clang-format off #include "paddle/fluid/eager/api/all.h" #include "paddle/fluid/eager/autograd_meta.h" #include "paddle/fluid/framework/convert_utils.h" @@ -27,14 +26,12 @@ limitations under the License. */ #include "paddle/fluid/operators/utils.h" #include "paddle/fluid/platform/enforce.h" #include "paddle/fluid/pybind/eager.h" -#include "paddle/fluid/pybind/eager_utils.h" #include "paddle/fluid/pybind/op_function_common.h" #include "paddle/fluid/pybind/tensor_py.h" #include "paddle/phi/api/ext/op_meta_info.h" #include "paddle/phi/common/data_type.h" #include "paddle/phi/core/compat/convert_utils.h" #include "paddle/phi/core/dense_tensor.h" -// clang-format on namespace paddle { namespace pybind { diff --git a/paddle/fluid/pybind/eager_utils.h b/paddle/fluid/pybind/eager_utils.h index 72d5813d001..25dcd91bed0 100644 --- a/paddle/fluid/pybind/eager_utils.h +++ b/paddle/fluid/pybind/eager_utils.h @@ -17,11 +17,15 @@ typedef SSIZE_T ssize_t; #include +#include "paddle/fluid/framework/lod_tensor.h" +#include "paddle/fluid/framework/tensor.h" +#include "paddle/fluid/platform/place.h" #include "paddle/phi/common/backend.h" #include "paddle/phi/common/data_type.h" #include "paddle/phi/common/int_array.h" #include "paddle/phi/common/scalar.h" #include "paddle/phi/core/dense_tensor.h" +#include "paddle/phi/core/selected_rows.h" #include "pybind11/pybind11.h" #include "pybind11/stl.h" namespace paddle { -- GitLab