Skip to content

Commit

Permalink
[RPC] microtvm: fix RPC large transfer size issue (apache#7838)
Browse files Browse the repository at this point in the history
* fix rpc for microtvm

* apply feedbacks

* bundle deploy fix

* fix func registry size

* mv constant

* fix copyfromremote

* address comments and fix error

* change rpc default max size

* Trigger Build

* add checks

* Trigger Build

* fix ICHECK
  • Loading branch information
mehrdadh committed Apr 22, 2021
1 parent 2787af3 commit 7b3fb8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/rpc/rpc_endpoint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ class RPCClientSession : public RPCSession, public DeviceAPI {
RPCCode code = RPCCode::kCopyToRemote;
uint64_t overhead = RemoteCopyCalculatePacketOverheadSize(remote_to, code, nbytes);
uint64_t rpc_max_size = GetRPCMaxTransferSize();
ICHECK_GT(rpc_max_size - overhead, 0) << "CopyToRemote: Invalid block size!";
ICHECK_GT(rpc_max_size, overhead) << "CopyToRemote: Invalid block size!";
const uint64_t block_size = rpc_max_size - overhead;
uint64_t block_count = 0;
const uint64_t num_blocks = nbytes / block_size;
Expand All @@ -1035,7 +1035,7 @@ class RPCClientSession : public RPCSession, public DeviceAPI {
RPCCode code = RPCCode::kCopyFromRemote;
uint64_t overhead = RemoteCopyCalculatePacketOverheadSize(remote_from, code, nbytes);
uint64_t rpc_max_size = GetRPCMaxTransferSize();
ICHECK_GT(rpc_max_size - overhead, 0) << "CopyFromRemote: Invalid block size!";
ICHECK_GT(rpc_max_size, overhead) << "CopyFromRemote: Invalid block size!";
const uint64_t block_size = rpc_max_size - overhead;
uint64_t block_count = 0;
const uint64_t num_blocks = nbytes / block_size;
Expand Down

0 comments on commit 7b3fb8c

Please sign in to comment.