MCPcopy Create free account
hub / github.com/apache/tvm / getsourcelines

Function getsourcelines

python/tvm/script/parser/core/diagnostics.py:178–182  ·  view source on GitHub ↗

Extract the block of code at the top of the given list of lines.

(obj)

Source from the content-addressed store, hash-verified

176
177
178def getsourcelines(obj):
179 """Extract the block of code at the top of the given list of lines."""
180 obj = inspect.unwrap(obj)
181 lines, l_num = findsource(obj)
182 return inspect.getblock(lines[l_num:]), l_num + 1
183
184
185inspect.getfile = _patched_inspect_getfile

Callers 1

__init__Method · 0.85

Calls 1

findsourceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…