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

[Unity][Disco] Use default stream in disco #15827

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

jinhongyii
Copy link
Contributor

@jinhongyii jinhongyii commented Sep 26, 2023

running on default stream and synchronizing with it is significantly faster on amd gpu than running on other stream and synchronizing that stream, so we switch to using default stream in init_ccl.

I also tested on nvidia gpu and confirmed that there's no perf regression.

@jinhongyii
Copy link
Contributor Author

cc: @junrushao @tqchen

@junrushao junrushao merged commit d06a658 into apache:unity Sep 27, 2023
Comment on lines -148 to -153
deviceStream_t GetDefaultStream() {
const auto* func = tvm::runtime::Registry::Get("runtime.get_" TVM_DISCO_DEVICE_NAME "_stream");
ICHECK(func != nullptr);
deviceStream_t stream = static_cast<deviceStream_t>((*func)().operator void*());
return stream == nullptr ? default_stream : stream;
}
Copy link
Member

Choose a reason for hiding this comment

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

it seems to break cudagraph integration because cudagraph provides a default stream

junrushao added a commit to junrushao/tvm that referenced this pull request Oct 4, 2023
This PR fixed a bug introduced in apache#15827 since which the cudagraph's
stream is discarded.
junrushao added a commit to junrushao/tvm that referenced this pull request Oct 4, 2023
This PR fixed a bug introduced in apache#15827 since which the cudagraph's
stream is discarded.
jinhongyii pushed a commit that referenced this pull request Oct 5, 2023
This PR fixed a bug introduced in #15827 since which the cudagraph's
stream is discarded.
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.

2 participants