Skip to content

Commit

Permalink
[RPC][BUGFIX] Fix remote device sync (apache#5538)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen authored and Trevor Morris committed Jun 8, 2020
1 parent 132017d commit 476623a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/rpc/rpc_device_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class RPCDeviceAPI final : public DeviceAPI {

void StreamSync(TVMContext ctx, TVMStreamHandle stream) final {
auto remote_ctx = RemoveSessMask(ctx);
GetSess(ctx)->GetDeviceAPI(remote_ctx)->StreamSync(ctx, stream);
GetSess(ctx)->GetDeviceAPI(remote_ctx)->StreamSync(remote_ctx, stream);
}

private:
Expand Down
2 changes: 2 additions & 0 deletions tests/python/unittest/test_runtime_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ def check(remote):
"testing.test_raise_error_callback")("RuntimeError")
raise_err()

remote.cpu().sync()

temp = rpc.server._server_env([])
server = rpc.Server("localhost")
client = rpc.connect(server.host, server.port)
Expand Down

0 comments on commit 476623a

Please sign in to comment.