CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
68 lines
1.6 KiB
Markdown
68 lines
1.6 KiB
Markdown
# Maintenance Scripts for NCCL
|
|
|
|
This directory contains developer maintenance scripts that are not part of the
|
|
normal NCCL build. Run the scripts from the repository root unless a script says
|
|
otherwise.
|
|
|
|
## Formatting
|
|
|
|
NCCL uses `clang-format` for C/C++/CUDA source formatting. The formatting
|
|
scripts operate on source files with these suffixes:
|
|
|
|
```text
|
|
.cc .cu .cuh .h .h.in
|
|
```
|
|
|
|
Paths listed in the repository-level `.clang-format-ignore` file are skipped.
|
|
|
|
### `run-clang-format.sh`
|
|
|
|
Apply `clang-format` to NCCL source files.
|
|
|
|
```sh
|
|
./maint/run-clang-format.sh
|
|
./maint/run-clang-format.sh src/transport
|
|
./maint/run-clang-format.sh src/transport/net_ib/common.cc
|
|
```
|
|
|
|
By default, the script formats files under `src/`. If a file or directory path
|
|
is provided, it formats only that file or files under that directory
|
|
recursively.
|
|
|
|
Useful options:
|
|
|
|
```sh
|
|
./maint/run-clang-format.sh --list [path]
|
|
./maint/run-clang-format.sh --diff [path]
|
|
```
|
|
|
|
The script requires `clang-format` version 22 or newer. Set `CLANG_FORMAT` to
|
|
use a non-default binary:
|
|
|
|
```sh
|
|
CLANG_FORMAT=/path/to/clang-format ./maint/run-clang-format.sh --diff
|
|
```
|
|
|
|
## Git Integration
|
|
|
|
LLVM provides `git-clang-format`, a Git integration script for formatting only
|
|
changed lines. Download it from:
|
|
|
|
```text
|
|
https://github.com/llvm/llvm-project/blob/main/clang/tools/clang-format/git-clang-format
|
|
```
|
|
|
|
Follow the instructions in that script: put it somewhere on your `PATH`, make it
|
|
executable, and then use `git clang-format`.
|
|
|
|
Common examples:
|
|
|
|
```sh
|
|
git clang-format
|
|
git clang-format --staged
|
|
git clang-format main
|
|
git clang-format --diff main
|
|
```
|
|
|
|
Run `git clang-format -h` for the full option list.
|