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

Method exist

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

Check if any value exists in variable table. Parameters ---------- value : Any The value of variable. Returns ------- res : bool The existence of the value.

(self, value: Any)

Source from the content-addressed store, hash-verified

311 return result
312
313 def exist(self, value: Any) -> bool:
314 """Check if any value exists in variable table.
315
316 Parameters
317 ----------
318 value : Any
319 The value of variable.
320
321 Returns
322 -------
323 res : bool
324 The existence of the value.
325 """
326 return any(
327 value.same_as(known_value)
328 for known_value_stack in self.name2value.values()
329 for known_value in known_value_stack
330 )
331
332
333def _dispatch_wrapper(func: dispatch.ParseMethod) -> dispatch.ParseMethod:

Callers

nothing calls this directly

Calls 3

anyFunction · 0.50
same_asMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected