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

Method set_class_context

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

Set the current class context for parsing. Parameters ---------- class_name : str The name of the current class being parsed. is_base_py_module : bool Whether the current class inherits from BasePyModule.

(self, class_name: str, is_base_py_module: bool = False)

Source from the content-addressed store, hash-verified

444 return _deferred(pop_token)
445
446 def set_class_context(self, class_name: str, is_base_py_module: bool = False):
447 """Set the current class context for parsing.
448
449 Parameters
450 ----------
451 class_name : str
452 The name of the current class being parsed.
453 is_base_py_module : bool
454 Whether the current class inherits from BasePyModule.
455 """
456 self.current_class = class_name
457 self.base_py_module_context = is_base_py_module
458
459 def _get_current_class_context(self) -> str | None:
460 """Get the current class context.

Callers 1

_visit_class_defFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected