Class GrpcClient

Class Documentation

class switchml::GrpcClient

The GRPC client is the mediator between the client library and the controller program.

It can ask the controller to setup switch registers appropriately, and perform simple collective communication operations across all workers (Currently only a barrier and a single value broadcast).

Public Functions

GrpcClient(Config &config)

Create stubs and the grpc channel.

Parameters

config[in] a reference to the switchml configuration.

~GrpcClient() = default
GrpcClient(GrpcClient const&) = delete
void operator=(GrpcClient const&) = delete
GrpcClient(GrpcClient&&) = default
GrpcClient &operator=(GrpcClient&&) = default
void Barrier(const switchml_proto::BarrierRequest &request, switchml_proto::BarrierResponse *response)

A barrier across workers.

Parameters
  • request[in] BarrierRequest containing the number of workers.

  • response[out] The empty BarrierResponse from the switch.

void Broadcast(const switchml_proto::BroadcastRequest &request, switchml_proto::BroadcastResponse *response)

Broadcast a value to all workers through the controller.

Parameters
  • request[in]

  • response[out]

void CreateRdmaSession(const switchml_proto::RdmaSessionRequest &request, switchml_proto::RdmaSessionResponse *response)

Tell the controller to setup the switch registers for RDMA operation.

Parameters
  • request[in] RdmaSessionRequest containing configuration, session info, memory region info

  • response[out] RdmaSessionResponse containing the switch’s memory region info

void CreateUdpSession(const switchml_proto::UdpSessionRequest &request, switchml_proto::UdpSessionResponse *response)

Tell the controller to setup the switch registers for UDP operation.

Parameters
  • request[in] UdpSessionRequest containing configuration, session info

  • response[out] UdpSessionResponse