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

revert-22778-infer_var_type
Zeng Jinle 5 years ago committed by GitHub
parent ab2e284235
commit a67eea9f00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);

Loading…
Cancel
Save