Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions
xgboost::collective::RabitCommunicator Class Reference
Inheritance diagram for xgboost::collective::RabitCommunicator:
xgboost::collective::Communicator

Public Member Functions

 RabitCommunicator (int world_size, int rank)
 
bool IsDistributed () const override
 Whether the communicator is running in distributed mode.
 
bool IsFederated () const override
 Whether the communicator is running in federated mode.
 
void AllGather (void *send_receive_buffer, std::size_t size) override
 Gathers data from all processes and distributes it to all processes.
 
void AllReduce (void *send_receive_buffer, std::size_t count, DataType data_type, Operation op) override
 Combines values from all processes and distributes the result back to all processes.
 
void Broadcast (void *send_receive_buffer, std::size_t size, int root) override
 Broadcasts a message from the process with rank root to all other processes of the group.
 
std::string GetProcessorName () override
 Gets the name of the processor.
 
void Print (const std::string &message) override
 Prints the message.
 
- Public Member Functions inherited from xgboost::collective::Communicator
int GetWorldSize () const
 Get the total number of processes.
 
int GetRank () const
 Get the rank of the current processes.
 

Static Public Member Functions

static CommunicatorCreate (Json const &config)
 
- Static Public Member Functions inherited from xgboost::collective::Communicator
static void Init (Json const &config)
 Initialize the communicator.
 
static void Finalize ()
 Finalize the communicator.
 
static CommunicatorGet ()
 Get the communicator instance.
 
static CommunicatorType GetTypeFromEnv ()
 Get the communicator type from environment variables.
 
static CommunicatorType GetTypeFromConfig (Json const &config)
 Get the communicator type from runtime configuration.
 

Protected Member Functions

void Shutdown () override
 Shuts down the communicator.
 
- Protected Member Functions inherited from xgboost::collective::Communicator
 Communicator (int world_size, int rank)
 Construct a new communicator.
 

Member Function Documentation

◆ AllGather()

void xgboost::collective::RabitCommunicator::AllGather ( void *  send_receive_buffer,
std::size_t  size 
)
inlineoverridevirtual

Gathers data from all processes and distributes it to all processes.

This assumes all ranks have the same size, and input data has been sliced into the corresponding position.

Parameters
send_receive_bufferBuffer storing the data.
sizeSize of the data in bytes.

Implements xgboost::collective::Communicator.

◆ AllReduce()

void xgboost::collective::RabitCommunicator::AllReduce ( void *  send_receive_buffer,
std::size_t  count,
DataType  data_type,
Operation  op 
)
inlineoverridevirtual

Combines values from all processes and distributes the result back to all processes.

Parameters
send_receive_bufferBuffer storing the data.
countNumber of elements in the buffer.
data_typeData type stored in the buffer.
opThe operation to perform.

Implements xgboost::collective::Communicator.

◆ Broadcast()

void xgboost::collective::RabitCommunicator::Broadcast ( void *  send_receive_buffer,
std::size_t  size,
int  root 
)
inlineoverridevirtual

Broadcasts a message from the process with rank root to all other processes of the group.

Parameters
send_receive_bufferBuffer storing the data.
sizeSize of the data in bytes.
rootRank of broadcast root.

Implements xgboost::collective::Communicator.

◆ GetProcessorName()

std::string xgboost::collective::RabitCommunicator::GetProcessorName ( )
inlineoverridevirtual

Gets the name of the processor.

Implements xgboost::collective::Communicator.

◆ IsDistributed()

bool xgboost::collective::RabitCommunicator::IsDistributed ( ) const
inlineoverridevirtual

Whether the communicator is running in distributed mode.

Implements xgboost::collective::Communicator.

◆ IsFederated()

bool xgboost::collective::RabitCommunicator::IsFederated ( ) const
inlineoverridevirtual

Whether the communicator is running in federated mode.

Implements xgboost::collective::Communicator.

◆ Print()

void xgboost::collective::RabitCommunicator::Print ( const std::string &  message)
inlineoverridevirtual

Prints the message.

Implements xgboost::collective::Communicator.

◆ Shutdown()

void xgboost::collective::RabitCommunicator::Shutdown ( )
inlineoverrideprotectedvirtual

Shuts down the communicator.

Implements xgboost::collective::Communicator.


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