MpiCommSession#

class tensorrt_llm.llmapi.MpiCommSession(comm=None, n_workers: int = 1)[source]#

Bases: MpiSession

__init__(comm=None, n_workers: int = 1)[source]#
abandon()#

Tear the session down without waiting on a dead worker world.

abort()[source]#
get_comm()[source]#
is_comm_session() bool#
release_exit_joins()#

Mark the worker world dead and release anything that would join it.

Non-destructive, so it may be called by a component that does not own the session. Must not tear the session down – only ensure that nothing (interpreter exit, a later blocking shutdown() by the owner) waits forever on the dead world. Default: no-op.

shutdown(wait=True)[source]#
shutdown_abort(grace: float = 60, reason=None)#
submit(
task: Callable[[...], T],
*args,
**kwargs,
) List[Future[T]][source]#

Submit a task to MPI workers.

Parameters:
  • task – The task to be submitted.

  • args – Positional arguments for the task.

  • kwargs – Keyword arguments for the task.

submit_sync(
task: Callable[[...], T],
*args,
**kwargs,
) List[T][source]#