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

Method enter

imperative/python/src/grad.cpp:114–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void GradKeyWrapper::enter() {
115 m_transformation = std::make_shared<GradTransformation>();
116 m_key = m_transformation->key();
117 m_key->name(m_name);
118 grad_key_map[m_key] = this;
119 m_transformation_guard =
120 TransformationManager::get_instance()
121 .register_at<TransformationManager::Grad>(m_transformation);
122}
123
124void GradKeyWrapper::exit() {
125 m_transformation_guard.reset();

Callers 5

__enter__Method · 0.45
trace_normalMethod · 0.45
trace_without_hostMethod · 0.45
enter_traceFunction · 0.45

Calls 2

keyMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected