Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadh committed Apr 16, 2021
1 parent 72bb09f commit ed48173
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/runtime/rpc/rpc_endpoint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,8 @@ void RPCEndpoint::CopyToRemote(void* from_bytes, DLTensor* to, uint64_t nbytes)

uint64_t tensor_total_size_bytes = static_cast<uint64_t>(GetDataSize(*to));
ICHECK_LE(to->byte_offset + nbytes, tensor_total_size_bytes)
<< "CopyToRemote: overflow in tensor size: (byte_offset=" << to->byte_offset << ", nbytes=" << nbytes << ", tensor_total_size="
<< tensor_total_size_bytes << ")";
<< "CopyToRemote: overflow in tensor size: (byte_offset=" << to->byte_offset
<< ", nbytes=" << nbytes << ", tensor_total_size=" << tensor_total_size_bytes << ")";

uint64_t overhead = RemoteCopyCalculatePacketOverheadSize(to, code, nbytes);
uint64_t packet_nbytes = overhead + nbytes;
Expand All @@ -822,8 +822,8 @@ void RPCEndpoint::CopyFromRemote(DLTensor* from, void* to_bytes, uint64_t nbytes

uint64_t tensor_total_size_bytes = static_cast<uint64_t>(GetDataSize(*from));
ICHECK_LE(from->byte_offset + nbytes, tensor_total_size_bytes)
<< "CopyFromRemote: overflow in tensor size: (byte_offset=" << from->byte_offset << ", nbytes=" << nbytes << ", tensor_total_size="
<< tensor_total_size_bytes << ")";
<< "CopyFromRemote: overflow in tensor size: (byte_offset=" << from->byte_offset
<< ", nbytes=" << nbytes << ", tensor_total_size=" << tensor_total_size_bytes << ")";

uint64_t overhead = RemoteCopyCalculatePacketOverheadSize(from, code, nbytes);
uint64_t packet_nbytes = overhead;
Expand Down Expand Up @@ -1002,7 +1002,7 @@ class RPCClientSession : public RPCSession, public DeviceAPI {
void CopyFromRemote(DLTensor* remote_from, void* local_to_bytes, uint64_t nbytes) final {
RPCCode code = RPCCode::kCopyFromRemote;
uint64_t overhead = RemoteCopyCalculatePacketOverheadSize(remote_from, code, nbytes);
const uint64_t block_size = GetRPCMaxTransferSize() - overhead -100;
const uint64_t block_size = GetRPCMaxTransferSize() - overhead;
uint64_t block_count = 0;
const uint64_t num_blocks = nbytes / block_size;
void* to_bytes;
Expand Down

0 comments on commit ed48173

Please sign in to comment.