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

Method get_global_var

python/tvm/ir/module.py:169–186  ·  view source on GitHub ↗

Get a global variable in the function by name. Parameters ---------- name: str The name of the global variable. Returns ------- global_var: GlobalVar The global variable mapped to :code:`name`. Raises ------

(self, name)

Source from the content-addressed store, hash-verified

167 return _ffi_api.Module_UpdateGlobalInfo(self, name, global_info)
168
169 def get_global_var(self, name):
170 """Get a global variable in the function by name.
171
172 Parameters
173 ----------
174 name: str
175 The name of the global variable.
176
177 Returns
178 -------
179 global_var: GlobalVar
180 The global variable mapped to :code:`name`.
181
182 Raises
183 ------
184 RuntimeError if we cannot find corresponding global var.
185 """
186 return _ffi_api.Module_GetGlobalVar(self, name)
187
188 def get_global_vars(self):
189 """Collect all global vars defined in this module.

Callers 14

beforeFunction · 0.80
test_inline_simpleFunction · 0.80
test_global_var_sinfoFunction · 0.80
expectedFunction · 0.80
fooMethod · 0.80
fooMethod · 0.80
fooMethod · 0.80
test_evaluateFunction · 0.80

Calls

no outgoing calls

Tested by 13

beforeFunction · 0.64
test_inline_simpleFunction · 0.64
test_global_var_sinfoFunction · 0.64
expectedFunction · 0.64
fooMethod · 0.64
fooMethod · 0.64
fooMethod · 0.64
test_evaluateFunction · 0.64