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]#

See MpiSession.submit.

The ranks are those of comm. This process is rank 0 and runs its copy on a dedicated thread; the other ranks serve tasks through MPICommExecutor.

Returns:

One future per rank, in arbitrary order.

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

See MpiSession.submit_sync.

Returns:

One result per rank of comm, in arbitrary order.