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

Method visit_match_cast_

python/tvm/relax/testing/ast_printer.py:339–348  ·  view source on GitHub ↗

Handle match shape

(self, match_cast: relax.MatchCast)

Source from the content-addressed store, hash-verified

337 raise ValueError(f"Invalid binding type in {binding}: {type(binding)}")
338
339 def visit_match_cast_(self, match_cast: relax.MatchCast) -> str:
340 """
341 Handle match shape
342 """
343 fields = {
344 "var": self.visit_expr(match_cast.var),
345 "value": self.visit_expr(match_cast.value),
346 "struct_info": self.visit_struct_info_(match_cast.struct_info),
347 }
348 return self.build_ast_node("MatchCast", **fields)
349
350 def visit_var_binding_(self, var_binding: relax.VarBinding) -> str:
351 """

Callers 1

visit_binding_Method · 0.95

Calls 3

visit_exprMethod · 0.95
visit_struct_info_Method · 0.95
build_ast_nodeMethod · 0.95

Tested by

no test coverage detected