From c0911fdd321b55a4e4bd4ab25540e2b1df8a4753 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Thu, 28 May 2020 10:34:06 +0800 Subject: [PATCH] rename inplace/no_need_buffer inferer, part4, test=develop (#24781) --- paddle/fluid/operators/concat_op.cc | 4 ++-- paddle/fluid/operators/crop_op.cc | 4 ++-- paddle/fluid/operators/cvm_op.cc | 8 ++++---- paddle/fluid/operators/roll_op.cc | 4 ++-- paddle/fluid/operators/scatter_nd_add_op.cc | 4 ++-- paddle/fluid/operators/scatter_op.cc | 4 ++-- paddle/fluid/operators/slice_op.cc | 4 ++-- paddle/fluid/operators/space_to_depth_op.cc | 4 ++-- paddle/fluid/operators/squared_l2_distance_op.cc | 6 +++--- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/paddle/fluid/operators/concat_op.cc b/paddle/fluid/operators/concat_op.cc index e4ef952b7bd..49fb1c6e17d 100644 --- a/paddle/fluid/operators/concat_op.cc +++ b/paddle/fluid/operators/concat_op.cc @@ -175,7 +175,7 @@ class ConcatOpGrad : public framework::OperatorWithKernel { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(ConcatOpGradNoNeedBufferVarInference, "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(ConcatOpGradNoNeedBufferVarInferer, "X"); template class ConcatGradOpMaker : public framework::SingleGradOpMaker { @@ -203,7 +203,7 @@ REGISTER_OPERATOR(concat, ops::ConcatOp, ops::ConcatOpMaker, ops::ConcatGradOpMaker, ops::ConcatGradOpMaker); REGISTER_OPERATOR(concat_grad, ops::ConcatOpGrad, - ops::ConcatOpGradNoNeedBufferVarInference); + ops::ConcatOpGradNoNeedBufferVarInferer); REGISTER_OP_CPU_KERNEL( concat, ops::ConcatKernel, ops::ConcatKernel, diff --git a/paddle/fluid/operators/crop_op.cc b/paddle/fluid/operators/crop_op.cc index c73b421ae4f..2031ed14242 100644 --- a/paddle/fluid/operators/crop_op.cc +++ b/paddle/fluid/operators/crop_op.cc @@ -203,7 +203,7 @@ class CropGradOpMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(GropNoNeedBufferVarInference, "Y"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(GropNoNeedBufferVarInferer, "Y"); } // namespace operators } // namespace paddle @@ -212,7 +212,7 @@ namespace ops = paddle::operators; REGISTER_OPERATOR(crop, ops::CropOp, ops::CropOpMaker, ops::CropGradOpMaker, ops::CropGradOpMaker, - ops::GropNoNeedBufferVarInference); + ops::GropNoNeedBufferVarInferer); REGISTER_OPERATOR(crop_grad, ops::CropOpGrad); REGISTER_OP_CPU_KERNEL( crop, ops::CropKernel, diff --git a/paddle/fluid/operators/cvm_op.cc b/paddle/fluid/operators/cvm_op.cc index 155f8f518f9..995ff4a9c72 100644 --- a/paddle/fluid/operators/cvm_op.cc +++ b/paddle/fluid/operators/cvm_op.cc @@ -153,8 +153,8 @@ class CVMGradOpMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(CVMNoNeedBufferVarInference, "CVM"); -DECLARE_NO_NEED_BUFFER_VARS_INFERER(CVMGradNoNeedBufferVarInference, "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(CVMNoNeedBufferVarInferer, "CVM"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(CVMGradNoNeedBufferVarInferer, "X"); } // namespace operators } // namespace paddle @@ -163,10 +163,10 @@ namespace ops = paddle::operators; REGISTER_OPERATOR(cvm, ops::CVMOp, ops::CVMOpMaker, ops::CVMGradOpMaker, ops::CVMGradOpMaker, - ops::CVMNoNeedBufferVarInference); + ops::CVMNoNeedBufferVarInferer); REGISTER_OPERATOR(cvm_grad, ops::CVMGradientOp, - ops::CVMGradNoNeedBufferVarInference); + ops::CVMGradNoNeedBufferVarInferer); REGISTER_OP_CPU_KERNEL(cvm, ops::CVMOpKernel, ops::CVMOpKernel); diff --git a/paddle/fluid/operators/roll_op.cc b/paddle/fluid/operators/roll_op.cc index da0f81a13d4..d28feb257ef 100644 --- a/paddle/fluid/operators/roll_op.cc +++ b/paddle/fluid/operators/roll_op.cc @@ -121,7 +121,7 @@ class RollGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(RollGradNoNeedBufferVarsInference, "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(RollGradNoNeedBufferVarsInferer, "X"); } // namespace operators } // namespace paddle @@ -130,7 +130,7 @@ REGISTER_OPERATOR(roll, ops::RollOp, ops::RollOpMaker, ops::RollGradMaker, ops::RollGradMaker); REGISTER_OPERATOR(roll_grad, ops::RollGradOp, - ops::RollGradNoNeedBufferVarsInference); + ops::RollGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( roll, ops::RollKernel, ops::RollKernel, diff --git a/paddle/fluid/operators/scatter_nd_add_op.cc b/paddle/fluid/operators/scatter_nd_add_op.cc index aead6701ea8..144e7ceae20 100644 --- a/paddle/fluid/operators/scatter_nd_add_op.cc +++ b/paddle/fluid/operators/scatter_nd_add_op.cc @@ -170,7 +170,7 @@ class ScatterNdAddGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(ScatterNdAddGradNoNeedBufferVarsInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(ScatterNdAddGradNoNeedBufferVarsInferer, "Updates"); } // namespace operators @@ -183,7 +183,7 @@ REGISTER_OPERATOR(scatter_nd_add, ops::ScatterNdAddOp, ops::ScatterNdAddOpMaker, ops::ScatterNdAddGradMaker); REGISTER_OPERATOR(scatter_nd_add_grad, ops::ScatterNdAddGradOp, - ops::ScatterNdAddGradNoNeedBufferVarsInference); + ops::ScatterNdAddGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL(scatter_nd_add, ops::ScatterNdAddOpKernel, ops::ScatterNdAddOpKernel, diff --git a/paddle/fluid/operators/scatter_op.cc b/paddle/fluid/operators/scatter_op.cc index 78442cdf641..8ee5aa312f7 100644 --- a/paddle/fluid/operators/scatter_op.cc +++ b/paddle/fluid/operators/scatter_op.cc @@ -134,7 +134,7 @@ class ScatterGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(ScatterGradNoNeedBufferVarsInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(ScatterGradNoNeedBufferVarsInferer, "Updates"); DECLARE_INPLACE_OP_INFERER(ScatterInplaceInferer, {"X", "Out"}); @@ -151,7 +151,7 @@ REGISTER_OPERATOR(scatter, ops::ScatterOp, ops::ScatterOpMaker, ops::ScatterGradMaker, ops::ScatterInplaceInferer); REGISTER_OPERATOR(scatter_grad, ops::ScatterGradOp, - ops::ScatterGradNoNeedBufferVarsInference, + ops::ScatterGradNoNeedBufferVarsInferer, ops::ScatterGradInplaceInferer); REGISTER_OP_CPU_KERNEL(scatter, ops::ScatterOpKernel, ops::ScatterOpKernel, ops::ScatterOpKernel, diff --git a/paddle/fluid/operators/slice_op.cc b/paddle/fluid/operators/slice_op.cc index 418159b341f..13dd8980545 100644 --- a/paddle/fluid/operators/slice_op.cc +++ b/paddle/fluid/operators/slice_op.cc @@ -377,7 +377,7 @@ class SliceDoubleOpGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(SliceOpGradNoNeedBufferVarsInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SliceOpGradNoNeedBufferVarsInferer, "Input"); } // namespace operators @@ -391,7 +391,7 @@ REGISTER_OPERATOR(slice, ops::SliceOp, ops::SliceOpMaker, REGISTER_OPERATOR(slice_grad, ops::SliceOpGrad, ops::SliceDoubleOpGradMaker, ops::SliceDoubleOpGradMaker, - ops::SliceOpGradNoNeedBufferVarsInference, + ops::SliceOpGradNoNeedBufferVarsInferer, ops::SliceOpGradVarTypeInference); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/space_to_depth_op.cc b/paddle/fluid/operators/space_to_depth_op.cc index c92b10b1330..3d8ab9bbd86 100644 --- a/paddle/fluid/operators/space_to_depth_op.cc +++ b/paddle/fluid/operators/space_to_depth_op.cc @@ -131,7 +131,7 @@ class SpaceToDepthOpMaker : public framework::OpProtoAndCheckerMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(SpaceToDepthGradOpNoBufferInferer, "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SpaceToDepthGradOpNoBufferVarsInferer, "X"); template class SpaceToDepthGradOpMaker : public framework::SingleGradOpMaker { @@ -179,7 +179,7 @@ REGISTER_OPERATOR(space_to_depth, ops::SpaceToDepthOp, ops::SpaceToDepthOpMaker, ops::SpaceToDepthGradOpMaker, ops::SpaceToDepthGradOpMaker); REGISTER_OPERATOR(space_to_depth_grad, ops::SpaceToDepthGradOp, - ops::SpaceToDepthGradOpNoBufferInferer); + ops::SpaceToDepthGradOpNoBufferVarsInferer); REGISTER_OP_CPU_KERNEL( space_to_depth, ops::SpaceToDepthKernel, diff --git a/paddle/fluid/operators/squared_l2_distance_op.cc b/paddle/fluid/operators/squared_l2_distance_op.cc index 950acfe53d9..274d3dc2df9 100644 --- a/paddle/fluid/operators/squared_l2_distance_op.cc +++ b/paddle/fluid/operators/squared_l2_distance_op.cc @@ -88,8 +88,8 @@ class SquaredL2DistanceOp : public framework::OperatorWithKernel { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(SquaredL2DistanceGradOpNoBufferInferer, "X", - "Y"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SquaredL2DistanceGradOpNoBufferVarsInferer, + "X", "Y"); template class SquaredL2DistanceGradOpMaker : public framework::SingleGradOpMaker { @@ -193,7 +193,7 @@ REGISTER_OPERATOR( ops::SquaredL2DistanceGradOpMaker, ops::SquaredL2DistanceGradOpMaker); REGISTER_OPERATOR(squared_l2_distance_grad, ops::SquaredL2DistanceGradOp, - ops::SquaredL2DistanceGradOpNoBufferInferer); + ops::SquaredL2DistanceGradOpNoBufferVarsInferer); REGISTER_OP_CPU_KERNEL( squared_l2_distance, ops::SquaredL2DistanceKernel); -- GitLab