Runtime-match the value to the struct info. This operation does runtime check, populates the un-defined symbolic shape vars and vars in struct_info in the first occurrence, and insert equality assertions in other cases. Parameters ---------- var: Var The return vari
| 898 | |
| 899 | @tvm_ffi.register_object("relax.expr.MatchCast") |
| 900 | class MatchCast(Binding): |
| 901 | """Runtime-match the value to the struct info. |
| 902 | |
| 903 | This operation does runtime check, populates the un-defined symbolic shape vars |
| 904 | and vars in struct_info in the first occurrence, and insert equality assertions in |
| 905 | other cases. |
| 906 | |
| 907 | Parameters |
| 908 | ---------- |
| 909 | var: Var |
| 910 | The return variable that the match cast bind to. |
| 911 | |
| 912 | value: Expr |
| 913 | The input value expression. |
| 914 | |
| 915 | struct_info: tvm.relax.StructInfo |
| 916 | The struct info to match cast to. |
| 917 | """ |
| 918 | |
| 919 | struct_info: StructInfo |
| 920 | value: Expr |
| 921 | span: Span | None |
| 922 | |
| 923 | def __init__( |
| 924 | self, var: Var, value: Expr, struct_info: StructInfo, span: Span | None = None |
| 925 | ) -> None: |
| 926 | self.__init_handle_by_constructor__( |
| 927 | _ffi_api.MatchCast, |
| 928 | var, |
| 929 | value, |
| 930 | struct_info, |
| 931 | span, # type: ignore |
| 932 | ) |
| 933 | |
| 934 | |
| 935 | @tvm_ffi.register_object("relax.expr.VarBinding") |
no outgoing calls
searching dependent graphs…