MCPcopy Index your code
hub / github.com/apache/tvm / _check

Function _check

tests/python/relax/test_tvmscript_parser.py:33–44  ·  view source on GitHub ↗
(
    parsed: relax.Function | IRModule,
    expect: relax.Function | IRModule | None = None,
)

Source from the content-addressed store, hash-verified

31
32
33def _check(
34 parsed: relax.Function | IRModule,
35 expect: relax.Function | IRModule | None = None,
36):
37 test = parsed.script(show_meta=True)
38 roundtrip_mod = tvm.script.from_source(test)
39 tvm.ir.assert_structural_equal(parsed, roundtrip_mod)
40 if isinstance(parsed, IRModule) and isinstance(roundtrip_mod, IRModule):
41 relax.analysis.well_formed(parsed)
42 relax.analysis.well_formed(roundtrip_mod)
43 if expect:
44 tvm.ir.assert_structural_equal(parsed, expect)
45
46
47def test_simple_func():

Callers 15

test_simple_funcFunction · 0.70
test_simple_moduleFunction · 0.70
test_emit_teFunction · 0.70
test_global_info_vdeviceFunction · 0.70
test_relax_tensor_opFunction · 0.70
test_relax_base_opFunction · 0.70
test_symbolic_shapeFunction · 0.70
test_shadowingFunction · 0.70
test_match_castFunction · 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…