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

Method load_vm_module

python/tvm/runtime/disco/session.py:302–323  ·  view source on GitHub ↗

Load a VM module from a file. Parameters ---------- path : str The path to the VM module file. device : Optional[Device] = None The device to load the VM module to. Default to the default device of each worker. Returns ------

(
        self,
        path: str,
        device: Device | None = None,
    )

Source from the content-addressed store, hash-verified

300 return remote_array
301
302 def load_vm_module(
303 self,
304 path: str,
305 device: Device | None = None,
306 ) -> DModule:
307 """Load a VM module from a file.
308
309 Parameters
310 ----------
311 path : str
312 The path to the VM module file.
313
314 device : Optional[Device] = None
315 The device to load the VM module to. Default to the default device of each worker.
316
317 Returns
318 -------
319 module : DModule
320 The loaded VM module.
321 """
322 func = self._get_cached_method("runtime.disco.load_vm_module")
323 return DModule(func(path, device), self)
324
325 def init_ccl(self, ccl: str, *device_ids):
326 """Initialize the underlying communication collective library.

Callers 9

test_callbackFunction · 0.80
_compileFunction · 0.80
_kernel_compileFunction · 0.80
test_vm_moduleFunction · 0.80
test_vm_multi_funcFunction · 0.80
test_mlpFunction · 0.80
test_attentionFunction · 0.80
test_load_shard_in_relaxFunction · 0.80
run_prim_funcFunction · 0.80

Calls 3

_get_cached_methodMethod · 0.95
DModuleClass · 0.85
funcFunction · 0.50

Tested by 9

test_callbackFunction · 0.64
_compileFunction · 0.64
_kernel_compileFunction · 0.64
test_vm_moduleFunction · 0.64
test_vm_multi_funcFunction · 0.64
test_mlpFunction · 0.64
test_attentionFunction · 0.64
test_load_shard_in_relaxFunction · 0.64
run_prim_funcFunction · 0.64