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

Function check

web/tests/python/relax_rpc_test.py:75–86  ·  view source on GitHub ↗
(remote)

Source from the content-addressed store, hash-verified

73 )
74
75 def check(remote):
76 dev = remote.webgpu(0)
77 # invoke the function
78 vm = relax.VirtualMachine(remote.system_lib(), device=dev)
79 adata = np.random.uniform(size=n).astype(dtype)
80 bdata = np.random.uniform(size=n).astype(dtype)
81 a = tvm.runtime.tensor(adata, dev)
82 b = tvm.runtime.tensor(bdata, dev)
83 vm.set_input("main", a, b)
84 vm.invoke_stateful("main")
85 c = vm.get_outputs("main")
86 np.testing.assert_equal(c.numpy(), a.numpy() + b.numpy())
87
88 check(remote)
89

Callers 2

test_rpcFunction · 0.70
github_tvmbot.pyFile · 0.50

Calls 8

set_inputMethod · 0.95
invoke_statefulMethod · 0.95
get_outputsMethod · 0.95
system_libMethod · 0.80
uniformMethod · 0.80
numpyMethod · 0.80
webgpuMethod · 0.45
astypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…