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 #2202

Merged

Conversation

harrism
Copy link
Member

@harrism harrism commented Feb 27, 2024

TODO: currently cpp/test/neighbors/ann_ivf_pq/test_float_uint32_t.cu is commented out to initially save CI time (this file takes a long time to build). Once CI is passing once I will uncomment it.

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 RAFT.

The header reordering in this PR uncovered one place where #include <cutlass/layout/pitch_linear.h> was missing from raft/cpp/include/raft/distance/detail/./pairwise_distance_epilogue_elementwise.h, so I also added that include.

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).

Closes #2193

@harrism harrism requested a review from a team as a code owner February 27, 2024 22:25
@harrism harrism added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Feb 27, 2024
@harrism harrism self-assigned this Feb 27, 2024
@github-actions github-actions bot added cpp and removed improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Feb 27, 2024
@harrism harrism changed the title Fea/clang format header grouping Automate C++ include file grouping and ordering using clang-format Feb 27, 2024
@harrism harrism added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Feb 27, 2024
@harrism
Copy link
Member Author

harrism commented Feb 27, 2024

ignore commit message on Undo temporary removal of long-running test, it should just be a merge commit, but vscode had a different message in the edit box.

@cjnolet
Copy link
Member

cjnolet commented Mar 6, 2024

/merge

@rapids-bot rapids-bot bot merged commit 04c9b33 into rapidsai:branch-24.04 Mar 6, 2024
71 checks passed
@bdice bdice mentioned this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp 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
2 participants