diff --git a/paddle/fluid/operators/hierarchical_sigmoid_op.cc b/paddle/fluid/operators/hierarchical_sigmoid_op.cc index dd72a212d3642ce4ae081125cc8e8bd12fb86af1..05d521be5a10643906b9cd5a98a19873b4ee64f4 100644 --- a/paddle/fluid/operators/hierarchical_sigmoid_op.cc +++ b/paddle/fluid/operators/hierarchical_sigmoid_op.cc @@ -257,7 +257,7 @@ class HierarchicalSigmoidGradOpGradVarTypeInference }; DECLARE_NO_NEED_BUFFER_VARS_INFERER( - HierarchicalSigmoidGradOpNoNeedBufferVarInference, "Bias"); + HierarchicalSigmoidGradOpNoNeedBufferVarInferer, "Bias"); } // namespace operators } // namespace paddle @@ -270,7 +270,7 @@ REGISTER_OPERATOR( ops::HierarchicalSigmoidGradMaker); REGISTER_OPERATOR(hierarchical_sigmoid_grad, ops::HierarchicalSigmoidGradOp, ops::HierarchicalSigmoidGradOpGradVarTypeInference, - ops::HierarchicalSigmoidGradOpNoNeedBufferVarInference); + ops::HierarchicalSigmoidGradOpNoNeedBufferVarInferer); REGISTER_OP_CPU_KERNEL( hierarchical_sigmoid, ops::HierarchicalSigmoidOpKernel, diff --git a/paddle/fluid/operators/index_select_op.cc b/paddle/fluid/operators/index_select_op.cc index 31ef7b7662b6996f4402cb2120f4a0029cf78ddf..60ca7e2fe7cfd3070b353bca380d48acadaebe8a 100644 --- a/paddle/fluid/operators/index_select_op.cc +++ b/paddle/fluid/operators/index_select_op.cc @@ -138,7 +138,7 @@ class IndexSelectGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(IndexSelectGradNoNeedBufferVarsInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(IndexSelectGradNoNeedBufferVarsInferer, "X"); } // namespace operators } // namespace paddle @@ -148,7 +148,7 @@ REGISTER_OPERATOR(index_select, ops::IndexSelectOp, ops::IndexSelectOpMaker, ops::IndexSelectGradMaker, ops::IndexSelectGradMaker); REGISTER_OPERATOR(index_select_grad, ops::IndexSelectGradOp, - ops::IndexSelectGradNoNeedBufferVarsInference); + ops::IndexSelectGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( index_select, ops::IndexSelectKernel, diff --git a/paddle/fluid/operators/instance_norm_op.cc b/paddle/fluid/operators/instance_norm_op.cc index 2609d243705bbcdfb1acc89c36d5660cc657182c..a915c018ab9224e68e57e0f4125e5ee192521f14 100644 --- a/paddle/fluid/operators/instance_norm_op.cc +++ b/paddle/fluid/operators/instance_norm_op.cc @@ -603,7 +603,7 @@ class InstanceNormDoubleGradKernel } }; -DECLARE_INPLACE_OP_INFERER(InstanceNormDoubleGradOpInplaceInference, +DECLARE_INPLACE_OP_INFERER(InstanceNormDoubleGradOpInplaceInferer, {"DY", "DDY"}); } // namespace operators @@ -618,7 +618,7 @@ REGISTER_OPERATOR(instance_norm_grad, ops::InstanceNormGradOp, ops::InstanceNormDoubleGradMaker, ops::InstanceNormDoubleGradMaker); REGISTER_OPERATOR(instance_norm_grad_grad, ops::InstanceNormDoubleGradOp, - ops::InstanceNormDoubleGradOpInplaceInference); + ops::InstanceNormDoubleGradOpInplaceInferer); REGISTER_OP_CPU_KERNEL( instance_norm, diff --git a/paddle/fluid/operators/interpolate_op.cc b/paddle/fluid/operators/interpolate_op.cc index 49da719880d249e7b3d9bdb21f253105f7270576..1e99e22e12b2a23685dad742f175fd2b0684d334 100644 --- a/paddle/fluid/operators/interpolate_op.cc +++ b/paddle/fluid/operators/interpolate_op.cc @@ -585,7 +585,7 @@ class InterpolateGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(InterpolateGradNoNeedBufferVarsInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(InterpolateGradNoNeedBufferVarsInferer, "X"); } // namespace operators @@ -596,22 +596,22 @@ REGISTER_OPERATOR(bilinear_interp, ops::InterpolateOp, ops::InterpolateOpMaker, ops::InterpolateGradMaker, ops::InterpolateGradMaker); REGISTER_OPERATOR(bilinear_interp_grad, ops::InterpolateOpGrad, - ops::InterpolateGradNoNeedBufferVarsInference); + ops::InterpolateGradNoNeedBufferVarsInferer); REGISTER_OPERATOR(nearest_interp, ops::InterpolateOp, ops::InterpolateOpMaker, ops::InterpolateGradMaker, ops::InterpolateGradMaker); REGISTER_OPERATOR(nearest_interp_grad, ops::InterpolateOpGrad, - ops::InterpolateGradNoNeedBufferVarsInference); + ops::InterpolateGradNoNeedBufferVarsInferer); REGISTER_OPERATOR(trilinear_interp, ops::InterpolateOp, ops::InterpolateOpMaker, ops::InterpolateGradMaker, ops::InterpolateGradMaker); REGISTER_OPERATOR(trilinear_interp_grad, ops::InterpolateOpGrad, - ops::InterpolateGradNoNeedBufferVarsInference); + ops::InterpolateGradNoNeedBufferVarsInferer); REGISTER_OPERATOR(bicubic_interp, ops::InterpolateOp, ops::InterpolateOpMaker, ops::InterpolateGradMaker, ops::InterpolateGradMaker); REGISTER_OPERATOR(bicubic_interp_grad, ops::InterpolateOpGrad, - ops::InterpolateGradNoNeedBufferVarsInference); + ops::InterpolateGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL(bilinear_interp, ops::InterpolateKernel, ops::InterpolateKernel, ops::InterpolateKernel); @@ -631,7 +631,7 @@ REGISTER_OPERATOR(linear_interp, ops::InterpolateOp, ops::InterpolateOpMaker, ops::InterpolateGradMaker, ops::InterpolateGradMaker); REGISTER_OPERATOR(linear_interp_grad, ops::InterpolateOpGrad, - ops::InterpolateGradNoNeedBufferVarsInference); + ops::InterpolateGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL(linear_interp, ops::InterpolateKernel, ops::InterpolateKernel, ops::InterpolateKernel); diff --git a/paddle/fluid/operators/kldiv_loss_op.cc b/paddle/fluid/operators/kldiv_loss_op.cc index 7286e2e6d3144528d39a3980908aeeddd1ad9823..a78d8ec10149db5a1f8d585cb06bb08ea6ca5a5f 100644 --- a/paddle/fluid/operators/kldiv_loss_op.cc +++ b/paddle/fluid/operators/kldiv_loss_op.cc @@ -166,7 +166,7 @@ class KLDivLossOpGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(KLDivLossGradNoNeedBufferVarInference, "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(KLDivLossGradNoNeedBufferVarInferer, "X"); } // namespace operators } // namespace paddle @@ -176,7 +176,7 @@ REGISTER_OPERATOR(kldiv_loss, ops::KLDivLossOp, ops::KLDivLossOpMaker, ops::KLDivLossOpGradMaker, ops::KLDivLossOpGradMaker); REGISTER_OPERATOR(kldiv_loss_grad, ops::KLDivLossOpGrad, - ops::KLDivLossGradNoNeedBufferVarInference); + ops::KLDivLossGradNoNeedBufferVarInferer); REGISTER_OP_CPU_KERNEL( kldiv_loss, ops::KLDivLossKernel, ops::KLDivLossKernel); diff --git a/paddle/fluid/operators/layer_norm_op.cc b/paddle/fluid/operators/layer_norm_op.cc index 3c308ecd5100fe4f8c82d706489a11acf15a61ea..89d8b57505da242f365d5bc5c03dce492edc76d4 100644 --- a/paddle/fluid/operators/layer_norm_op.cc +++ b/paddle/fluid/operators/layer_norm_op.cc @@ -220,7 +220,7 @@ class LayerNormGradOpMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(LayerNormGradNoNeedBufferVarInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(LayerNormGradNoNeedBufferVarInferer, "Bias"); } // namespace operators @@ -231,7 +231,7 @@ REGISTER_OPERATOR(layer_norm, ops::LayerNormOp, ops::LayerNormOpMaker, ops::LayerNormGradOpMaker, ops::LayerNormGradOpMaker); REGISTER_OPERATOR(layer_norm_grad, ops::LayerNormGradOp, - ops::LayerNormGradNoNeedBufferVarInference); + ops::LayerNormGradNoNeedBufferVarInferer); REGISTER_OP_CPU_KERNEL( layer_norm, ops::LayerNormKernel, ops::LayerNormKernel); diff --git a/paddle/fluid/operators/linear_chain_crf_op.cc b/paddle/fluid/operators/linear_chain_crf_op.cc index 72eb7fb21d110be19517adcebd554772905d4057..f2ccbb2f21a8fd14e67e9fb165cf9b884539b302 100644 --- a/paddle/fluid/operators/linear_chain_crf_op.cc +++ b/paddle/fluid/operators/linear_chain_crf_op.cc @@ -345,7 +345,7 @@ class LinearChainCRFGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(LinearChainCRFGradNoNeedBufferVarsInference, +DECLARE_NO_NEED_BUFFER_VARS_INFERER(LinearChainCRFGradNoNeedBufferVarsInferer, "Transition", "Emission"); } // namespace operators @@ -357,7 +357,7 @@ REGISTER_OPERATOR(linear_chain_crf, ops::LinearChainCRFOp, ops::LinearChainCRFGradMaker, ops::LinearChainCRFGradMaker); REGISTER_OPERATOR(linear_chain_crf_grad, ops::LinearChainCRFGradOp, - ops::LinearChainCRFGradNoNeedBufferVarsInference); + ops::LinearChainCRFGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( linear_chain_crf, ops::LinearChainCRFOpKernel, diff --git a/paddle/fluid/operators/lod_reset_op.cc b/paddle/fluid/operators/lod_reset_op.cc index 377ecacabc1750aa2c4b6e6883cf2b2d423f5d3c..5616309683365c30fea9907268ed87a6f2cd4a8d 100644 --- a/paddle/fluid/operators/lod_reset_op.cc +++ b/paddle/fluid/operators/lod_reset_op.cc @@ -223,7 +223,7 @@ DECLARE_INPLACE_OP_INFERER(LoDResetGradInplaceInferer, {framework::GradVarName("Out"), framework::GradVarName("X")}); -DECLARE_NO_NEED_BUFFER_VARS_INFERER(LoDResetGradNoNeedBufferVarInference, "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(LoDResetGradNoNeedBufferVarInferer, "X"); } // namespace operators } // namespace paddle @@ -234,7 +234,7 @@ REGISTER_OPERATOR(lod_reset, ops::LoDResetOp, ops::LoDResetOpMaker, ops::LoDResetGradMaker, ops::LoDResetOpVarTypeInference, ops::LoDResetInplaceInferer); REGISTER_OPERATOR(lod_reset_grad, ops::LoDResetGradOp, - ops::LoDResetGradNoNeedBufferVarInference, + ops::LoDResetGradNoNeedBufferVarInferer, ops::LoDResetGradInplaceInferer); REGISTER_OP_CPU_KERNEL( diff --git a/paddle/fluid/operators/lookup_table_op.cc b/paddle/fluid/operators/lookup_table_op.cc index 158080cf8a390eb627ae592c5aa6ec0d4a960c72..9b1519b54696c8ecd90c98f46d3826d31526894a 100644 --- a/paddle/fluid/operators/lookup_table_op.cc +++ b/paddle/fluid/operators/lookup_table_op.cc @@ -130,7 +130,7 @@ or not. And the output only shares the LoD information with input Ids. } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(LookupTableGradOpNoBuffer, "W"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(LookupTableGradOpNoBufferVarsInferer, "W"); template class LookupTableGradOpMaker : public framework::SingleGradOpMaker { @@ -198,7 +198,7 @@ REGISTER_OPERATOR(lookup_table, ops::LookupTableOp, ops::LookupTableOpMaker, ops::LookupTableGradOpMaker); REGISTER_OPERATOR(lookup_table_grad, ops::LookupTableOpGrad, - ops::LookupTableGradOpNoBuffer, + ops::LookupTableGradOpNoBufferVarsInferer, ops::LookupTableOpGradVarTypeInference); REGISTER_OP_CPU_KERNEL(lookup_table, ops::LookupTableKernel, diff --git a/paddle/fluid/operators/lookup_table_v2_op.cc b/paddle/fluid/operators/lookup_table_v2_op.cc index 53c9e70dc7fb882c5e4f89f2f6623f92495a51e6..122e01f146ccddbdc8e72aba67d47855ad30b0eb 100644 --- a/paddle/fluid/operators/lookup_table_v2_op.cc +++ b/paddle/fluid/operators/lookup_table_v2_op.cc @@ -118,7 +118,8 @@ or not. And the output only shares the LoD information with input Ids. } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(LookupTableV2GradOpNoBuffer, "W"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(LookupTableV2GradOpNoBufferVarsInferer, + "W"); template class LookupTableV2GradOpMaker : public framework::SingleGradOpMaker { @@ -187,7 +188,7 @@ REGISTER_OPERATOR(lookup_table_v2, ops::LookupTableV2Op, ops::LookupTableV2GradOpMaker); REGISTER_OPERATOR(lookup_table_v2_grad, ops::LookupTableV2OpGrad, - ops::LookupTableV2GradOpNoBuffer, + ops::LookupTableV2GradOpNoBufferVarsInferer, ops::LookupTableV2OpGradVarTypeInference); REGISTER_OP_CPU_KERNEL(lookup_table_v2, ops::LookupTableV2Kernel, diff --git a/paddle/fluid/operators/mean_op.cc b/paddle/fluid/operators/mean_op.cc index 7e75905bc4975b59772cb0d22d8a6db3520e1803..764529a15b6a2b2c98f9ac727d971b8b0b8d1855 100644 --- a/paddle/fluid/operators/mean_op.cc +++ b/paddle/fluid/operators/mean_op.cc @@ -83,7 +83,7 @@ class MeanGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(MeanGradNoNeedBufferVarsInference, "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(MeanGradNoNeedBufferVarsInferer, "X"); } // namespace operators } // namespace paddle @@ -93,7 +93,7 @@ REGISTER_OPERATOR(mean, ops::MeanOp, ops::MeanOpMaker, ops::MeanOpInferVarType, ops::MeanGradMaker, ops::MeanGradMaker); REGISTER_OPERATOR(mean_grad, ops::MeanGradOp, - ops::MeanGradNoNeedBufferVarsInference); + ops::MeanGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( mean, ops::MeanKernel, ops::MeanKernel); diff --git a/paddle/fluid/operators/nce_op.cc b/paddle/fluid/operators/nce_op.cc index 10ed364e37e88c72b8e6e195c51ade8ac72cbfd7..ce382389aa0b340bea256b425ec4371499eb5207 100644 --- a/paddle/fluid/operators/nce_op.cc +++ b/paddle/fluid/operators/nce_op.cc @@ -307,7 +307,7 @@ class NCEOpGradVarTypeInference : public framework::VarTypeInference { } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(NCEGradOpNoNeedBufferVarInference, "Bias"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(NCEGradOpNoNeedBufferVarInferer, "Bias"); } // namespace operators } // namespace paddle @@ -317,7 +317,7 @@ REGISTER_OPERATOR(nce, ops::NCEOp, ops::NCEOpMaker, ops::NCEGradOpMaker, ops::NCEGradOpMaker); REGISTER_OPERATOR(nce_grad, ops::NCEOpGrad, ops::NCEOpGradVarTypeInference, - ops::NCEGradOpNoNeedBufferVarInference); + ops::NCEGradOpNoNeedBufferVarInferer); REGISTER_OP_CPU_KERNEL(nce, ops::NCEKernel, ops::NCEKernel); REGISTER_OP_CPU_KERNEL(nce_grad, diff --git a/paddle/fluid/operators/pad2d_op.cc b/paddle/fluid/operators/pad2d_op.cc index df3bb9c01012185afa4b063dedd2ffebcaf0015a..e50af02dcc4e0b53c95b27be0245ec76a7aed78e 100644 --- a/paddle/fluid/operators/pad2d_op.cc +++ b/paddle/fluid/operators/pad2d_op.cc @@ -656,7 +656,7 @@ class Pad2dOpGradMaker : public framework::SingleGradOpMaker { }; // TODO(zjl): Paddings can also be skipped! -DECLARE_NO_NEED_BUFFER_VARS_INFERER(Pad2dOpGradNoNeedBufferVarsInference, "X"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(Pad2dOpGradNoNeedBufferVarsInferer, "X"); } // namespace operators } // namespace paddle @@ -667,7 +667,7 @@ REGISTER_OPERATOR(pad2d, ops::Pad2dOp, ops::Pad2dOpMaker, ops::Pad2dOpGradMaker, ops::Pad2dOpGradMaker); REGISTER_OPERATOR(pad2d_grad, ops::Pad2dOpGrad, - ops::Pad2dOpGradNoNeedBufferVarsInference); + ops::Pad2dOpGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL(pad2d, ops::Pad2dCPUKernel, ops::Pad2dCPUKernel, ops::Pad2dCPUKernel, ops::Pad2dCPUKernel); diff --git a/paddle/fluid/operators/pool_with_index_op.cc b/paddle/fluid/operators/pool_with_index_op.cc index d081ecb3a2bfb9107f1791688666d5e0e713f8ca..0371ea5b09bb30064af9dcc9f5a8a2d3a8a64fbf 100644 --- a/paddle/fluid/operators/pool_with_index_op.cc +++ b/paddle/fluid/operators/pool_with_index_op.cc @@ -316,7 +316,7 @@ class MaxPoolWithIndexGradOpMaker : public framework::SingleGradOpMaker { }; DECLARE_NO_NEED_BUFFER_VARS_INFERER( - MaxPoolWithIndexOpGradNoNeedBufferVarsInference, "X"); + MaxPoolWithIndexOpGradNoNeedBufferVarsInferer, "X"); } // namespace operators } // namespace paddle @@ -328,7 +328,7 @@ REGISTER_OPERATOR(max_pool2d_with_index, ops::MaxPoolWithIndexOp, ops::MaxPoolWithIndexGradOpMaker, ops::MaxPoolWithIndexGradOpMaker); REGISTER_OPERATOR(max_pool2d_with_index_grad, ops::MaxPoolWithIndexOpGrad, - ops::MaxPoolWithIndexOpGradNoNeedBufferVarsInference); + ops::MaxPoolWithIndexOpGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( max_pool2d_with_index, @@ -347,7 +347,7 @@ REGISTER_OPERATOR(max_pool3d_with_index, ops::MaxPoolWithIndexOp, ops::MaxPoolWithIndexGradOpMaker, ops::MaxPoolWithIndexGradOpMaker); REGISTER_OPERATOR(max_pool3d_with_index_grad, ops::MaxPoolWithIndexOpGrad, - ops::MaxPoolWithIndexOpGradNoNeedBufferVarsInference); + ops::MaxPoolWithIndexOpGradNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL( max_pool3d_with_index, diff --git a/paddle/fluid/operators/push_dense_op.cc b/paddle/fluid/operators/push_dense_op.cc index 20af4dba0daa9efe51a433839efda693650d0b92..5b9f05bd126b8aa7f895af1f659f705617491643 100644 --- a/paddle/fluid/operators/push_dense_op.cc +++ b/paddle/fluid/operators/push_dense_op.cc @@ -56,7 +56,7 @@ The input gradients is all dense gradient tensors in a table. } }; -DECLARE_NO_NEED_BUFFER_VARS_INFERER(PushDenseNoNeedBufferVarsInference, "Ids"); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(PushDenseNoNeedBufferVarsInferer, "Ids"); } // namespace operators } // namespace paddle @@ -66,5 +66,5 @@ REGISTER_OPERATOR( push_dense, ops::PushDenseOp, ops::PushDenseOpMaker, paddle::framework::EmptyGradOpMaker, paddle::framework::EmptyGradOpMaker, - ops::PushDenseNoNeedBufferVarsInference); + ops::PushDenseNoNeedBufferVarsInferer); REGISTER_OP_CPU_KERNEL(push_dense, ops::PushDenseCPUKernel) diff --git a/paddle/fluid/operators/reshape_op.cc b/paddle/fluid/operators/reshape_op.cc index 8eba5b888ecc27de1f9e7c6f535098880aa25bfd..fee0f045825591d548350c289f3f290d5dd1d723 100644 --- a/paddle/fluid/operators/reshape_op.cc +++ b/paddle/fluid/operators/reshape_op.cc @@ -545,12 +545,12 @@ class Reshape2DoubleGradOp : public framework::OperatorWithKernel { } }; -DECLARE_INPLACE_OP_INFERER(ReshapeOpInplaceInToOut, {"X", "Out"}); -DECLARE_INPLACE_OP_INFERER(ReshapeGradInplaceInToOut, +DECLARE_INPLACE_OP_INFERER(ReshapeOpInplaceInferer, {"X", "Out"}); +DECLARE_INPLACE_OP_INFERER(ReshapeGradInplaceInferer, {framework::GradVarName("Out"), framework::GradVarName("X")}); -DECLARE_INPLACE_OP_INFERER(ReshapeDoubleGradInplaceInToOut, {"DDX", "DDOut"}); -DECLARE_NO_NEED_BUFFER_VARS_INFERER(ReshapeDoubleGradOpNoNeedBufferVarInference, +DECLARE_INPLACE_OP_INFERER(ReshapeDoubleGradInplaceInferer, {"DDX", "DDOut"}); +DECLARE_NO_NEED_BUFFER_VARS_INFERER(ReshapeDoubleGradOpNoNeedBufferVarInferer, "DOut"); } // namespace operators @@ -562,9 +562,9 @@ REGISTER_OPERATOR( reshape, ops::ReshapeOp, ops::ReshapeOpMaker, paddle::framework::DefaultGradOpMaker, paddle::framework::DefaultGradOpMaker, - ops::ReshapeOpInplaceInToOut); + ops::ReshapeOpInplaceInferer); REGISTER_OPERATOR(reshape_grad, ops::ReshapeGradOp, - ops::ReshapeGradInplaceInToOut); + ops::ReshapeGradInplaceInferer); REGISTER_OP_CPU_KERNEL_FUNCTOR(reshape, float, ops::ReshapeKernel, double, ops::ReshapeKernel, int, ops::ReshapeKernel, @@ -576,14 +576,14 @@ REGISTER_OP_CPU_KERNEL_FUNCTOR(reshape_grad, float, ops::ReshapeGradKernel, REGISTER_OPERATOR(reshape2, ops::Reshape2Op, ops::Reshape2OpMaker, ops::Reshape2GradMaker, ops::Reshape2GradMaker, - ops::ReshapeOpInplaceInToOut); + ops::ReshapeOpInplaceInferer); REGISTER_OPERATOR(reshape2_grad, ops::Reshape2GradOp, ops::Reshape2DoubleGradMaker, ops::Reshape2DoubleGradMaker, - ops::ReshapeGradInplaceInToOut); + ops::ReshapeGradInplaceInferer); REGISTER_OPERATOR(reshape2_grad_grad, ops::Reshape2DoubleGradOp, - ops::ReshapeDoubleGradInplaceInToOut, - ops::ReshapeDoubleGradOpNoNeedBufferVarInference); + ops::ReshapeDoubleGradInplaceInferer, + ops::ReshapeDoubleGradOpNoNeedBufferVarInferer); REGISTER_OP_CPU_KERNEL_FUNCTOR(reshape2, float, ops::ReshapeKernel, double, ops::ReshapeKernel, int8_t, ops::ReshapeKernel, diff --git a/paddle/fluid/operators/scale_op.cc b/paddle/fluid/operators/scale_op.cc index 647e3cea99d3c1975d0da988d58dcab139ec1209..9d51f3e292fa2de114b971032c29f5e769ba617a 100644 --- a/paddle/fluid/operators/scale_op.cc +++ b/paddle/fluid/operators/scale_op.cc @@ -104,7 +104,7 @@ class ScaleGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_INPLACE_OP_INFERER(ScaleOpInplace, {"X", "Out"}); +DECLARE_INPLACE_OP_INFERER(ScaleOpInplaceInferer, {"X", "Out"}); } // namespace operators } // namespace paddle @@ -113,7 +113,7 @@ namespace ops = paddle::operators; REGISTER_OPERATOR(scale, ops::ScaleOp, ops::ScaleOpMaker, ops::ScaleGradMaker, ops::ScaleGradMaker, - ops::ScaleOpVarTypeInference, ops::ScaleOpInplace); + ops::ScaleOpVarTypeInference, ops::ScaleOpInplaceInferer); REGISTER_OP_CPU_KERNEL( scale, ops::ScaleKernel, ops::ScaleKernel, diff --git a/paddle/fluid/operators/softmax_with_cross_entropy_op.cc b/paddle/fluid/operators/softmax_with_cross_entropy_op.cc index b5b99d3a929b0e97e286931fc805e29241773933..946ede475ce68447db05f2ecd2bd624e90881376 100644 --- a/paddle/fluid/operators/softmax_with_cross_entropy_op.cc +++ b/paddle/fluid/operators/softmax_with_cross_entropy_op.cc @@ -287,10 +287,10 @@ class SoftmaxGradMaker : public framework::SingleGradOpMaker { } }; -DECLARE_INPLACE_OP_INFERER(SoftmaxWithCrossEntropyInplaceInference, +DECLARE_INPLACE_OP_INFERER(SoftmaxWithCrossEntropyInplaceInferer, {"Logits", "Softmax"}); -DECLARE_INPLACE_OP_INFERER(SoftmaxWithCrossEntropyGradInplaceInference, +DECLARE_INPLACE_OP_INFERER(SoftmaxWithCrossEntropyGradInplaceInferer, {"Softmax", framework::GradVarName("Logits")}); } // namespace operators @@ -302,10 +302,10 @@ REGISTER_OPERATOR(softmax_with_cross_entropy, ops::SoftmaxWithCrossEntropyOp, ops::SoftmaxWithCrossEntropyOpMaker, ops::SoftmaxGradMaker, ops::SoftmaxGradMaker, - ops::SoftmaxWithCrossEntropyInplaceInference); + ops::SoftmaxWithCrossEntropyInplaceInferer); REGISTER_OPERATOR(softmax_with_cross_entropy_grad, ops::SoftmaxWithCrossEntropyOpGrad, - ops::SoftmaxWithCrossEntropyGradInplaceInference); + ops::SoftmaxWithCrossEntropyGradInplaceInferer); REGISTER_OP_CPU_KERNEL(softmax_with_cross_entropy, ops::SoftmaxWithCrossEntropyKernel, ops::SoftmaxWithCrossEntropyKernel); diff --git a/paddle/fluid/operators/sum_op.cc b/paddle/fluid/operators/sum_op.cc index 39d6a992043072ed98bf35a060b99233dd927bc7..b06e8202cc79f017e26e3c8339ad05951a5a2bf7 100644 --- a/paddle/fluid/operators/sum_op.cc +++ b/paddle/fluid/operators/sum_op.cc @@ -299,7 +299,7 @@ class SumGradOpBaseMaker : public imperative::GradOpBaseMakerBase { } }; -DECLARE_INPLACE_OP_INFERER(SumInplace, {"X", "Out"}); +DECLARE_INPLACE_OP_INFERER(SumInplaceInferer, {"X", "Out"}); } // namespace operators } // namespace paddle @@ -308,7 +308,7 @@ namespace ops = paddle::operators; REGISTER_OPERATOR(sum, ops::SumOp, ops::SumOpMaker, ops::SumGradDescMaker, ops::SumGradOpBaseMaker, ops::SumOpVarTypeInference, - ops::SumInplace); + ops::SumInplaceInferer); REGISTER_OP_CPU_KERNEL( sum, ops::SumKernel,