未验证 提交 53e6f8e1 编写于 作者: Z Zeng Jinle 提交者: GitHub

rename macro, test=develop (#23161)

上级 bba74071
......@@ -81,7 +81,7 @@ class NoNeedBufferVarsInference {
}
};
#define DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(class_type, ...) \
#define DECLARE_NO_NEED_BUFFER_VARS_INFERER(class_type, ...) \
class class_type final \
: public ::paddle::framework::NoNeedBufferVarsInference { \
public: \
......@@ -96,9 +96,6 @@ class NoNeedBufferVarsInference {
} \
}
#define DECLARE_NO_NEED_BUFFER_VARS_INFERER \
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE
class InferNoNeedBufferVarsFN {
public:
inline const std::unordered_set<std::string> &operator()(
......
......@@ -646,8 +646,7 @@ class Pad2dOpGradMaker : public framework::SingleGradOpMaker<T> {
};
// TODO(zjl): Paddings can also be skipped!
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(Pad2dOpGradNoNeedBufferVarsInference,
"X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(Pad2dOpGradNoNeedBufferVarsInference, "X");
} // namespace operators
} // namespace paddle
......
......@@ -307,7 +307,7 @@ class MaxPoolWithIndexGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(
DECLARE_NO_NEED_BUFFER_VARS_INFERER(
MaxPoolWithIndexOpGradNoNeedBufferVarsInference, "X");
} // namespace operators
......
......@@ -542,8 +542,8 @@ DECLARE_INPLACE_OP_INFERER(ReshapeGradInplaceInToOut,
{framework::GradVarName("Out"),
framework::GradVarName("X")});
DECLARE_INPLACE_OP_INFERER(ReshapeDoubleGradInplaceInToOut, {"DDX", "DDOut"});
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(
ReshapeDoubleGradOpNoNeedBufferVarInference, "DOut");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(ReshapeDoubleGradOpNoNeedBufferVarInference,
"DOut");
} // namespace operators
} // namespace paddle
......
......@@ -169,7 +169,7 @@ class ROIAlignGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(RoiAlignGradNoNeedBufVarsInferer, "X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(RoiAlignGradNoNeedBufVarsInferer, "X");
} // namespace operators
} // namespace paddle
......
......@@ -159,8 +159,8 @@ class ScatterNdAddGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(ScatterNdAddGradNoNeedBufferVarsInference,
"Updates");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(ScatterNdAddGradNoNeedBufferVarsInference,
"Updates");
} // namespace operators
} // namespace paddle
......
......@@ -125,8 +125,8 @@ class ScatterGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(ScatterGradNoNeedBufferVarsInference,
"Updates");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(ScatterGradNoNeedBufferVarsInference,
"Updates");
DECLARE_INPLACE_OP_INFERER(ScatterInplaceInferer, {"X", "Out"});
DECLARE_INPLACE_OP_INFERER(ScatterGradInplaceInferer,
......
......@@ -315,8 +315,8 @@ class SliceDoubleOpGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(SliceOpGradNoNeedBufferVarsInference,
"Input");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(SliceOpGradNoNeedBufferVarsInference,
"Input");
} // namespace operators
} // namespace paddle
......
......@@ -131,7 +131,7 @@ class SpaceToDepthOpMaker : public framework::OpProtoAndCheckerMaker {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(SpaceToDepthGradOpNoBuffer, "X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(SpaceToDepthGradOpNoBuffer, "X");
template <typename T>
class SpaceToDepthGradOpMaker : public framework::SingleGradOpMaker<T> {
......
......@@ -71,8 +71,7 @@ class SquaredL2DistanceOp : public framework::OperatorWithKernel {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(SquaredL2DistanceGradOpNoBuffer, "X",
"Y");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(SquaredL2DistanceGradOpNoBuffer, "X", "Y");
template <typename T>
class SquaredL2DistanceGradOpMaker : public framework::SingleGradOpMaker<T> {
......
......@@ -286,8 +286,7 @@ DECLARE_INPLACE_OP_INFERER(SequeezeInplaceInferer, {"X", "Out"});
DECLARE_INPLACE_OP_INFERER(SequeezeGradInplaceInferer,
{framework::GradVarName("Out"),
framework::GradVarName("X")});
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(SqueezeGradNoNeedBufferVarsInference,
"X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(SqueezeGradNoNeedBufferVarsInference, "X");
} // namespace operators
} // namespace paddle
......
......@@ -272,8 +272,8 @@ class StridedSliceOpGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(
StridedSliceOpGradNoNeedBufferVarsInference, "Input");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(StridedSliceOpGradNoNeedBufferVarsInference,
"Input");
} // namespace operators
} // namespace paddle
......
......@@ -163,8 +163,7 @@ class UnfoldGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(UnfoldGradOpNoNeedBufferVarsInference,
"X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(UnfoldGradOpNoNeedBufferVarsInference, "X");
} // namespace operators
} // namespace paddle
......
......@@ -282,8 +282,8 @@ DECLARE_INPLACE_OP_INFERER(UnsqueezeInplaceInferer, {"X", "Out"});
DECLARE_INPLACE_OP_INFERER(UnsqueezeGradInplaceInferer,
{framework::GradVarName("Out"),
framework::GradVarName("X")});
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(UnsqueezeGradOpNoNeedBufferVarInference,
"X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(UnsqueezeGradOpNoNeedBufferVarInference,
"X");
} // namespace operators
} // namespace paddle
......
......@@ -178,8 +178,8 @@ class WarpCTCGradOp : public framework::OperatorWithKernel {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(WarpCTCGradOpNoNeedBufferVarInference,
"Logits");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(WarpCTCGradOpNoNeedBufferVarInference,
"Logits");
} // namespace operators
} // namespace paddle
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册