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

Method device

python/tvm/rpc/client.py:77–95  ·  view source on GitHub ↗

Construct a remote device. Parameters ---------- dev_type: int or str dev_id: int, optional Returns ------- dev: Device The corresponding encoded remote device.

(self, dev_type, dev_id=0)

Source from the content-addressed store, hash-verified

75 return self._sess.get_function(name)
76
77 def device(self, dev_type, dev_id=0):
78 """Construct a remote device.
79
80 Parameters
81 ----------
82 dev_type: int or str
83
84 dev_id: int, optional
85
86 Returns
87 -------
88 dev: Device
89 The corresponding encoded remote device.
90 """
91 dev = tvm.runtime.device(dev_type, dev_id)
92 encode = (self._tbl_index + 1) * base.RPC_SESS_MASK
93 dev = tvm.runtime.device(dev.dlpack_device_type() + encode, dev.index)
94 dev._rpc_sess = self
95 return dev
96
97 def upload(self, data, target=None):
98 """Upload file to remote runtime temp folder

Callers 15

cpuMethod · 0.95
cudaMethod · 0.95
clMethod · 0.95
vulkanMethod · 0.95
metalMethod · 0.95
rocmMethod · 0.95
ext_devMethod · 0.95
hexagonMethod · 0.95
webgpuMethod · 0.95
_worker_funcFunction · 0.45
_worker_funcFunction · 0.45
run_module_via_rpcFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected