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

[Bugfix] Fix Disco-CUDAGraph Integration #15870

Conversation

junrushao
Copy link
Member

This PR fixed a bug introduced in #15827 since which the cudagraph's stream is discarded.

@junrushao junrushao marked this pull request as ready for review October 4, 2023 06:15
@junrushao
Copy link
Member Author

CC: @jinhongyii

void Clear() { NCCL_CALL(ncclCommDestroy(comm)); }
void Clear() {
NCCL_CALL(ncclCommDestroy(comm));
if (default_stream != nullptr) {
Copy link
Contributor

Choose a reason for hiding this comment

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

IIUC, default_stream is always nullptr

Copy link
Member

Choose a reason for hiding this comment

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

given in this case default_stream is a member that can be changed later, i think having such code is better. Note it is not the same as the default stream in the CUDA terminology, but in the nccl runtime


deviceStream_t GetDefaultStream() { return nullptr; }
deviceStream_t GetDefaultStream() {
const auto* func = tvm::runtime::Registry::Get("runtime.get_" TVM_DISCO_DEVICE_NAME "_stream");
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any stream initialization in this file , so I'm confused what this function returns

Copy link
Member Author

Choose a reason for hiding this comment

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

it's initialized in cudagraph

This PR fixed a bug introduced in apache#15827 since which the cudagraph's
stream is discarded.
@junrushao junrushao force-pushed the bugfix/2023-10-03/fix-cudagraph-integration branch from 88536e1 to e79e582 Compare October 4, 2023 17:06
@jinhongyii jinhongyii merged commit 6d2b44d into apache:unity Oct 5, 2023
1 check passed
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.

4 participants