MCPcopy Create free account
hub / github.com/apache/tvm / _pair_up

Method _pair_up

python/tvm/rpc/proxy.py:319–330  ·  view source on GitHub ↗
(self, lhs, rhs)

Source from the content-addressed store, hash-verified

317 break
318
319 def _pair_up(self, lhs, rhs):
320 lhs.forward_proxy = rhs
321 rhs.forward_proxy = lhs
322
323 lhs.send_data(struct.pack("<i", base.RPC_CODE_SUCCESS))
324 lhs.send_data(struct.pack("<i", len(rhs.rpc_key)))
325 lhs.send_data(rhs.rpc_key.encode("utf-8"))
326
327 rhs.send_data(struct.pack("<i", base.RPC_CODE_SUCCESS))
328 rhs.send_data(struct.pack("<i", len(lhs.rpc_key)))
329 rhs.send_data(lhs.rpc_key.encode("utf-8"))
330 logging.info("Pairup connect %s and %s", lhs.name(), rhs.name())
331
332 def _regenerate_server_keys(self, keys):
333 """Regenerate keys for server pool"""

Callers 2

Calls 5

packMethod · 0.80
encodeMethod · 0.80
infoMethod · 0.80
send_dataMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected