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

Function test_trace_default_action

tests/python/runtime/test_runtime_trace.py:24–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22
23
24def test_trace_default_action():
25 n = 2
26 x = te.placeholder((n, n, n), name="X", dtype="float32")
27 y = te.compute(x.shape, lambda i, j, k: tvm.tirx.trace([i, j, k, x[i][j][k]]))
28 f = tvm.compile(te.create_prim_func([x, y]), target="llvm")
29 xnd = tvm.runtime.tensor(np.ones((n, n, n), dtype=x.dtype))
30 ynd = tvm.runtime.tensor(np.zeros((n, n, n), dtype=y.dtype))
31 f(xnd, ynd)
32
33
34def test_trace_expr_assign():

Callers

nothing calls this directly

Calls 6

placeholderMethod · 0.80
traceMethod · 0.80
onesMethod · 0.80
fFunction · 0.50
compileMethod · 0.45
zerosMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…