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

Method constructor

web/src/runtime.ts:788–799  ·  view source on GitHub ↗

* Constructor * @param mod The underlying module, need to be detached. * @param device The main device ro run VM on.

(mod: Module, device: DLDevice)

Source from the content-addressed store, hash-verified

786 * @param device The main device ro run VM on.
787 */
788 constructor(mod: Module, device: DLDevice) {
789 this.mod = mod;
790 this.mod.getFunction("vm_initialization")(
791 new Scalar(device.deviceType, "int"),
792 new Scalar(device.deviceId, "int"),
793 new Scalar(VMAllocatorKind.POOLED_ALLOCATOR, "int"),
794 // explicitly specify host device type
795 new Scalar(DeviceStrToEnum.cpu, "int"),
796 new Scalar(0, "int"),
797 new Scalar(VMAllocatorKind.POOLED_ALLOCATOR, "int"),
798 );
799 }
800
801 dispose(): void {
802 this.mod.dispose();

Callers

nothing calls this directly

Calls 1

getFunctionMethod · 0.45

Tested by

no test coverage detected