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

Function record_py_backtrace

imperative/python/src/backtrace.cpp:202–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202void record_py_backtrace() {
203 auto& context = Transformation::get_context();
204 FrameInfoPtr info;
205 if (enable_py_bt) {
206 auto frame = PyEval_GetFrame();
207 info = get_frameinfo_from_pyframe(frame);
208 }
209 context.bt = std::make_shared<BackTraceInfo>(std::move(info));
210 context.record_bt_trans_id = context.next_transformation;
211 context.record_trans_bt = enable_trans_bt;
212}
213
214void record_scope(PyFrameObject* frame, std::string scope) {
215 if (enable_py_bt) {

Callers 1

py_applyFunction · 0.85

Calls 1

Tested by

no test coverage detected