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

Function _is_tvmscript_class_annotator

python/tvm/script/parser/core/utils.py:188–195  ·  view source on GitHub ↗

Checks if the line contains a TVMScript annotator for a class These match either `@I.ir_module` or `@R.rewriter`, or their imported names `@ir_module` or `@rewriter`.

(line: str)

Source from the content-addressed store, hash-verified

186 """
187
188 def _is_tvmscript_class_annotator(line: str) -> bool:
189 """Checks if the line contains a TVMScript annotator for a class
190
191 These match either `@I.ir_module` or `@R.rewriter`, or their
192 imported names `@ir_module` or `@rewriter`.
193 """
194
195 return line.startswith("@") and ("ir_module" in line or "rewriter" in line)
196
197 if len(frames) > 2:
198 frame_info = frames[2]

Callers 1

is_defined_in_classFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…