MCPcopy
hub / github.com/apache/tvm / get_patterns_with_prefix

Function get_patterns_with_prefix

python/tvm/relax/backend/pattern_registry.py:88–102  ·  view source on GitHub ↗

Get a list of patterns whose names startwith `prefix`. Parameters ---------- prefix: str The prefix of pattern name. Returns ------- patterns: FusionPattern Matched patterns, ordered by priority from high to low.

(prefix: str)

Source from the content-addressed store, hash-verified

86
87
88def get_patterns_with_prefix(prefix: str) -> list[FusionPattern]:
89 """
90 Get a list of patterns whose names startwith `prefix`.
91
92 Parameters
93 ----------
94 prefix: str
95 The prefix of pattern name.
96
97 Returns
98 -------
99 patterns: FusionPattern
100 Matched patterns, ordered by priority from high to low.
101 """
102 return _ffi_api.GetPatternsWithPrefix(prefix)
103
104
105def get_pattern(name: str) -> FusionPattern | None:

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…