Skip to content

Commit

Permalink
Set max message size in insecure gRPC (#8203)
Browse files Browse the repository at this point in the history
  • Loading branch information
rongou committed Aug 26, 2022
1 parent 651f0a8 commit d6e2013
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugin/federated/federated_client.h
Expand Up @@ -35,8 +35,12 @@ class FederatedClient {

/** @brief Insecure client for connecting to localhost only. */
FederatedClient(std::string const &server_address, int rank)
: stub_{Federated::NewStub(
grpc::CreateChannel(server_address, grpc::InsecureChannelCredentials()))},
: stub_{[&] {
grpc::ChannelArguments args;
args.SetMaxReceiveMessageSize(std::numeric_limits<int>::max());
return Federated::NewStub(
grpc::CreateCustomChannel(server_address, grpc::InsecureChannelCredentials(), args));
}()},
rank_{rank} {}

std::string Allgather(std::string const &send_buffer) {
Expand Down

0 comments on commit d6e2013

Please sign in to comment.