Files
project_6/cccl_upstream/.pre-commit-config.yaml
muh-bot 2a7ca101d7 feat(cccl): integrate missing CCCL directories — python/, ci/, .agent/, docs/, test/
Sparse-checkout from NVIDIA/cccl main branch to complete cccl_upstream:

Added:
- python/cuda_cccl/ (226 files) — Python bindings for device-level algorithms
  Critical for muh toolchain: cuda.compute.reduce_into, scan, radix_sort, etc.
  Includes 204 .py files with full test coverage for all 27 algorithms
- ci/ (163 files) — Build/test infrastructure
  build_cub.sh, test_cub.sh, build_and_test_targets.sh, matrix.yaml
  Directly maps to our [INFRA-CI] and [INFRA-BUILD] items
- .agent/skills/ (7 files) — NVIDIA's own agent skills for CCCL
  cccl-style/SKILL.md, cccl-test/SKILL.md, sass-diff/SKILL.md
- docs/ (491 files) — Official CCCL documentation
  CI references, CMake guides, Python compute docs, libcudacxx PTX docs
- test/ (12 files) — Top-level integration tests (cuda_smoke, stdpar)
- Root configs: .clang-format, .clang-tidy, CONTRIBUTING.md, pyproject.toml
- CLAUDE.md symlink → AGENTS.md (NVIDIA's standard)

cccl_upstream now mirrors full NVIDIA/cccl structure:
  Before: 42M (cub + thrust + libcudacxx + cudax + c + examples + benchmarks)
  After:  53M (+python +ci +docs +.agent +test +configs)

This completes the CCCL base needed for:
- [muh-bench] items: ci/util/build_and_test_targets.sh for targeted builds
- [CCCL-verify] items: python/cuda_cccl/tests/ as reference implementations
- [CCCL-test] items: ci/test_cub.sh, ci/test_thrust.sh
- Agent workflow: .agent/skills/ for consistent style and test patterns
2026-08-07 02:34:33 +00:00

144 lines
4.3 KiB
YAML

# Copyright (c) 2024, NVIDIA CORPORATION.
ci:
autofix_commit_msg: |
[pre-commit.ci] auto code formatting
autofix_prs: false
autoupdate_branch: ''
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: quarterly
skip: [mypy, secret-scan-trufflehog] # mypy fails on pre-commit.ci due to numpy stub incompatibility with Python 3.14
submodules: false
repos:
# Runs first so a leaked credential blocks the commit before any formatter runs.
# Self-installing: the hook downloads a pinned, checksum-verified trufflehog on
# first use (no manual install). Skipped on pre-commit.ci; Pulse CI enforces server-side.
- repo: https://github.com/NVIDIA/security-workflows
rev: v0.2.0
hooks:
- id: secret-scan-trufflehog
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
# handled by clang-format
exclude_types: [c, c++, cuda]
- id: check-json
- id: check-toml
- id: pretty-format-json
args: ['--autofix', '--indent=2', '--no-sort-keys']
- id: check-symlinks
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
# ruff checks this already
exclude_types: [python]
- id: check-yaml
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
exclude: |
(?x)^(
^.*libcudacxx/cmake/config\.guess$
)
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v20.1.7
hooks:
- id: clang-format
types_or: [file]
files: |
(?x)^(
^.*\.c$|
^.*\.cpp$|
^.*\.cu$|
^.*\.cuh$|
^.*\.cxx$|
^.*\.h$|
^.*\.hpp$|
^.*\.inl$|
^.*\.mm$|
^libcudacxx/include/.*/[^.]*$
)
args: ["-fallback-style=none", "-style=file", "-i"]
# TODO/REMINDER: add the Ruff vscode extension to the devcontainers
# Ruff, the Python auto-correcting linter/formatter written in Rust
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.2
hooks:
- id: ruff # linter
- id: ruff-format # formatter
# CMake formatting
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.23.1
hooks:
- id: gersemi
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
additional_dependencies: [tomli]
args: ["--toml", "pyproject.toml", "-I", ".codespell-ignore.txt"]
exclude: |
(?x)^(
build|
CITATION.md
)
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.16.1'
hooks:
- id: mypy
# numpy is intentionally not installed here: numpy>=2.3 ships PEP 695
# `type` statements in its stubs that mypy rejects under
# python_version=3.10, and numpy<2.3 has no wheels for the Python that
# pre-commit.ci runs. numpy is instead ignored in the mypy config.
additional_dependencies: [types-cachetools]
args: ["--config-file=python/cuda_cccl/pyproject.toml",
"python/cuda_cccl/cuda/compute/"]
pass_filenames: false
- repo: https://github.com/sirosen/texthooks
rev: 0.7.1
hooks:
- id: fix-smartquotes
- id: fix-spaces
- id: forbid-bidi-controls
- id: fix-ligatures
- repo: local
hooks:
- id: check-shebang
name: check-shebang
entry: ci/util/pre-commit/check_shebang.py
language: python
types: [shell]
exclude: |
(?x)^(
^.*libcudacxx/cmake/config\.guess$
)
- id: check-cub-test-macros
name: require CUB test memory classification
entry: ci/util/pre-commit/check_cub_test_macros.py
language: python
files: ^(cub/test/.*\.(cu|cuh|h)|ci/util/pre-commit/check_cub_test_macros\.py)$
types: [file]
- id: unprintable-unicode
name: unprintable-unicode
entry: ci/util/pre-commit/strip_unprintable.py
language: python
types: [text]
default_language_version:
python: python3