Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RPC] Call sync in CopyFromRemote and CopyToRemote #5512

Merged
merged 1 commit into from
May 5, 2020
Merged

Conversation

tqchen
Copy link
Member

@tqchen tqchen commented May 5, 2020

@areusch
Copy link
Contributor

areusch commented May 5, 2020

what's the justification for doing this just over RPC sessions?

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tqchen
Copy link
Member Author

tqchen commented May 5, 2020

@areusch We only do it for CopyFromRemote and CopyToRemote. In both cases, we(user or rpc server) can choose to allocate temp meomory from the arena, which will become invalid after the response. The user do not guarantee these byte arrays stays alive after the call ends. So that is why explicit sync is needed here.

For DeviceAPI::CopyDataFromTo, we do not run the sync, since the resources are NDArrays managed by the remote user, and the remote user can choose to call sync after the copy

@tqchen tqchen changed the title [RPC] Call sync in remote cpu to gpu copies [RPC] Call sync in CopyFromRemote and CopyToRemote May 5, 2020
@tqchen tqchen merged commit 70a5902 into apache:master May 5, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Jun 9, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Jun 18, 2020
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants