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

polish code by adding final, test=develop, test=develop (#24114)

上级 ab2e2842
......@@ -192,7 +192,7 @@ class SingleGradOpMaker<OpDesc> : public GradOpDescMakerBase {
public:
using GradOpDescMakerBase::GradOpDescMakerBase;
std::vector<std::unique_ptr<OpDesc>> operator()() const {
std::vector<std::unique_ptr<OpDesc>> operator()() const final {
std::vector<std::unique_ptr<OpDesc>> retv;
retv.emplace_back(new OpDesc());
this->Apply(retv.front().get());
......@@ -209,7 +209,7 @@ class SingleGradOpMaker<imperative::OpBase>
public:
using GradOpBaseMakerBase::GradOpBaseMakerBase;
std::shared_ptr<imperative::GradOpNode> operator()() const {
std::shared_ptr<imperative::GradOpNode> operator()() const final {
auto node = this->NewGradNode();
{
imperative::TracedGradOp traced_grad_op(node);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册