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

rename no_need_buffer_vars_macro, test=develop (#23159)

上级 bae5930b
......@@ -96,6 +96,9 @@ 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()(
......
......@@ -48,7 +48,7 @@ TEST(test_no_need_buffer_vars_inference, test_dygraph) {
ASSERT_TRUE(boost::get<bool>(ctx.GetAttr("is_test")));
}
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(TestNoNeedBufferVarsInferer, "X1", "X2");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(TestNoNeedBufferVarsInferer, "X1", "X2");
TEST(test_no_need_buffer_vars_inference, test_nullptr_comparation) {
InferNoNeedBufferVarsFN infer_fn;
......
......@@ -118,7 +118,7 @@ class ArgsortGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(ArgsortGradNoNeedBufferVarInference, "X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(ArgsortGradNoNeedBufferVarInference, "X");
} // namespace operators
} // namespace paddle
......
......@@ -74,8 +74,8 @@ class BatchSizeLikeOpMaker : public framework::OpProtoAndCheckerMaker {
virtual void Apply() = 0;
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(BatchSizeLikeNoNeedBufferVarsInference,
"Input");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(BatchSizeLikeNoNeedBufferVarsInference,
"Input");
} // namespace operators
} // namespace paddle
......@@ -140,7 +140,7 @@ class CenterLossOpGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(CenterLossGradNoNeedBufVarsInferer, "X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(CenterLossGradNoNeedBufVarsInferer, "X");
} // namespace operators
} // namespace paddle
......
......@@ -176,8 +176,7 @@ class ConcatOpGrad : public framework::OperatorWithKernel {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(ConcatOpGradNoNeedBufferVarInference,
"X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(ConcatOpGradNoNeedBufferVarInference, "X");
template <typename T>
class ConcatGradOpMaker : public framework::SingleGradOpMaker<T> {
......
......@@ -199,7 +199,7 @@ class CropGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(GropNoNeedBufferVarInference, "Y");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(GropNoNeedBufferVarInference, "Y");
} // namespace operators
} // namespace paddle
......
......@@ -141,8 +141,8 @@ class CVMGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(CVMNoNeedBufferVarInference, "CVM");
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(CVMGradNoNeedBufferVarInference, "X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(CVMNoNeedBufferVarInference, "CVM");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(CVMGradNoNeedBufferVarInference, "X");
} // namespace operators
} // namespace paddle
......
......@@ -82,8 +82,8 @@ class ReduceMeanDoubleGradOpBaseMaker : public imperative::GradOpBaseMakerBase {
}
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(ReduceMeanGradNoNeedBufferVarInference,
"X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(ReduceMeanGradNoNeedBufferVarInference,
"X");
} // namespace operators
} // namespace paddle
......
......@@ -37,8 +37,7 @@ class ReduceSumOpGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(ReduceSumGradNoNeedBufferVarInference,
"X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(ReduceSumGradNoNeedBufferVarInference, "X");
} // namespace operators
} // namespace paddle
......
......@@ -110,8 +110,8 @@ class SeqConcatGradOp : public framework::OperatorWithKernel {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(SeqConcatGradNoNeedBufferVarsInference,
"X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(SeqConcatGradNoNeedBufferVarsInference,
"X");
} // namespace operators
} // namespace paddle
......
......@@ -175,9 +175,9 @@ class SequenceExpandAsOpGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(
SequenceExpandAsOpNoNeedBufferVarsInference, "Y");
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(
DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequenceExpandAsOpNoNeedBufferVarsInference,
"Y");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(
SequenceExpandAsGradOpNoNeedBufferVarsInference, "X", "Y");
} // namespace operators
......
......@@ -230,9 +230,9 @@ class SequenceExpandOpGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(SequenceExpandOpNoNeedBufferVarsInference,
"Y");
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(
DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequenceExpandOpNoNeedBufferVarsInference,
"Y");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(
SequenceExpandGradOpNoNeedBufferVarsInference, "X", "Y");
} // namespace operators
......
......@@ -220,8 +220,8 @@ class SequencePadGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(
SequencePadGradOpNoNeedBufferVarsInference, "X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequencePadGradOpNoNeedBufferVarsInference,
"X");
} // namespace operators
} // namespace paddle
......
......@@ -157,8 +157,8 @@ class SequencePoolGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(
SequencePoolGradOpNoNeedBufferVarsInference, "X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequencePoolGradOpNoNeedBufferVarsInference,
"X");
} // namespace operators
} // namespace paddle
......
......@@ -157,7 +157,7 @@ class SequenceScatterGradMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(
DECLARE_NO_NEED_BUFFER_VARS_INFERER(
SequenceScatterGradNoNeedBufferVarsInference, "Updates");
} // namespace operators
......
......@@ -133,8 +133,8 @@ class SequenceSliceGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(
SequenceSliceGradNoNeedBufferVarsInference, "X");
DECLARE_NO_NEED_BUFFER_VARS_INFERER(SequenceSliceGradNoNeedBufferVarsInference,
"X");
} // namespace operators
} // namespace paddle
......
......@@ -151,7 +151,7 @@ class SequenceSoftmaxGradOp : public framework::OperatorWithKernel {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(
DECLARE_NO_NEED_BUFFER_VARS_INFERER(
SequenceSoftmaxGradOpNoNeedBufferVarsInferer, "X");
} // namespace operators
......
......@@ -151,7 +151,7 @@ class SequenceUnpadGradOpMaker : public framework::SingleGradOpMaker<T> {
}
};
DECLARE_NO_NEED_BUFFER_VARS_INFERENCE(
DECLARE_NO_NEED_BUFFER_VARS_INFERER(
SequenceUnpadGradOpNoNeedBufferVarsInference, "X");
} // namespace operators
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册