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

Method call_all_ray_workers

tensorrt_llm/executor/ray_executor.py:180–192  ·  view source on GitHub ↗
(self, func: str, leader_only: bool,
                             async_call: bool, *args, **kwargs)

Source from the content-addressed store, hash-verified

178
179 @unwrap_ray_errors()
180 def call_all_ray_workers(self, func: str, leader_only: bool,
181 async_call: bool, *args, **kwargs):
182 workers = (self.workers[0], ) if leader_only else self.workers
183 if async_call:
184 return [
185 getattr(worker, func).remote(*args, **kwargs)
186 for worker in workers
187 ]
188 else:
189 return ray.get([
190 getattr(worker, func).remote(*args, **kwargs)
191 for worker in workers
192 ])
193
194 @unwrap_ray_errors()
195 def collective_rpc(self,

Callers 4

init_workers_syncMethod · 0.95
init_workers_asyncMethod · 0.95
report_device_idsMethod · 0.95
abort_requestMethod · 0.95

Calls 2

remoteMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected