Poplar and PopLibs
gcl::CommGroup Struct Reference

Struct to specify sub-groups of replicas. More...

#include <Collectives.hpp>

Public Member Functions

 CommGroup (const CommGroupType groupType, unsigned groupSize, unsigned replicaStride=1)
 Construct CommGroup. More...
 

Protected Attributes

CommGroupType mReplicaGroupType = CommGroupType::ALL
 Replica group type.
 
unsigned mReplicaGroupSize = 0
 Replica group size. More...
 
unsigned mReplicaGroupStride = 1
 Replica group stride. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const CommGroup &group)
 String representation of the CommGroup. More...
 

Detailed Description

Struct to specify sub-groups of replicas.

Examples of derived sub-groups:

  • IPU-link domain sub-rack:
    type == CONSECUTIVE && replicaGroupSize == ipuLinkDomainSize/replica-size/N
    @ CONSECUTIVE
    Groups are consecutive in replica.
    where N is power of two and replicaGroupSize > 1.
  • Complete IPU-link domain / full rack:
    type == CONSECUTIVE && replicaGroupSize == ipuLinkDomainSize/replica-size
  • Using GW-links only:
    type == ORTHOGONAL && replicaGroupSize == numberOfIpuLinkDomains
    @ ORTHOGONAL
    Groups are sliced orthogonal to the replica ordering.

Constructor & Destructor Documentation

◆ CommGroup()

gcl::CommGroup::CommGroup ( const CommGroupType  groupType,
unsigned  groupSize,
unsigned  replicaStride = 1 
)

Construct CommGroup.

Parameters
groupTypereplica group type
groupSizereplica group size
replicaStridereplica group stride

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const CommGroup group 
)
friend

String representation of the CommGroup.

Parameters
osostream output destination.
groupgroup to represent as string.

Member Data Documentation

◆ mReplicaGroupSize

unsigned gcl::CommGroup::mReplicaGroupSize = 0
protected

Replica group size.

0 indicate the default size for the group type.

◆ mReplicaGroupStride

unsigned gcl::CommGroup::mReplicaGroupStride = 1
protected

Replica group stride.

0 indicate the default replica stride for the group type.


The documentation for this struct was generated from the following file: