Parallel Config#

struct ParallelGroupConfig#

Configuration for one logical parallel group.

Public Functions

char const *typeName() const noexcept#
std::string toString() const#

Public Members

ParallelType type = {ParallelType::kTensor}#

Logical parallelism type.

int32_t size = {1}#

Number of ranks in this group.

int32_t rank = {0}#

Local rank within this group.

int32_t globalRank = {0}#

Global rank within the full parallel world.

int32_t localDevice = {0}#

CUDA device for this rank.

struct ParallelBackendHandles#

External communication handles for one parallel group (e.g. NCCL communicators). Shared by the public runtime config and the runtime coordinator.

Public Members

ParallelType type = {ParallelType::kTensor}#
std::vector<void*> handles = {}#
bool ownsHandles = {true}#
struct ParallelConfig#

Top-level parallel execution configuration. Size-1 dimensions are the single-device default.

Public Functions

std::string toString() const#

Public Members

int32_t tensorParallelSize = {1}#

Tensor parallel size.

ParallelLaunchMode launchMode = {ParallelLaunchMode::kThread}#
std::vector<int32_t> devices = {}#

Optional local CUDA device list. Empty means [0, size).

struct ParallelMapping#

Fully resolved tensor-parallel coordinates for one runtime rank. Size-1 dimensions are explicit so single-device execution is the TP size-1 case.

Public Functions

inline bool isParallel() const noexcept#
std::string toString() const#

Public Members

int32_t worldSize = {1}#
int32_t globalRank = {0}#
int32_t localDevice = {0}#
int32_t tensorParallelSize = {1}#
int32_t tensorParallelRank = {0}#
char const *trt_edgellm::rt::parallelTypeName(
ParallelType type
) noexcept#
char const *trt_edgellm::rt::parallelLaunchModeName(
ParallelLaunchMode mode
) noexcept#
bool trt_edgellm::rt::isInlineSingleRank(
ParallelLaunchMode launchMode,
int32_t worldSize,
size_t localRankCount
) noexcept#

True when a parallel plan should execute inline on the caller’s thread: threaded launch, a single-rank world, and exactly one local rank. In this case the coordinator skips worker threads, condition-variable dispatch, and NUMA pinning so single-device execution keeps its original latency and caller-thread streaming/audio semantics.

bool trt_edgellm::rt::isFullLocalParallelGroup(
int32_t groupSize,
std::vector<int32_t> const &localRanks
) noexcept#

True when localRanks contains every rank in [0, groupSize) in rank order.

int32_t trt_edgellm::rt::parallelGroupSize(
ParallelConfig const &config,
ParallelType type
) noexcept#
int32_t trt_edgellm::rt::parallelWorldSize(
ParallelConfig const &config
) noexcept#
int32_t trt_edgellm::rt::parallelGroupRank(
ParallelConfig const &config,
ParallelType type,
int32_t globalRank
) noexcept#
ParallelMapping trt_edgellm::rt::makeParallelMapping(
ParallelConfig const &config,
int32_t globalRank,
int32_t localDevice
) noexcept#
ParallelGroupConfig trt_edgellm::rt::makeParallelGroupConfig(
ParallelConfig const &config,
ParallelType type,
int32_t globalRank,
int32_t localDevice
)#
std::vector<ParallelGroupConfig> trt_edgellm::rt::activeParallelGroups(
ParallelConfig const &config,
int32_t globalRank,
int32_t localDevice
)#