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

Method createVirtualMachine

web/src/runtime.ts:1178–1185  ·  view source on GitHub ↗

* Setup a virtual machine module with given device. * * @param dev DLDevice the device. * @returns The created virtual machime.

(dev: DLDevice)

Source from the content-addressed store, hash-verified

1176 * @returns The created virtual machime.
1177 */
1178 createVirtualMachine(dev: DLDevice): VirtualMachine {
1179 const mod = this.ctx.detachFromCurrentScope(
1180 this.systemLib().getFunction("vm_load_executable")()
1181 );
1182 return this.ctx.attachToCurrentScope(
1183 new VirtualMachine(mod, dev)
1184 );
1185 }
1186
1187 //-----------------------------------------------
1188 // Native Tensor Cache Support

Callers 1

test_vm.jsFile · 0.80

Calls 4

systemLibMethod · 0.95
getFunctionMethod · 0.45
attachToCurrentScopeMethod · 0.45

Tested by

no test coverage detected