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

Function setup_test

tests/python/relax/test_transform_codegen_pass.py:108–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106
107
108def setup_test():
109 # Prepare IRModule and its input
110 mod = InputModule
111 assert isinstance(mod, tvm.IRModule)
112
113 np0 = np.random.rand(16, 16).astype(np.float32)
114 np1 = np.random.rand(16, 16).astype(np.float32)
115 data0 = tvm.runtime.tensor(np0, dev)
116 data1 = tvm.runtime.tensor(np1, dev)
117 inputs = [data0, data1]
118
119 # Ground truth should be generated before annotation
120 # due to the conflict with MS task extraction
121 # TODO(@sunggg): Sort this out
122 expected = gen_ground_truth(mod, target, dev, inputs)
123 return mod, inputs, expected
124
125
126entry_func_name = tvm.testing.parameter("main", "func")

Callers 2

test_tensorrt_onlyFunction · 0.85

Calls 2

gen_ground_truthFunction · 0.85
astypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…