-
Notifications
You must be signed in to change notification settings - Fork 204
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
Apply clang-format to cub #1602
Conversation
This is a starting point for discussion -- I am open to any/all feedback on this PR. Some questions:
|
This might be a necessity, the changes view is crashing my browser 😄 Maybe 1 PR per project? |
I'm under the impression we're going to want to exclude libcudacxx at least temporarily. We need to prevent clang-format from touching |
We agreed in #551 to just have a single |
Great, thanks for the feedback. I'll attempt to handle both comments above at the same time: I tweaked this and applied it only to CUB, to start. CUB has the smallest diff out of CUB, libcudacxx, and Thrust. |
I'm happy with that. I looked at the changes and the surgery done isn't too impactful. |
@jrhemstad @wmaxey @alliepiper I'm a little unsure of the conclusion to draw from the discussion above. Should I make a change and apply clang-format to the entire repo? Or break up the formatting into one PR per subproject as @alliepiper proposed? |
I believe we should drop any additional
It will be a trainwreck in our libcu++ test suite as we often have terribly long lines there, but I am absolutely in favor of just getting something in over the current state |
I saw some issues with the formatting in libcu++ though. It was not properly aligning consecutive alias definitions |
Making a separate PR for each subproject will simplify reviewing and let us discuss and deal with each one's issues separately, since some will probably be easier to land than others. |
While we're at it, we should probably add something like this to track these big formatting sweeps: https://github.com/NVIDIA/nvbench/blob/main/.git-blame-ignore-revs |
.git-blame-ignore-revs is a good idea, but it will have to be done in follow-up PRs because the commit hashes will not be known in advance due to squash merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bdice thank you for this effort! Setting up an auto-formatting was long overdue for CUB. I had a few minor fixes that I pushed to your branch.
@gevtushenko Awesome, thanks! Please merge when you’re ready. @miscco volunteered to do the follow-ups for enabling clang-format on Thrust and libcudacxx. |
Thanks a lot for working on this @bdice its awesome 🎉 |
Description
This applies clang-format to CUB. With #1588 and the pre-commit.ci bot, autoformatting can be applied to any PR by commenting
pre-commit.ci autofix
.All changes were automatically applied aside from the edits to
.pre-commit-config.yaml
.See also:
clang-format
#455Checklist