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

Function test_make_shape

tests/python/relax/test_runtime_builtin.py:30–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28
29
30def test_make_shape():
31 MK = MakeShapeCode
32 make_shape = tvm.get_global_func("vm.builtin.make_shape")
33 heap = tvm.runtime.tensor(np.arange(10).astype("int64"))
34 s = make_shape(heap, 3, MK.USE_IMM, 10, MK.LOAD_SHAPE, 0, MK.LOAD_SHAPE, 2)
35
36 assert s == tvm_ffi.Shape([10, 0, 2])
37
38
39def test_match_shape():

Callers

nothing calls this directly

Calls 5

make_shapeFunction · 0.85
get_global_funcMethod · 0.80
ShapeMethod · 0.80
astypeMethod · 0.45
arangeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…