MCPcopy Index your code
hub / github.com/apache/tvm / ModuleWithGlobalVars

Class ModuleWithGlobalVars

python/tvm/script/parser/ir/parser.py:26–32  ·  view source on GitHub ↗

A Module that can add global vars during parsing, to support `Module.function` syntax.

Source from the content-addressed store, hash-verified

24
25
26class ModuleWithGlobalVars:
27 """A Module that can add global vars during parsing, to support `Module.function` syntax."""
28
29 def __getattr__(self, attr):
30 # Customize the error message.
31 # NOTE: `__getattr__` is only called when the attribute access fails with an AttributeError
32 raise AttributeError(f"Cannot find the function `{attr}` in the current IRModule")
33
34
35@dispatch.register(token="ir", type_name="ClassDef")

Callers 1

_visit_class_defFunction · 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…