Add GitHub Actions workflow for pre-commit checks#1949
Merged
Conversation
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
e48133d to
0a5da7d
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements automated code formatting for C++ and CUDA source files using pre-commit hooks. The changes are purely stylistic, standardizing code formatting across multiple files including optimizer kernels, memory management utilities, NCCL wrappers, and multihead attention implementations.
Key Changes
- Applied consistent formatting to spacing, indentation, and line wrapping
- Reorganized include statements and namespace declarations
- Reformatted function signatures and template declarations
- Standardized brace placement and control flow statement formatting
Reviewed Changes
Copilot reviewed 142 out of 196 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| apex/contrib/csrc/peer_memory/peer_memory.cpp | Reformatted Python binding definitions with consistent line breaks |
| apex/contrib/csrc/optimizers/*.cu | Applied uniform formatting to CUDA optimizer kernels (LAMB, Adam variants) |
| apex/contrib/csrc/optimizers/*.cpp | Reformatted C++ interface files for optimizer kernels |
| apex/contrib/csrc/nccl_p2p/*.cu | Standardized NCCL P2P communication code formatting |
| apex/contrib/csrc/nccl_p2p/*.cpp | Reformatted NCCL wrapper implementations |
| apex/contrib/csrc/nccl_allocator/NCCLAllocator.cpp | Applied consistent formatting to allocator code |
| apex/contrib/csrc/multihead_attn/*.cu | Reformatted multihead attention CUDA kernels |
| apex/contrib/csrc/multihead_attn/*.cpp | Standardized multihead attention frontend code |
| apex/contrib/csrc/multihead_attn/*.cuh | Applied formatting to header files |
| apex/contrib/csrc/layer_norm/*.h | Reformatted layer normalization trait templates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
crcrpar
commented
Nov 18, 2025
Contributor
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
This file contains hidden or 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
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.
Enables clang-format