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

Function test_dataflow_var

tests/python/relax/test_ast_printer.py:91–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89
90
91def test_dataflow_var() -> None:
92 v0 = rx.DataflowVar("v0")
93 v0_str = dump_ast(v0)
94 assert v0_str == 'DataflowVar(name_hint="v0")'
95
96 v1 = rx.DataflowVar("v1", R.Tensor([54, 96], "float16"))
97 v1_no_annos = dump_ast(v1, include_struct_info_annotations=False)
98 assert v1_no_annos == 'DataflowVar(name_hint="v1")'
99 v1_annos = dump_ast(v1)
100 assert v1_annos != v1_no_annos
101 assert "PrimExpr" in v1_annos
102 assert "struct_info" in v1_annos
103
104
105def test_match_cast() -> None:

Callers

nothing calls this directly

Calls 2

dump_astFunction · 0.90
TensorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…