From 7039f61e92344a4b9f469d9c74b50d9627618736 Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Tue, 15 Mar 2022 14:21:23 +0800 Subject: [PATCH] add softmax yaml and add_raw infermeta (#40534) --- paddle/phi/infermeta/binary.cc | 3 +++ python/paddle/utils/code_gen/api.yaml | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/paddle/phi/infermeta/binary.cc b/paddle/phi/infermeta/binary.cc index 2947661517..ff2cf81a90 100644 --- a/paddle/phi/infermeta/binary.cc +++ b/paddle/phi/infermeta/binary.cc @@ -18,6 +18,7 @@ limitations under the License. */ #include #include "paddle/phi/common/data_type.h" #include "paddle/phi/core/ddim.h" +#include "paddle/phi/core/infermeta_utils.h" #include "paddle/phi/kernels/funcs/common_shape.h" namespace phi { @@ -813,3 +814,5 @@ void TriangularSolveInferMeta(const MetaTensor& x, } } // namespace phi + +PD_REGISTER_INFER_META_FN(add_raw, phi::ElementwiseRawInferMeta); diff --git a/python/paddle/utils/code_gen/api.yaml b/python/paddle/utils/code_gen/api.yaml index 0d012685b7..d24b64bf66 100644 --- a/python/paddle/utils/code_gen/api.yaml +++ b/python/paddle/utils/code_gen/api.yaml @@ -177,6 +177,14 @@ kernel : func : sign +- api : softmax + args : (Tensor x, int axis) + output : Tensor + infer_meta : + func : SoftmaxInferMeta + kernel : + func : sotfmax + - api : split args : (Tensor x, ScalarArray num_or_sections, Scalar axis) output : Tensor[] -- GitLab