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

Function is_var

python/tvm/relax/dpl/pattern.py:680–694  ·  view source on GitHub ↗

Syntatic sugar for creating an optionally named VarPattern. Parameters ---------- name: str The name of the input pattern to match. Returns ------- result: tvm.relax.dpl.VarPattern The resulting pattern.

(name: str = "")

Source from the content-addressed store, hash-verified

678
679
680def is_var(name: str = "") -> VarPattern:
681 """
682 Syntatic sugar for creating an optionally named VarPattern.
683
684 Parameters
685 ----------
686 name: str
687 The name of the input pattern to match.
688
689 Returns
690 -------
691 result: tvm.relax.dpl.VarPattern
692 The resulting pattern.
693 """
694 return VarPattern(name)
695
696
697def is_gv(name: str = "") -> GlobalVarPattern:

Callers 7

test_var_patternFunction · 0.85
test_op_attrFunction · 0.85
test_match_call_attrFunction · 0.85
test_simple_call_packedFunction · 0.85
test_simple_used_byFunction · 0.85
test_two_cbrFunction · 0.85
test_self_attentionFunction · 0.85

Calls 1

VarPatternClass · 0.85

Tested by 7

test_var_patternFunction · 0.68
test_op_attrFunction · 0.68
test_match_call_attrFunction · 0.68
test_simple_call_packedFunction · 0.68
test_simple_used_byFunction · 0.68
test_two_cbrFunction · 0.68
test_self_attentionFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…