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

Function check_roundtrip

tests/python/relax/test_transform_codegen_pass.py:67–75  ·  view source on GitHub ↗
(exec0, dev, inputs, expected, entry_func_name="main")

Source from the content-addressed store, hash-verified

65
66
67def check_roundtrip(exec0, dev, inputs, expected, entry_func_name="main"):
68 with utils.tempdir() as temp:
69 exec0.mod.export_library(temp.relpath("exec.so"))
70 exec1 = tvm.runtime.load_module(temp.relpath("exec.so"))
71 assert exec0.stats() == exec1["stats"]()
72 assert exec0.as_text() == exec1["as_text"]()
73
74 check_executable(exec0, dev, inputs, expected, entry_func_name)
75 check_executable(exec1, dev, inputs, expected, entry_func_name)
76
77
78def gen_ground_truth(mod, target, dev, inputs):

Callers 2

test_tensorrt_onlyFunction · 0.85

Calls 6

check_executableFunction · 0.85
relpathMethod · 0.80
statsMethod · 0.80
as_textMethod · 0.80
export_libraryMethod · 0.45
load_moduleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…