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

Function record_scope

imperative/python/src/backtrace.cpp:214–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214void record_scope(PyFrameObject* frame, std::string scope) {
215 if (enable_py_bt) {
216 frame->f_trace = TraceKeyWrapper::make(-1, frame->f_trace, std::move(scope));
217 }
218}
219
220std::string get_py_backtrace() {
221 auto frame = PyEval_GetFrame();

Callers 2

push_scopeMethod · 0.85
init_tensorFunction · 0.85

Calls 1

makeFunction · 0.50

Tested by

no test coverage detected