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

Function sendjson

python/tvm/rpc/base.py:88–101  ·  view source on GitHub ↗

send a python value to remote via json Parameters ---------- sock : Socket The socket data : object Python value to be sent.

(sock, data)

Source from the content-addressed store, hash-verified

86
87
88def sendjson(sock, data):
89 """send a python value to remote via json
90
91 Parameters
92 ----------
93 sock : Socket
94 The socket
95
96 data : object
97 Python value to be sent.
98 """
99 data = json.dumps(data)
100 sock.sendall(struct.pack("<i", len(data)))
101 sock.sendall(data.encode("utf-8"))
102
103
104def recvjson(sock):

Callers

nothing calls this directly

Calls 2

packMethod · 0.80
encodeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…