Skip to content

Conversation

@wckzhang
Copy link
Contributor

Adds a check during component initialization for
cuda capable devices. Does not select the component if no cuda capable devices are detected.

Adds a check during component initialization for
cuda capable devices. Does not select the component
if no cuda capable devices are detected.

Signed-off-by: William Zhang <[email protected]>
@wckzhang
Copy link
Contributor Author

cuInit doesn't incur any cost except for the first invocation. I don't think there's any reason we can't call cuInit here, costs about 0.146 seconds during my testing on first invocation.

@wckzhang
Copy link
Contributor Author

oh I forgot to put this PR as part of Edgar's, I can do that

@wckzhang
Copy link
Contributor Author

Ah it's fine I think this can go in separately anyway. There's really no relation to Edgar's PR as coll cuda would have been compiled either way

return NULL;
}

int count = 0;
Copy link
Member

Choose a reason for hiding this comment

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

Might as well move this line down below the cuInit() block (i.e., to where you know for sure that count will be used).

@gpaulsen
Copy link
Member

gpaulsen commented May 9, 2023

@janjust would like someone at nVidia to review as well.

@janjust janjust merged commit fdf50d0 into open-mpi:main May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants