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

Method _get_current_class_context

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

Get the current class context. Returns ------- Optional[str] The name of the current class, or None if not in a class context.

(self)

Source from the content-addressed store, hash-verified

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.
461
462 Returns
463 -------
464 Optional[str]
465 The name of the current class, or None if not in a class context.
466 """
467 return self.current_class
468
469 def _is_base_py_module_context(self) -> bool:
470 """Check if the current class context allows Python functions.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected