MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / put_async

Method put_async

tensorrt_llm/executor/ipc.py:201–220  ·  view source on GitHub ↗
(self, obj: Any, routing_id: Optional[bytes] = None)

Source from the content-addressed store, hash-verified

199 logger.error(f"Failed to send object: {obj}")
200
201 async def put_async(self, obj: Any, routing_id: Optional[bytes] = None):
202 self.setup_lazily()
203 self._check_thread_safety()
204 try:
205 if self.use_hmac_encryption or self.socket_type == zmq.ROUTER:
206 # Need manual serialization for encryption or ROUTER multipart
207 data = self._prepare_data(obj)
208 await self._send_data_async(data, routing_id=routing_id)
209 else:
210 # Standard socket without encryption
211 await self.socket.send_pyobj(obj)
212 except TypeError as e:
213 logger.error(f"Cannot pickle {obj}")
214 raise e
215 except Exception as e:
216 logger.error(f"Error sending object: {e}")
217 logger.error(traceback.format_exc())
218 raise e
219
220 nvtx_mark("ipc.send", color="blue", category="IPC")
221
222 async def put_async_noblock(self, obj: Any):
223 self.setup_lazily()

Callers 13

send_delayedMethod · 0.80
senderMethod · 0.80
_batched_putMethod · 0.80
_call_asyncMethod · 0.80
_send_error_responseMethod · 0.80

Calls 6

setup_lazilyMethod · 0.95
_check_thread_safetyMethod · 0.95
_prepare_dataMethod · 0.95
_send_data_asyncMethod · 0.95
nvtx_markFunction · 0.85
errorMethod · 0.45

Tested by 7

send_delayedMethod · 0.64
senderMethod · 0.64