INNER CODE UNIT · Python

_receive

onnxsim/onnxsim · onnxsim/rpc/server.py:267

    def _receive(self):
        try:
            status, value = self._parent.recv()
        except EOFError:
            raise proto.RPCError("the tinygrad worker process died") from None
        if status != "ok":
            self.close()
            raise proto.RPCError(value)
        return value

    def _call(self, *request):
        with self._lock:
            self._parent.send(request)
            return self._receive()

    def run(self, inputs):
        return self._call("run", inputs)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…