GitOrigin-RevId: b02157dacb
release-1.5
@@ -13,6 +13,7 @@ | |||||
#include "megbrain/common.h" | #include "megbrain/common.h" | ||||
#include "megbrain/imperative/ops/utility.h" | #include "megbrain/imperative/ops/utility.h" | ||||
#include "megbrain/imperative/ops/backward_graph.h" | #include "megbrain/imperative/ops/backward_graph.h" | ||||
#include "megbrain/imperative/ops/autogen.h" | |||||
#include "megbrain/imperative/profiler.h" | #include "megbrain/imperative/profiler.h" | ||||
#include "megbrain/opr/io.h" | #include "megbrain/opr/io.h" | ||||
@@ -31,8 +31,6 @@ OP_TRAIT_REG(FastpathCopy,FastpathCopy) | |||||
.fallback(); | .fallback(); | ||||
}} // fastpathcopy | }} // fastpathcopy | ||||
MGB_DYN_TYPE_OBJ_FINAL_IMPL(FastpathCopy); | |||||
namespace { namespace identity { | namespace { namespace identity { | ||||
auto apply_on_var_node( | auto apply_on_var_node( | ||||
const OpDef& def, | const OpDef& def, | ||||
@@ -35,18 +35,4 @@ struct GenericPyOp final : OpDefImplBase<GenericPyOp> { | |||||
MGB_DYN_TYPE_OBJ_FINAL_DECL; | MGB_DYN_TYPE_OBJ_FINAL_DECL; | ||||
}; | }; | ||||
struct FastpathCopy final : OpDefImplBase<FastpathCopy> { | |||||
FastpathCopy() = default; | |||||
size_t hash() const override { | |||||
return mgb::hash(this->dyn_typeinfo()); | |||||
} | |||||
bool is_same_st(const Hashable& rhs) const override { | |||||
return this->dyn_typeinfo() == rhs.dyn_typeinfo(); | |||||
} | |||||
MGB_DYN_TYPE_OBJ_FINAL_DECL; | |||||
}; | |||||
} // namespace mgb::imperative | } // namespace mgb::imperative |
@@ -375,4 +375,6 @@ def CvtColor: MgbHashableOp<"CvtColor", [CvtColorParam]>; | |||||
def CheckHasInf: MgbHashableOp<"CheckHasInf", [EmptyParam]>; | def CheckHasInf: MgbHashableOp<"CheckHasInf", [EmptyParam]>; | ||||
def FastpathCopy: MgbHashableOp<"FastpathCopy">; | |||||
#endif // MGB_OPS | #endif // MGB_OPS |