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

Method has_dtype

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

Add a type constraint to this pattern Parameters ---------- dtype: str The dtype to match Returns ------- result: DataTypePattern The resulting DataTypePattern

(self, dtype: str)

Source from the content-addressed store, hash-verified

127 return StructInfoPattern(self, struct_info)
128
129 def has_dtype(self, dtype: str) -> "DataTypePattern":
130 """
131 Add a type constraint to this pattern
132
133 Parameters
134 ----------
135 dtype: str
136 The dtype to match
137
138 Returns
139 -------
140 result: DataTypePattern
141 The resulting DataTypePattern
142 """
143 return has_dtype(dtype, self)
144
145 def has_shape(self, shape: list[PrimExpr]) -> "ShapePattern":
146 """

Callers 1

astype_patternFunction · 0.80

Calls 1

has_dtypeFunction · 0.85

Tested by

no test coverage detected