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

Method add

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

Add a new variable into variable table frame. Parameters ---------- var : str The name of new variable.

(self, var: str)

Source from the content-addressed store, hash-verified

186 self.vars = set()
187
188 def add(self, var: str):
189 """Add a new variable into variable table frame.
190
191 Parameters
192 ----------
193 var : str
194 The name of new variable.
195 """
196 if var in self.vars:
197 raise ValueError(f"Variable {var} already defined in current scope")
198 self.vars.add(var)
199
200 def pop_all(self, fn_pop: Callable[[str], None]):
201 """Pop out all variable in variable table frame.

Callers

nothing calls this directly

Calls 1

addMethod · 0.45

Tested by

no test coverage detected