MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / trait

Method trait

imperative/src/impl/op_def.cpp:121–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121const OpTrait* OpDef::trait() const {
122 if (!m_trait) {
123 m_trait = OpTrait::find_by_typeinfo(dyn_typeinfo());
124 mgb_throw_if(
125 !m_trait, MegBrainError, "can not find op_trait by %s",
126 dyn_typeinfo()->name);
127 }
128 return m_trait;
129}
130
131const std::string OpDef::scope() const {
132 return m_scope;

Callers 15

implMethod · 0.45
apply_on_var_nodeFunction · 0.45
apply_on_physical_tensorFunction · 0.45
decide_dispatch_modeMethod · 0.45
apply_on_var_nodeMethod · 0.45
make_backward_graphMethod · 0.45
propsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected