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

Automate C++ include file grouping and ordering using clang-format #5787

Merged

Conversation

harrism
Copy link
Member

@harrism harrism commented Feb 28, 2024

Description

This uses the IncludeCategories settings in .clang-format to automate include ordering and grouping and to make include ordering more consistent with the rest of RAPIDS. For discussion, see rapidsai/cudf#15063. This PR uses a similar set of header grouping categories used in that PR, adapted for cuML.

One purpose of this is to make it easier to automate injection of a header change with an upcoming RMM refactoring (and in the future).

The header reordering in this PR uncovered multiple places where headers were not included where they are used. Most commonly this was a missing #include <raft/core/handle.hpp>

Closes #5779

@harrism harrism requested a review from a team as a code owner February 28, 2024 04:19
@bdice bdice added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Feb 28, 2024
Copy link
Member

@dantegd dantegd left a comment

Choose a reason for hiding this comment

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

Rules lgtm. If we add other RAPIDS C++ libraries in the future we'll add them, but for now those seem well covered.

@harrism harrism self-assigned this Feb 29, 2024
@dantegd
Copy link
Member

dantegd commented Feb 29, 2024

/merge

@rapids-bot rapids-bot bot merged commit a356ec6 into rapidsai:branch-24.04 Feb 29, 2024
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CUDA/C++ improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Automate C++ include file grouping and ordering using clang-format
3 participants