MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / test_repeat_in_trace

Function test_repeat_in_trace

imperative/python/test/unit/jit/test_tracing.py:170–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168
169
170def test_repeat_in_trace():
171 @trace(symbolic=False)
172 def fun(data, repeats):
173 F.repeat(data, repeats)
174
175 data = tensor(np.random.random([1, 2, 3]).astype(np.float32))
176
177 for i in range(1, 5):
178 repeats = tensor(i)
179 fun(data, repeats)
180
181
182def test_print_in_trace():

Callers

nothing calls this directly

Calls 2

funFunction · 0.70
astypeMethod · 0.45

Tested by

no test coverage detected