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

Method get

python/tvm/script/parser/core/parser.py:276–284  ·  view source on GitHub ↗

Get a variable dictionary of latest variables. Returns ------- res : Any The variable dictionary copy of latest variables.

(self)

Source from the content-addressed store, hash-verified

274 self.name2value[var].append(value)
275
276 def get(self) -> dict[str, Any]:
277 """Get a variable dictionary of latest variables.
278
279 Returns
280 -------
281 res : Any
282 The variable dictionary copy of latest variables.
283 """
284 return {key: values[-1] for key, values in self.name2value.items() if values}
285
286 def get_at_depth(self, depth: int) -> dict[str, Any]:
287 """Get variables visible at the given frame depth, using current values.

Callers 12

_get_builtin_or_noneFunction · 0.45
_find_parser_defMethod · 0.45
_dispatchFunction · 0.45
with_dispatch_tokenMethod · 0.45
pop_tokenMethod · 0.45
eval_exprMethod · 0.45
visit_FunctionDefMethod · 0.45
visit_ClassDefMethod · 0.45
parseFunction · 0.45
getFunction · 0.45
get_opFunction · 0.45

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected