-
Notifications
You must be signed in to change notification settings - Fork 60
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
Switch to using C++ compiler to compile the plugin #805
Open
bwbarrett
wants to merge
4
commits into
aws:master
Choose a base branch
from
bwbarrett:feature/cppize-the-code
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fd44226
to
cdbf6bb
Compare
sielicki
reviewed
Mar 10, 2025
64bd6fc
to
f172789
Compare
rauteric
reviewed
Mar 13, 2025
While all the code very much looks like C code, switch to using the C++ compiler to compile our code. Step 1 in migrating to C++. Signed-off-by: Brian Barrett <[email protected]>
Now that the code is entirely C++, remove all the various extern "C" markers, except arount the ncclNetPlugin_v* structures. This is probably not entirely correct, as the functions themselves still have C++ linkage, but on the NCCL side, they also don't force C linkage for the forward declarations, and so we're already relying on the fact that GNU and Clang compilers don't have a different calling convention and only have different name mangling between the two languages. Signed-off-by: Brian Barrett <[email protected]>
No reason to have our own macros with their double-evaluation problems when we can just use std::min and std::max. Bonus, with C++14 or later, we can find the max of more than 2 items in one call. Signed-off-by: Brian Barrett <[email protected]>
One of the few places we should use templates, making math functions easier to write. Signed-off-by: Brian Barrett <[email protected]>
f172789
to
f4817de
Compare
rauteric
approved these changes
Mar 14, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.