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

Function get_model

web/tests/python/relax_rpc_test.py:31–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29
30
31def get_model():
32 pipeline = relax.get_pipeline()
33
34 @tvm.script.ir_module
35 class Mod:
36 @R.function
37 def main(x: R.Tensor([1024], "float32"), y: R.Tensor([1024], "float32")):
38 lv0 = R.add(x, y)
39 return lv0
40
41 mod = pipeline(Mod)
42 sch = tvm.s_tir.Schedule(mod)
43 # manually transform loop
44 sch.work_on("add")
45 (i,) = sch.get_loops(block=sch.get_sblock("T_add"))
46 i0, i1 = sch.split(i, [None, 128])
47 sch.bind(i0, "blockIdx.x")
48 sch.bind(i1, "threadIdx.x")
49 return sch.mod
50
51
52def test_rpc():

Callers 1

test_rpcFunction · 0.85

Calls 5

work_onMethod · 0.95
get_loopsMethod · 0.95
get_sblockMethod · 0.95
splitMethod · 0.95
bindMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…