From 0fc9919b6ab8416862d18962faea6ffc104d0243 Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Fri, 12 Nov 2021 17:34:02 +0800 Subject: [PATCH] infershape to infermeta (#37107) --- paddle/pten/CMakeLists.txt | 4 ++-- paddle/pten/api/lib/manipulation.cc | 2 +- paddle/pten/api/lib/math.cc | 2 +- paddle/pten/include/infershape.h | 6 +++--- paddle/pten/{infershape => infermeta}/CMakeLists.txt | 0 paddle/pten/{infershape => infermeta}/binary.cc | 3 ++- paddle/pten/{infershape => infermeta}/binary.h | 0 paddle/pten/{infershape => infermeta}/nary.cc | 2 +- paddle/pten/{infershape => infermeta}/nary.h | 0 paddle/pten/{infershape => infermeta}/unary.cc | 2 +- paddle/pten/{infershape => infermeta}/unary.h | 0 paddle/pten/kernels/cpu/manipulation.cc | 2 +- paddle/pten/kernels/cuda/manipulation.cu | 2 +- paddle/pten/kernels/xpu/manipulation.cc | 2 +- 14 files changed, 14 insertions(+), 13 deletions(-) rename paddle/pten/{infershape => infermeta}/CMakeLists.txt (100%) rename paddle/pten/{infershape => infermeta}/binary.cc (99%) rename paddle/pten/{infershape => infermeta}/binary.h (100%) rename paddle/pten/{infershape => infermeta}/nary.cc (95%) rename paddle/pten/{infershape => infermeta}/nary.h (100%) rename paddle/pten/{infershape => infermeta}/unary.cc (98%) rename paddle/pten/{infershape => infermeta}/unary.h (100%) diff --git a/paddle/pten/CMakeLists.txt b/paddle/pten/CMakeLists.txt index 0b3bb255703..8fc63e8317e 100644 --- a/paddle/pten/CMakeLists.txt +++ b/paddle/pten/CMakeLists.txt @@ -5,8 +5,8 @@ add_subdirectory(api) add_subdirectory(core) # pten kernels for diff device add_subdirectory(kernels) -# pten infershape -add_subdirectory(infershape) +# pten infermeta +add_subdirectory(infermeta) # pten tests add_subdirectory(tests) diff --git a/paddle/pten/api/lib/manipulation.cc b/paddle/pten/api/lib/manipulation.cc index dd16f4f7f58..43752120e37 100644 --- a/paddle/pten/api/lib/manipulation.cc +++ b/paddle/pten/api/lib/manipulation.cc @@ -20,7 +20,7 @@ limitations under the License. */ #include "paddle/pten/api/lib/kernel_dispatch.h" #include "paddle/pten/api/lib/utils/allocator.h" #include "paddle/pten/include/core.h" -#include "paddle/pten/infershape/unary.h" +#include "paddle/pten/infermeta/unary.h" namespace paddle { namespace experimental { diff --git a/paddle/pten/api/lib/math.cc b/paddle/pten/api/lib/math.cc index 13c74394eb2..3c6536af6af 100644 --- a/paddle/pten/api/lib/math.cc +++ b/paddle/pten/api/lib/math.cc @@ -22,7 +22,7 @@ limitations under the License. */ #include "paddle/pten/api/lib/utils/allocator.h" #include "paddle/pten/include/core.h" #include "paddle/pten/include/infershape.h" -#include "paddle/pten/infershape/unary.h" +#include "paddle/pten/infermeta/unary.h" namespace paddle { namespace experimental { diff --git a/paddle/pten/include/infershape.h b/paddle/pten/include/infershape.h index d8dd2837a72..151cb638d85 100644 --- a/paddle/pten/include/infershape.h +++ b/paddle/pten/include/infershape.h @@ -15,6 +15,6 @@ limitations under the License. */ #pragma once // See Note: [ How do we organize the kernel directory ] -#include "paddle/pten/infershape/binary.h" -#include "paddle/pten/infershape/nary.h" -#include "paddle/pten/infershape/unary.h" +#include "paddle/pten/infermeta/binary.h" +#include "paddle/pten/infermeta/nary.h" +#include "paddle/pten/infermeta/unary.h" diff --git a/paddle/pten/infershape/CMakeLists.txt b/paddle/pten/infermeta/CMakeLists.txt similarity index 100% rename from paddle/pten/infershape/CMakeLists.txt rename to paddle/pten/infermeta/CMakeLists.txt diff --git a/paddle/pten/infershape/binary.cc b/paddle/pten/infermeta/binary.cc similarity index 99% rename from paddle/pten/infershape/binary.cc rename to paddle/pten/infermeta/binary.cc index 671bac3165a..e124466a6d3 100644 --- a/paddle/pten/infershape/binary.cc +++ b/paddle/pten/infermeta/binary.cc @@ -13,8 +13,9 @@ See the License for the specific language governing permissions and limitations under the License. */ // See Note [ Why still include the fluid headers? ] -#include "paddle/pten/infershape/binary.h" +#include "paddle/pten/infermeta/binary.h" #include "paddle/pten/kernels/functions/general/elementwise_base.h" + namespace pten { DenseTensorMeta DotInferShape(const DenseTensorMeta& x_meta, diff --git a/paddle/pten/infershape/binary.h b/paddle/pten/infermeta/binary.h similarity index 100% rename from paddle/pten/infershape/binary.h rename to paddle/pten/infermeta/binary.h diff --git a/paddle/pten/infershape/nary.cc b/paddle/pten/infermeta/nary.cc similarity index 95% rename from paddle/pten/infershape/nary.cc rename to paddle/pten/infermeta/nary.cc index b8745dd9b83..0ae078b13c0 100644 --- a/paddle/pten/infershape/nary.cc +++ b/paddle/pten/infermeta/nary.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ // See Note [ Why still include the fluid headers? ] -#include "paddle/pten/infershape/nary.h" +#include "paddle/pten/infermeta/nary.h" namespace pten { diff --git a/paddle/pten/infershape/nary.h b/paddle/pten/infermeta/nary.h similarity index 100% rename from paddle/pten/infershape/nary.h rename to paddle/pten/infermeta/nary.h diff --git a/paddle/pten/infershape/unary.cc b/paddle/pten/infermeta/unary.cc similarity index 98% rename from paddle/pten/infershape/unary.cc rename to paddle/pten/infermeta/unary.cc index 509cb3664e9..74b7fdf7066 100644 --- a/paddle/pten/infershape/unary.cc +++ b/paddle/pten/infermeta/unary.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ // See Note [ Why still include the fluid headers? ] -#include "paddle/pten/infershape/unary.h" +#include "paddle/pten/infermeta/unary.h" namespace pten { diff --git a/paddle/pten/infershape/unary.h b/paddle/pten/infermeta/unary.h similarity index 100% rename from paddle/pten/infershape/unary.h rename to paddle/pten/infermeta/unary.h diff --git a/paddle/pten/kernels/cpu/manipulation.cc b/paddle/pten/kernels/cpu/manipulation.cc index 87c76149f12..8a6ba954d8c 100644 --- a/paddle/pten/kernels/cpu/manipulation.cc +++ b/paddle/pten/kernels/cpu/manipulation.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "paddle/pten/kernels/cpu/manipulation.h" -#include "paddle/pten/infershape/unary.h" +#include "paddle/pten/infermeta/unary.h" #include "paddle/pten/kernels/cpu/utils.h" namespace pten { diff --git a/paddle/pten/kernels/cuda/manipulation.cu b/paddle/pten/kernels/cuda/manipulation.cu index 38111f2b8c0..9e8dff8c264 100644 --- a/paddle/pten/kernels/cuda/manipulation.cu +++ b/paddle/pten/kernels/cuda/manipulation.cu @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "paddle/pten/infershape/unary.h" +#include "paddle/pten/infermeta/unary.h" #include "paddle/pten/kernels/cuda/manipulation.h" #include "paddle/pten/kernels/cuda/utils.h" diff --git a/paddle/pten/kernels/xpu/manipulation.cc b/paddle/pten/kernels/xpu/manipulation.cc index 379e459a605..4313520c8bb 100644 --- a/paddle/pten/kernels/xpu/manipulation.cc +++ b/paddle/pten/kernels/xpu/manipulation.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "paddle/pten/kernels/xpu/manipulation.h" -#include "paddle/pten/infershape/unary.h" +#include "paddle/pten/infermeta/unary.h" #include "paddle/pten/kernels/xpu/utils.h" namespace pten { -- GitLab