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

Method begin_scope

python/tvm/relax/block_builder.py:786–802  ·  view source on GitHub ↗

Begin a new scope, with optional parameters that are visible within the scope. Parameters ---------- params: Optional[List[Var]] Parameters that are visible within the scope. Note ---- This function should be called when new scope

(self, params: list[Var] | None = None)

Source from the content-addressed store, hash-verified

784 return _ffi_api.BlockBuilderLookupBinding(self, var) # type: ignore
785
786 def begin_scope(self, params: list[Var] | None = None) -> None:
787 """Begin a new scope, with optional parameters that
788 are visible within the scope.
789
790 Parameters
791 ----------
792 params: Optional[List[Var]]
793 Parameters that are visible within the scope.
794
795 Note
796 ----
797 This function should be called when new scope is introduced
798 (function, seq) to properly track the variable availability
799 and help the best effort deduction.
800 """
801
802 return _ffi_api.BlockBuilderBeginScope(self, params) # type: ignore
803
804 def end_scope(self) -> None:
805 """End the current scope. Please see `begin_scope` for details"""

Callers 4

_enter_function_scopeMethod · 0.95
emit_func_outputMethod · 0.95
__enter__Method · 0.80

Calls

no outgoing calls

Tested by 1