From a6fbba65ff2745b254b55e69302d02126fd9a44a Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Wed, 27 May 2020 20:47:54 +0800 Subject: [PATCH] rename inplace/no_need_buffer inferer, part3, test=develop (#24734) --- paddle/fluid/operators/reduce_ops/reduce_mean_op.cc | 5 ++--- paddle/fluid/operators/reduce_ops/reduce_sum_op.cc | 4 ++-- .../fluid/operators/sequence_ops/sequence_concat_op.cc | 5 ++--- .../operators/sequence_ops/sequence_expand_as_op.cc | 8 ++++---- .../fluid/operators/sequence_ops/sequence_expand_op.cc | 10 +++++----- paddle/fluid/operators/sequence_ops/sequence_pad_op.cc | 4 ++-- .../fluid/operators/sequence_ops/sequence_pool_op.cc | 4 ++-- .../operators/sequence_ops/sequence_scatter_op.cc | 6 +++--- .../fluid/operators/sequence_ops/sequence_slice_op.cc | 4 ++-- .../fluid/operators/sequence_ops/sequence_unpad_op.cc | 6 +++--- paddle/fluid/operators/space_to_depth_op.cc | 4 ++-- paddle/fluid/operators/squared_l2_distance_op.cc | 5 +++-- paddle/fluid/operators/squeeze_op.cc | 4 ++-- paddle/fluid/operators/strided_slice_op.cc | 4 ++-- paddle/fluid/operators/trace_op.cc | 5 ++--- paddle/fluid/operators/unfold_op.cc | 4 ++-- paddle/fluid/operators/unsqueeze_op.cc | 5 ++--- paddle/fluid/operators/warpctc_op.cc | 4 ++-- paddle/fluid/operators/where_op.cc | 5 ++--- 19 files changed, 46 insertions(+), 50 deletions(-) diff --git a/paddle/fluid/operators/reduce_ops/reduce_mean_op.cc b/paddle/fluid/operators/reduce_ops/reduce_mean_op.cc index 361b3b42ddb..fccf6d46895 100644 --- a/paddle/fluid/operators/reduce_ops/reduce_mean_op.cc +++ b/paddle/fluid/operators/reduce_ops/reduce_mean_op.cc @@ -82,8 +82,7 @@ class ReduceMeanDoubleGradOpBaseMaker : public imperative::GradOpBaseMakerBase { } } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(ReduceMeanGradNoNeedBufferVarInference, - "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(ReduceMeanGradNoNeedBufferVarInferer, "X"); } // namespace operators } // namespace paddle @@ -99,7 +98,7 @@ REGISTER_OPERATOR(reduce_mean, ops::ReduceOp, __reduce_meanMaker__, REGISTER_OPERATOR(reduce_mean_grad, ops::ReduceGradOp, ops::ReduceMeanDoubleGradDescMaker, ops::ReduceMeanDoubleGradOpBaseMaker, - ops::ReduceMeanGradNoNeedBufferVarInference); + ops::ReduceMeanGradNoNeedBufferVarInferer); REGISTER_OP_CPU_KERNEL(reduce_mean, ops::ReduceKernel, diff --git a/paddle/fluid/operators/reduce_ops/reduce_sum_op.cc b/paddle/fluid/operators/reduce_ops/reduce_sum_op.cc index 198beafacec..6e470e3af4e 100644 --- a/paddle/fluid/operators/reduce_ops/reduce_sum_op.cc +++ b/paddle/fluid/operators/reduce_ops/reduce_sum_op.cc @@ -51,7 +51,7 @@ class ReduceSumOpGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(ReduceSumGradNoNeedBufferVarInference, "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(ReduceSumGradNoNeedBufferVarInferer, "X"); class ReduceSumVarTypeInference : public paddle::framework::VarTypeInference { public: void operator()(paddle::framework::InferVarTypeContext* ctx) const override { @@ -77,7 +77,7 @@ REGISTER_OPERATOR(reduce_sum, ops::ReduceOp, ReduceSumOpMaker, ops::ReduceSumOpGradMaker, ops::ReduceSumOpGradMaker); REGISTER_OPERATOR(reduce_sum_grad, ops::ReduceGradOp, - ops::ReduceSumGradNoNeedBufferVarInference); + ops::ReduceSumGradNoNeedBufferVarInferer); REGISTER_OP_CPU_KERNEL( reduce_sum, ops::ReduceKernel, Kernel, Kernel, Kernel); REGISTER_OPERATOR(sequence_concat_grad, op::SeqConcatGradOp, - op::SeqConcatGradNoNeedBufferVarsInference); + op::SeqConcatGradNoNeedBufferVarsInferer); template using GradKernel = op::SeqConcatGradKernel; diff --git a/paddle/fluid/operators/sequence_ops/sequence_expand_as_op.cc b/paddle/fluid/operators/sequence_ops/sequence_expand_as_op.cc index d93185388a6..494c8e3ab74 100644 --- a/paddle/fluid/operators/sequence_ops/sequence_expand_as_op.cc +++ b/paddle/fluid/operators/sequence_ops/sequence_expand_as_op.cc @@ -181,10 +181,10 @@ class SequenceExpandAsOpGradOpMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequenceExpandAsOpNoNeedBufferVarsInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequenceExpandAsOpNoNeedBufferVarsInferer, "Y"); DECLARE_NO_NEED_BUFFER_VARS_INFERER( - SequenceExpandAsGradOpNoNeedBufferVarsInference, "X", "Y"); + SequenceExpandAsGradOpNoNeedBufferVarsInferer, "X", "Y"); } // namespace operators } // namespace paddle @@ -194,9 +194,9 @@ REGISTER_OPERATOR( sequence_expand_as, ops::SequenceExpandAsOp, ops::SequenceExpandAsOpMaker, ops::SequenceExpandAsOpGradOpMaker, ops::SequenceExpandAsOpGradOpMaker, - ops::SequenceExpandAsOpNoNeedBufferVarsInference); + ops::SequenceExpandAsOpNoNeedBufferVarsInferer); REGISTER_OPERATOR(sequence_expand_as_grad, ops::SequenceExpandAsOpGrad, - ops::SequenceExpandAsGradOpNoNeedBufferVarsInference); + ops::SequenceExpandAsGradOpNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( sequence_expand_as, ops::SequenceExpandAsKernel, diff --git a/paddle/fluid/operators/sequence_ops/sequence_expand_op.cc b/paddle/fluid/operators/sequence_ops/sequence_expand_op.cc index 20251d9533a..e4f2c1b2b8f 100644 --- a/paddle/fluid/operators/sequence_ops/sequence_expand_op.cc +++ b/paddle/fluid/operators/sequence_ops/sequence_expand_op.cc @@ -247,10 +247,10 @@ class SequenceExpandOpGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequenceExpandOpNoNeedBufferVarsInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequenceExpandOpNoNeedBufferVarsInferer, "Y"); -DECLARE_NO_NEED_BUFFER_VARS_INFERER( - SequenceExpandGradOpNoNeedBufferVarsInference, "X", "Y"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequenceExpandGradOpNoNeedBufferVarsInferer, + "X", "Y"); } // namespace operators } // namespace paddle @@ -260,9 +260,9 @@ REGISTER_OPERATOR(sequence_expand, ops::SequenceExpandOp, ops::SequenceExpandOpMaker, ops::SequenceExpandOpGradMaker, ops::SequenceExpandOpGradMaker, - ops::SequenceExpandOpNoNeedBufferVarsInference); + ops::SequenceExpandOpNoNeedBufferVarsInferer); REGISTER_OPERATOR(sequence_expand_grad, ops::SequenceExpandOpGrad, - ops::SequenceExpandGradOpNoNeedBufferVarsInference); + ops::SequenceExpandGradOpNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( sequence_expand, ops::SequenceExpandKernel, diff --git a/paddle/fluid/operators/sequence_ops/sequence_pad_op.cc b/paddle/fluid/operators/sequence_ops/sequence_pad_op.cc index 09ea968dfbc..c14a889bbce 100644 --- a/paddle/fluid/operators/sequence_ops/sequence_pad_op.cc +++ b/paddle/fluid/operators/sequence_ops/sequence_pad_op.cc @@ -251,7 +251,7 @@ class SequencePadGradOpMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequencePadGradOpNoNeedBufferVarsInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequencePadGradOpNoNeedBufferVarsInferer, "X"); } // namespace operators @@ -262,7 +262,7 @@ REGISTER_OPERATOR(sequence_pad, ops::SequencePadOp, ops::SequencePadOpMaker, ops::SequencePadGradOpMaker, ops::SequencePadGradOpMaker); REGISTER_OPERATOR(sequence_pad_grad, ops::SequencePadGradOp, - ops::SequencePadGradOpNoNeedBufferVarsInference); + ops::SequencePadGradOpNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( sequence_pad, ops::SequencePadOpKernel, diff --git a/paddle/fluid/operators/sequence_ops/sequence_pool_op.cc b/paddle/fluid/operators/sequence_ops/sequence_pool_op.cc index 8c272c4a15f..050ab2c9418 100644 --- a/paddle/fluid/operators/sequence_ops/sequence_pool_op.cc +++ b/paddle/fluid/operators/sequence_ops/sequence_pool_op.cc @@ -166,7 +166,7 @@ class SequencePoolGradOpMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequencePoolGradOpNoNeedBufferVarsInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequencePoolGradOpNoNeedBufferVarsInferer, "X"); } // namespace operators @@ -177,7 +177,7 @@ REGISTER_OPERATOR(sequence_pool, ops::SequencePoolOp, ops::SequencePoolOpMaker, ops::SequencePoolGradOpMaker, ops::SequencePoolGradOpMaker); REGISTER_OPERATOR(sequence_pool_grad, ops::SequencePoolGradOp, - ops::SequencePoolGradOpNoNeedBufferVarsInference); + ops::SequencePoolGradOpNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( sequence_pool, ops::SequencePoolKernel); diff --git a/paddle/fluid/operators/sequence_ops/sequence_scatter_op.cc b/paddle/fluid/operators/sequence_ops/sequence_scatter_op.cc index 6d681efa13c..2d4730635fd 100644 --- a/paddle/fluid/operators/sequence_ops/sequence_scatter_op.cc +++ b/paddle/fluid/operators/sequence_ops/sequence_scatter_op.cc @@ -168,8 +168,8 @@ class SequenceScatterGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER( - SequenceScatterGradNoNeedBufferVarsInference, "Updates"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequenceScatterGradNoNeedBufferVarsInferer, + "Updates"); } // namespace operators } // namespace paddle @@ -180,7 +180,7 @@ REGISTER_OPERATOR(sequence_scatter, ops::SequenceScatterOp, ops::SequenceScatterGradMaker, ops::SequenceScatterGradMaker); REGISTER_OPERATOR(sequence_scatter_grad, ops::SequenceScatterGradOp, - ops::SequenceScatterGradNoNeedBufferVarsInference); + ops::SequenceScatterGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL(sequence_scatter, ops::SequenceScatterOpKernel, ops::SequenceScatterOpKernel, ops::SequenceScatterOpKernel, diff --git a/paddle/fluid/operators/sequence_ops/sequence_slice_op.cc b/paddle/fluid/operators/sequence_ops/sequence_slice_op.cc index 7787a5c2b89..06fb444740f 100644 --- a/paddle/fluid/operators/sequence_ops/sequence_slice_op.cc +++ b/paddle/fluid/operators/sequence_ops/sequence_slice_op.cc @@ -137,7 +137,7 @@ class SequenceSliceGradOpMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequenceSliceGradNoNeedBufferVarsInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequenceSliceGradNoNeedBufferVarsInferer, "X"); } // namespace operators @@ -149,7 +149,7 @@ REGISTER_OPERATOR(sequence_slice, ops::SequenceSliceOp, ops::SequenceSliceGradOpMaker, ops::SequenceSliceGradOpMaker); REGISTER_OPERATOR(sequence_slice_grad, ops::SequenceSliceGradOp, - ops::SequenceSliceGradNoNeedBufferVarsInference); + ops::SequenceSliceGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( sequence_slice, ops::SequenceSliceOpKernel, diff --git a/paddle/fluid/operators/sequence_ops/sequence_unpad_op.cc b/paddle/fluid/operators/sequence_ops/sequence_unpad_op.cc index 4acb189930e..c2b6b4af9d8 100644 --- a/paddle/fluid/operators/sequence_ops/sequence_unpad_op.cc +++ b/paddle/fluid/operators/sequence_ops/sequence_unpad_op.cc @@ -169,8 +169,8 @@ class SequenceUnpadGradOpMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER( - SequenceUnpadGradOpNoNeedBufferVarsInference, "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequenceUnpadGradOpNoNeedBufferVarsInferer, + "X"); } // namespace operators } // namespace paddle @@ -181,7 +181,7 @@ REGISTER_OPERATOR(sequence_unpad, ops::SequenceUnpadOp, ops::SequenceUnpadGradOpMaker, ops::SequenceUnpadGradOpMaker); REGISTER_OPERATOR(sequence_unpad_grad, ops::SequenceUnpadGradOp, - ops::SequenceUnpadGradOpNoNeedBufferVarsInference); + ops::SequenceUnpadGradOpNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( sequence_unpad, ops::SequenceUnpadOpKernel, diff --git a/paddle/fluid/operators/space_to_depth_op.cc b/paddle/fluid/operators/space_to_depth_op.cc index fe251a43045..c92b10b1330 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(SpaceToDepthGradOpNoBuffer, "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SpaceToDepthGradOpNoBufferInferer, "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::SpaceToDepthGradOpNoBuffer); + ops::SpaceToDepthGradOpNoBufferInferer); 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 61fd8d3b7cd..950acfe53d9 100644 --- a/paddle/fluid/operators/squared_l2_distance_op.cc +++ b/paddle/fluid/operators/squared_l2_distance_op.cc @@ -88,7 +88,8 @@ class SquaredL2DistanceOp : public framework::OperatorWithKernel { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(SquaredL2DistanceGradOpNoBuffer, "X", "Y"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SquaredL2DistanceGradOpNoBufferInferer, "X", + "Y"); template class SquaredL2DistanceGradOpMaker : public framework::SingleGradOpMaker { @@ -192,7 +193,7 @@ REGISTER_OPERATOR( ops::SquaredL2DistanceGradOpMaker, ops::SquaredL2DistanceGradOpMaker); REGISTER_OPERATOR(squared_l2_distance_grad, ops::SquaredL2DistanceGradOp, - ops::SquaredL2DistanceGradOpNoBuffer); + ops::SquaredL2DistanceGradOpNoBufferInferer); REGISTER_OP_CPU_KERNEL( squared_l2_distance, ops::SquaredL2DistanceKernel); diff --git a/paddle/fluid/operators/squeeze_op.cc b/paddle/fluid/operators/squeeze_op.cc index 6ba56e0064a..b658e78629c 100644 --- a/paddle/fluid/operators/squeeze_op.cc +++ b/paddle/fluid/operators/squeeze_op.cc @@ -275,7 +275,7 @@ DECLARE_INPLACE_OP_INFERER(SequeezeInplaceInferer, {"X", "Out"}); DECLARE_INPLACE_OP_INFERER(SequeezeGradInplaceInferer, {framework::GradVarName("Out"), framework::GradVarName("X")}); -DECLARE_NO_NEED_BUFFER_VARS_INFERER(SqueezeGradNoNeedBufferVarsInference, "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(SqueezeGradNoNeedBufferVarsInferer, "X"); } // namespace operators } // namespace paddle @@ -284,7 +284,7 @@ REGISTER_OPERATOR(squeeze, ops::SqueezeOp, ops::SqueezeOpMaker, ops::SqueezeGradOpMaker, ops::SqueezeGradOpMaker); REGISTER_OPERATOR(squeeze_grad, ops::SqueezeGradOp, - ops::SqueezeGradNoNeedBufferVarsInference); + ops::SqueezeGradNoNeedBufferVarsInferer); REGISTER_OPERATOR(squeeze2, ops::Squeeze2Op, ops::Squeeze2OpMaker, ops::Squeeze2GradOpMaker, diff --git a/paddle/fluid/operators/strided_slice_op.cc b/paddle/fluid/operators/strided_slice_op.cc index ca1a16561f9..f8e5d917108 100644 --- a/paddle/fluid/operators/strided_slice_op.cc +++ b/paddle/fluid/operators/strided_slice_op.cc @@ -304,7 +304,7 @@ class StridedSliceOpGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(StridedSliceOpGradNoNeedBufferVarsInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(StridedSliceOpGradNoNeedBufferVarsInferer, "Input"); } // namespace operators @@ -315,7 +315,7 @@ REGISTER_OPERATOR(strided_slice, ops::StridedSliceOp, ops::StridedSliceOpMaker, ops::StridedSliceOpGradMaker, ops::StridedSliceOpGradMaker); REGISTER_OPERATOR(strided_slice_grad, ops::StridedSliceOpGrad, - ops::StridedSliceOpGradNoNeedBufferVarsInference); + ops::StridedSliceOpGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( strided_slice, diff --git a/paddle/fluid/operators/trace_op.cc b/paddle/fluid/operators/trace_op.cc index 51399b68a1d..6bb158c5816 100644 --- a/paddle/fluid/operators/trace_op.cc +++ b/paddle/fluid/operators/trace_op.cc @@ -147,8 +147,7 @@ class TraceGradOpMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(TraceGradNoNeedBufferVarsInference, - "Input"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(TraceGradNoNeedBufferVarsInferer, "Input"); } // namespace operators } // namespace paddle @@ -159,7 +158,7 @@ REGISTER_OPERATOR(trace, ops::TraceOp, ops::TraceOpMaker, ops::TraceGradOpMaker); REGISTER_OPERATOR(trace_grad, ops::TraceOpGrad, - ops::TraceGradNoNeedBufferVarsInference); + ops::TraceGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( trace, ops::TraceKernel, ops::TraceKernel, diff --git a/paddle/fluid/operators/unfold_op.cc b/paddle/fluid/operators/unfold_op.cc index fd592bf35a8..0a36b6ef840 100644 --- a/paddle/fluid/operators/unfold_op.cc +++ b/paddle/fluid/operators/unfold_op.cc @@ -174,7 +174,7 @@ class UnfoldGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(UnfoldGradOpNoNeedBufferVarsInference, "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(UnfoldGradOpNoNeedBufferVarsInferer, "X"); } // namespace operators } // namespace paddle @@ -184,7 +184,7 @@ REGISTER_OPERATOR(unfold, ops::UnfoldOp, ops::UnfoldOpMaker, ops::UnfoldGradMaker, ops::UnfoldGradMaker); REGISTER_OPERATOR(unfold_grad, ops::UnfoldGradOp, - ops::UnfoldGradOpNoNeedBufferVarsInference); + ops::UnfoldGradOpNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( unfold, ops::UnfoldOpKernel, diff --git a/paddle/fluid/operators/unsqueeze_op.cc b/paddle/fluid/operators/unsqueeze_op.cc index e191481f3b1..c33e7c60686 100644 --- a/paddle/fluid/operators/unsqueeze_op.cc +++ b/paddle/fluid/operators/unsqueeze_op.cc @@ -306,8 +306,7 @@ DECLARE_INPLACE_OP_INFERER(UnsqueezeInplaceInferer, {"X", "Out"}); DECLARE_INPLACE_OP_INFERER(UnsqueezeGradInplaceInferer, {framework::GradVarName("Out"), framework::GradVarName("X")}); -DECLARE_NO_NEED_BUFFER_VARS_INFERER(UnsqueezeGradOpNoNeedBufferVarInference, - "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(UnsqueezeGradOpNoNeedBufferVarInferer, "X"); } // namespace operators } // namespace paddle @@ -316,7 +315,7 @@ REGISTER_OPERATOR(unsqueeze, ops::UnsqueezeOp, ops::UnsqueezeOpMaker, ops::UnsqueezeGradOpMaker, ops::UnsqueezeGradOpMaker); REGISTER_OPERATOR(unsqueeze_grad, ops::UnsqueezeGradOp, - ops::UnsqueezeGradOpNoNeedBufferVarInference); + ops::UnsqueezeGradOpNoNeedBufferVarInferer); REGISTER_OPERATOR(unsqueeze2, ops::Unsqueeze2Op, ops::Unsqueeze2OpMaker, ops::Unsqueeze2GradOpMaker, diff --git a/paddle/fluid/operators/warpctc_op.cc b/paddle/fluid/operators/warpctc_op.cc index aa06b67a3e1..5dcbabc96b4 100644 --- a/paddle/fluid/operators/warpctc_op.cc +++ b/paddle/fluid/operators/warpctc_op.cc @@ -184,7 +184,7 @@ class WarpCTCGradOp : public framework::OperatorWithKernel { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(WarpCTCGradOpNoNeedBufferVarInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(WarpCTCGradOpNoNeedBufferVarInferer, "Logits"); } // namespace operators @@ -195,7 +195,7 @@ REGISTER_OPERATOR(warpctc, ops::WarpCTCOp, ops::WarpCTCOpMaker, ops::WarpCTCGradOpMaker, ops::WarpCTCGradOpMaker); REGISTER_OPERATOR(warpctc_grad, ops::WarpCTCGradOp, - ops::WarpCTCGradOpNoNeedBufferVarInference); + ops::WarpCTCGradOpNoNeedBufferVarInferer); REGISTER_OP_CPU_KERNEL( warpctc, ops::WarpCTCKernel); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/where_op.cc b/paddle/fluid/operators/where_op.cc index 7b198cf2240..92ed2bbdc33 100644 --- a/paddle/fluid/operators/where_op.cc +++ b/paddle/fluid/operators/where_op.cc @@ -135,8 +135,7 @@ class WhereOpGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(WhereGradNoNeedBufferVarsInference, "X", - "Y"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(WhereGradNoNeedBufferVarsInferer, "X", "Y"); } // namespace operators } // namespace paddle @@ -146,7 +145,7 @@ REGISTER_OPERATOR(where, ops::WhereOp, ops::WhereOpMaker, ops::WhereOpGradMaker); REGISTER_OPERATOR(where_grad, ops::WhereGradOp, - ops::WhereGradNoNeedBufferVarsInference); + ops::WhereGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( where, ops::WhereKernel, ops::WhereKernel, -- GitLab