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

Method submit

tensorrt_llm/executor/ray_executor.py:231–250  ·  view source on GitHub ↗

Low-level API to the executor. Return a "future" GenerationResult which can be waited. Forwards the request to the workers through RPC.

(self, request: "GenerationRequest")

Source from the content-addressed store, hash-verified

229 return await asyncio.gather(*refs)
230
231 def submit(self, request: "GenerationRequest") -> "GenerationResult":
232 """
233 Low-level API to the executor. Return a "future" GenerationResult
234 which can be waited. Forwards the request to the workers through RPC.
235 """
236 request.set_id(self._get_next_client_id())
237 logprob_params = self._get_logprob_params(request)
238
239 with nvtx_range_debug("rpc_submit"):
240 self.rpc_client.submit(request).remote(need_response=False)
241
242 result = GenerationResult(
243 request,
244 background_error_handler=self._handle_background_error,
245 executor=self,
246 disaggregated_params=request.disaggregated_params,
247 logprob_params=logprob_params)
248 self._results[request.id] = result
249
250 return result
251
252 def start(self):
253 pass

Callers

nothing calls this directly

Calls 6

nvtx_range_debugFunction · 0.90
GenerationResultClass · 0.85
set_idMethod · 0.80
_get_next_client_idMethod · 0.80
_get_logprob_paramsMethod · 0.80
remoteMethod · 0.80

Tested by

no test coverage detected