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

Function make_vm

tests/python/relax/test_vm_build.py:1118–1126  ·  view source on GitHub ↗

Returns a local VM for the given mod and the device

(mod, exec_mode, temp)

Source from the content-addressed store, hash-verified

1116
1117
1118def make_vm(mod, exec_mode, temp) -> tuple[relax.VirtualMachine, tvm.runtime.Device]:
1119 """Returns a local VM for the given mod and the device"""
1120 target = tvm.target.Target("llvm", host="llvm")
1121 exec = relax.build(mod, target, exec_mode=exec_mode)
1122 libname = temp.relpath("exec.so")
1123 exec.export_library(libname)
1124 exec_loaded = tvm.runtime.load_module(libname)
1125 device = tvm.cpu()
1126 return relax.VirtualMachine(exec_loaded, device), device
1127
1128
1129def run_on_rpc(

Callers 7

test_set_inputFunction · 0.85
test_set_input_tupleFunction · 0.85

Calls 5

relpathMethod · 0.80
buildMethod · 0.45
export_libraryMethod · 0.45
load_moduleMethod · 0.45
cpuMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…