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

Method _is_base_py_module_context

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

Check if the current class context allows Python functions. Returns ------- bool True if Python functions are allowed in the current context.

(self)

Source from the content-addressed store, hash-verified

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.
471
472 Returns
473 -------
474 bool
475 True if Python functions are allowed in the current context.
476 """
477 return self.base_py_module_context
478
479 def with_diag_source(self, source: Source):
480 """Add a new source as with statement.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected