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

Function test_var

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

Source from the content-addressed store, hash-verified

75
76
77def test_var() -> None:
78 v0 = rx.Var("v0")
79 v0_str = dump_ast(v0)
80 assert v0_str == 'Var(name_hint="v0")'
81
82 v1 = rx.Var("v1", R.Tensor([54, 96], "float32"))
83 v1_no_annos = dump_ast(v1, include_struct_info_annotations=False)
84 assert v1_no_annos == 'Var(name_hint="v1")'
85 v1_annos = dump_ast(v1)
86 assert v1_annos != v1_no_annos
87 assert "PrimExpr" in v1_annos
88 assert "struct_info" in v1_annos
89
90
91def test_dataflow_var() -> 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…