From 64e2f67007eef6a2cf953e6b34945fbfc2787968 Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Wed, 22 Dec 2021 02:18:42 -0600 Subject: [PATCH] [PTen] Change functions to funcs (#38340) * change functions to funcs * remove useless code --- paddle/pten/core/tensor_meta.h | 3 +-- paddle/pten/kernels/flatten_kernel.cc | 2 +- paddle/pten/kernels/{functions => funcs}/common_shape.h | 0 3 files changed, 2 insertions(+), 3 deletions(-) rename paddle/pten/kernels/{functions => funcs}/common_shape.h (100%) diff --git a/paddle/pten/core/tensor_meta.h b/paddle/pten/core/tensor_meta.h index 18daabca03..5341c6bff5 100644 --- a/paddle/pten/core/tensor_meta.h +++ b/paddle/pten/core/tensor_meta.h @@ -61,8 +61,7 @@ struct DenseTensorMeta { }; inline bool operator==(const DenseTensorMeta& lhs, const DenseTensorMeta& rhs) { - bool ret = true; - return ret && (lhs.is_scalar == rhs.is_scalar) && (lhs.dims == rhs.dims) && + return (lhs.is_scalar == rhs.is_scalar) && (lhs.dims == rhs.dims) && (lhs.dtype == rhs.dtype) && (lhs.layout == rhs.layout) && (lhs.lod == rhs.lod) && (lhs.offset == rhs.offset); } diff --git a/paddle/pten/kernels/flatten_kernel.cc b/paddle/pten/kernels/flatten_kernel.cc index 98df9b93d2..025dc8a832 100644 --- a/paddle/pten/kernels/flatten_kernel.cc +++ b/paddle/pten/kernels/flatten_kernel.cc @@ -17,7 +17,7 @@ #include "paddle/pten/core/kernel_registry.h" #include "paddle/pten/infermeta/unary.h" #include "paddle/pten/kernels/cpu/utils.h" -#include "paddle/pten/kernels/functions/common_shape.h" +#include "paddle/pten/kernels/funcs/common_shape.h" #include "paddle/pten/kernels/gpu/utils.h" #include "paddle/pten/kernels/xpu/utils.h" diff --git a/paddle/pten/kernels/functions/common_shape.h b/paddle/pten/kernels/funcs/common_shape.h similarity index 100% rename from paddle/pten/kernels/functions/common_shape.h rename to paddle/pten/kernels/funcs/common_shape.h -- GitLab