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

Function test_body

tests/python/contrib/test_random.py:172–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

170 no_exception_happened = True
171
172 def test_body():
173 try:
174 num_thread_used = 1
175 configure_threads = tvm.get_global_func("runtime.config_threadpool")
176 configure_threads(1, num_thread_used)
177
178 test_input = tvm.runtime.empty((10, 10))
179 random_fill = tvm.get_global_func("tvm.contrib.random.random_fill_for_measure")
180 random_fill(test_input)
181 except: # pylint: disable=bare-except
182 nonlocal no_exception_happened
183 no_exception_happened = False
184
185 # ThreadPool object is thread local. To eliminate effect on other test cases put it into thread
186 x = threading.Thread(target=test_body)

Callers

nothing calls this directly

Calls 2

get_global_funcMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…