Syntatic sugar for creating a DataTypePattern Parameters ---------- dtype: str The dtype to match pattern: tvm.relax.dpl.DFPattern The pattern that needs type annotation Returns ------- result: tvm.relax.dpl.DataTypePattern The resulting Da
(dtype: str, pattern: DFPattern = None)
| 810 | |
| 811 | |
| 812 | def has_dtype(dtype: str, pattern: DFPattern = None) -> DataTypePattern: |
| 813 | """ |
| 814 | Syntatic sugar for creating a DataTypePattern |
| 815 | |
| 816 | Parameters |
| 817 | ---------- |
| 818 | dtype: str |
| 819 | The dtype to match |
| 820 | |
| 821 | pattern: tvm.relax.dpl.DFPattern |
| 822 | The pattern that needs type annotation |
| 823 | |
| 824 | Returns |
| 825 | ------- |
| 826 | result: tvm.relax.dpl.DataTypePattern |
| 827 | The resulting DataTypePattern |
| 828 | """ |
| 829 | if pattern is None: |
| 830 | pattern = wildcard() |
| 831 | return DataTypePattern(pattern, dtype) |
| 832 | |
| 833 | |
| 834 | def is_shape(shape: list[tvm.ir.PrimExpr]) -> "PrimArrPattern": |
searching dependent graphs…