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

Function _assert_print

tests/python/relax/test_tvmscript_printer_relax.py:29–35  ·  view source on GitHub ↗
(obj, expected)

Source from the content-addressed store, hash-verified

27
28
29def _assert_print(obj, expected):
30 if not isinstance(obj, str):
31 obj = obj.script(verbose_expr=True)
32 obj = obj.strip()
33 # compare line by line in case there is trailing whitespace in the _middle_
34 for obj_line, expected_line in zip(obj.splitlines(), expected.strip().splitlines()):
35 assert obj_line.strip() == expected_line.strip(), "\n" + obj
36
37
38def test_function():

Callers 15

test_functionFunction · 0.70
test_extern_funcFunction · 0.70
test_nested_functionFunction · 0.70
test_object_struct_infoFunction · 0.70
test_prim_struct_infoFunction · 0.70
test_shape_struct_info_0Function · 0.70
test_shape_struct_info_1Function · 0.70
test_shape_struct_info_2Function · 0.70
test_tensor_struct_infoFunction · 0.70

Calls 1

scriptMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…