Skip to content

Commit f8fcee1

Browse files
authored
Merge branch 'main' into cuco-map-rebind-test-hash
2 parents d0604c8 + 945cbc7 commit f8fcee1

3,304 files changed

Lines changed: 34836 additions & 74974 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.clang-tidy‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ HeaderFilterRegex: '.*/(thrust|cub|cuda|nv|cccl|c2h|cudastf|test)/.*'
327327
ExtraArgsBefore:
328328
# To match _CCCL_DOXYGEN_INVOKED
329329
- '-D_CCCL_CLANG_TIDY_INVOKED=1'
330+
- '-DCCCL_ENABLE_ASSERTIONS=1'
330331
- '-ftemplate-backtrace-limit=0'
331332
- '-fmacro-backtrace-limit=0'
332333
ExtraArgs:
@@ -346,6 +347,9 @@ CheckOptions:
346347
readability-enum-initial-value.AllowExplicitZeroFirstInitialValue: 'false'
347348
readability-enum-initial-value.AllowExplicitSequentialInitialValues: 'false'
348349
readability-redundant-access-specifiers.CheckFirstDeclaration: 'true'
350+
# Parenthesizing a call like `(::cuda::std::numeric_limits<T>::max)()` keeps the function-like
351+
# `min` and `max` macros of <windows.h> from expanding.
352+
readability-redundant-parentheses.AllowedDecls: 'max;min'
349353
# readability-identifier-naming.ClassCase: 'lower_case'
350354
# readability-identifier-naming.UnionCase: 'lower_case'
351355
# readability-identifier-naming.ClassConstantCase: 'UPPER_CASE'

‎.coderabbit.yaml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,22 @@ reviews:
114114
handling, environment setup, GPU availability assumptions, clear failures, and avoiding unnecessary
115115
expensive jobs.
116116
117+
- path: "ci/bench.yaml"
118+
instructions: |
119+
Treat benchmark requests as intentional temporary PR configuration. Accept
120+
template differences in filters, GPUs, and optional fields. CI branch protections
121+
enforce resets before merge. Do not request resets or repeat reset requirements
122+
in comments or summaries, even when headers require them. Report errors that
123+
disrupt the requested benchmarks.
124+
125+
- path: "ci/matrix.yaml"
126+
instructions: |
127+
Treat non-empty workflows.override entries as intentional temporary CI
128+
configuration. Do not request resets or flag reduced coverage or merge blocks.
129+
CI branch protections enforce resets; omit reminders from comments and summaries.
130+
Report errors that prevent requested jobs. Review permanent changes for
131+
correctness and coverage.
132+
117133
- path: ".github/**/*"
118134
instructions: |
119135
For GitHub workflows and repository automation, focus on permissions, event triggers, matrix generation,

‎.github/workflows/secret-scan-pulse.yml‎

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# CI security scanning via the NVIDIA/security-workflows suite: Pulse secret scan,
5+
# Pulse OSS vulnerability scan (SCA), Pulse malware scan, and CodeQL SAST.
6+
# Replaces secret-scan-pulse.yml. Pulse runs on Linux nv-gha-runners (OIDC/Vault).
7+
# Pinned by commit SHA to the security-workflows v0.6.0 release.
8+
9+
name: Security Suite (Secret, Vulnerability, Malware, SAST)
10+
11+
on:
12+
push:
13+
branches:
14+
- main
15+
- "pull-request/[0-9]+"
16+
workflow_dispatch:
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-on-${{ github.event_name }}-from-${{ github.ref_name }}
20+
cancel-in-progress: true
21+
22+
# Caller permissions must cover the reusable workflow (intersection applies).
23+
permissions:
24+
contents: read
25+
id-token: write # OIDC -> Vault -> nvcr.io image pull
26+
security-events: write # publish redacted SARIF to code scanning
27+
actions: read
28+
29+
jobs:
30+
security-suite:
31+
name: Security Suite
32+
# Pulse needs nv-gha-runners + Vault/nvcr vars; skip on forks.
33+
if: github.repository == 'NVIDIA/cccl'
34+
uses: NVIDIA/security-workflows/.github/workflows/security-suite.yml@d8189f3176942de7ffe2c48bcd7bb5fbdee2dd15 # v0.6.0
35+
with:
36+
enable-secret-scan: true
37+
# The Charon tenant authorizes only these refs; workflow_dispatch has no branch filter.
38+
enable-vuln-scan: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/pull-request/') }}
39+
enable-malware-scan: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/pull-request/') }}
40+
enable-sast-scan: true
41+
secret-runs-on: linux-amd64-cpu4
42+
# Set failure_policy explicitly so enforcement can't drift with upstream defaults.
43+
# unverified: fail on verified/live secrets (183); warn on unverified (185) [default]
44+
# strict: fail on any finding (verified or unverified)
45+
# all: warn only; never fail the job on findings
46+
secret-failure-policy: unverified
47+
# Both resolve to build-mode none, so no toolchain is needed. CodeQL never fails the job.
48+
sast-languages: '["python","c-cpp"]'
49+
# Must be an Actions *variable*: a reusable workflow's inputs cannot read secrets.
50+
nspect-id: ${{ vars.NSPECT_ID }}
51+
vuln-runs-on: linux-amd64-cpu4
52+
# report-only (default): findings warn. fail-on-vulnerability: any finding fails. Errors always fail.
53+
vuln-failure-policy: report-only
54+
vuln-upload-report: true
55+
malware-runs-on: linux-amd64-cpu4
56+
# strict (default): SUSPICIOUS fails too. malicious-only: it only warns. MALICIOUS always fails.
57+
malware-failure-policy: strict

‎.pre-commit-config.yaml‎

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@ ci:
66
autoupdate_branch: ''
77
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
88
autoupdate_schedule: quarterly
9-
skip: [secret-scan-trufflehog]
9+
skip: [secret-scan-trufflehog, guardwords-scan-code-scanning]
1010
submodules: false
1111

12+
# Generated and signed by NVSkills CI. Any change to these files invalidates
13+
# the skill signature, so no hook may rewrite them.
14+
exclude: ^skills/[^/]+/(skill\.oms\.sig|skill-card\.md|BENCHMARK\.md)$
15+
1216
repos:
1317
# Runs first so a leaked credential blocks the commit before any formatter runs.
1418
# Self-installing: the hook downloads a pinned, checksum-verified trufflehog on
1519
# first use (no manual install). Skipped on pre-commit.ci; Pulse CI enforces server-side.
20+
# GuardWords needs NVIDIA's internal client and network; it skips with a notice elsewhere.
1621
- repo: https://github.com/NVIDIA/security-workflows
17-
rev: v0.2.0
22+
rev: d8189f3176942de7ffe2c48bcd7bb5fbdee2dd15 # frozen: v0.6.0
1823
hooks:
1924
- id: secret-scan-trufflehog
25+
- id: guardwords-scan-code-scanning
2026

2127
- repo: https://github.com/pre-commit/pre-commit-hooks
2228
rev: v6.0.0
@@ -79,21 +85,7 @@ repos:
7985
rev: v0.15.20
8086
hooks:
8187
- id: ruff # linter
82-
exclude: ^python/cuda_coop/
8388
- id: ruff-format # formatter
84-
exclude: ^python/cuda_coop/
85-
86-
# Use the newer Ruff rules for `cuda.coop`.
87-
- repo: https://github.com/astral-sh/ruff-pre-commit
88-
rev: v0.16.9
89-
hooks:
90-
- id: ruff-check
91-
name: ruff check (cuda.coop)
92-
files: ^python/cuda_coop/
93-
- id: ruff-format
94-
name: ruff format (cuda.coop)
95-
files: ^python/cuda_coop/
96-
types_or: [python, pyi, jupyter]
9789

9890
# CMake formatting
9991
- repo: https://github.com/BlankSpruce/gersemi

‎.vscode/launch.json‎

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,5 @@
11
{
22
"configurations": [
3-
{
4-
"console": "integratedTerminal",
5-
"cwd": "${workspaceFolder}",
6-
"env": {
7-
"CUDA_COOP_CCCL_ROOT": "${workspaceFolder}",
8-
"CUDA_COOP_DISABLE_AUTO_DSL_REGISTRATION": "0",
9-
"CUDA_COOP_ENABLE_CACHE": "0",
10-
"CUDA_COOP_SOURCE_DUMP_DIR": "${workspaceFolder}/build/coop-debug-sources",
11-
"CUDA_VISIBLE_DEVICES": "0",
12-
"PYTHONPATH": "${workspaceFolder}/python/cuda_coop"
13-
},
14-
"justMyCode": false,
15-
"name": "cuda.coop: Debugger walkthrough",
16-
"program": "${workspaceFolder}/docs/python/coop/debugger_walkthrough.py",
17-
"request": "launch",
18-
"type": "debugpy"
19-
},
20-
{
21-
"console": "integratedTerminal",
22-
"cwd": "${workspaceFolder}",
23-
"env": {
24-
"CUDA_COOP_CCCL_ROOT": "${workspaceFolder}",
25-
"CUDA_COOP_DISABLE_AUTO_DSL_REGISTRATION": "0",
26-
"CUDA_COOP_ENABLE_CACHE": "0",
27-
"CUDA_COOP_SOURCE_DUMP_DIR": "${workspaceFolder}/build/coop-debug-sources",
28-
"CUDA_VISIBLE_DEVICES": "0",
29-
"PYTHONPATH": "${workspaceFolder}/python/cuda_coop"
30-
},
31-
"justMyCode": false,
32-
"name": "cuda.coop: Debug active Python file",
33-
"program": "${file}",
34-
"request": "launch",
35-
"type": "debugpy"
36-
},
373
{
384
"cwd": "${workspaceFolder}",
395
"initCommands": [

‎AGENTS.md‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
This document provides guidelines for building, testing, and contributing to the CCCL repository. It is primarily written for agentic AIs, but the information is also useful for CCCL developers.
44

5-
For `cuda.coop` work, including `python/cuda_coop/**` and
6-
`docs/python/coop*`, read [python/cuda_coop/AGENTS.md](python/cuda_coop/AGENTS.md)
7-
and apply its API, behavior, and example conventions.
8-
95
---
106

117
## Overview

‎CMakePresets.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@
580580
"targets": [
581581
"libcudacxx.test.atomics.ptx",
582582
"libcudacxx.test.atomics.sass",
583+
"libcudacxx.test.cmath.ptx",
583584
"libcudacxx.test.simd.ptx",
584585
"libcudacxx.test.warp.sass",
585586
"libcudacxx.test.simd.sass"
@@ -980,7 +981,8 @@
980981
"inherits": "thrust",
981982
"filter": {
982983
"exclude": {
983-
"name": "^thrust.*\\.cuda\\..*$"
984+
"name": "^thrust.*\\.cuda\\..*$",
985+
"label": "^cuda_smoke$"
984986
}
985987
}
986988
},

‎benchmarks/scripts/cccl/bench/smoke.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,16 @@
6969
"Elements{io}[pow2]": ["28"],
7070
"MaxSegSize[pow2]": ["4", "8"],
7171
},
72-
"cub.bench.segmented_reduce.sum": {
72+
"cub.bench.segmented_reduce.fixed_size_sum": {
7373
"T{ct}": ["I8", "I16", "I32", "I64", "C32"],
7474
"Elements{io}[pow2]": ["28"],
7575
},
76-
"cub.bench.segmented_reduce.variable_sum": {
76+
"cub.bench.segmented_reduce.variable_with_guarantee_sum": {
7777
"T{ct}": ["I32", "F64"],
7878
"OffsetT{ct}": ["I32"],
7979
"Elements{io}[pow2]": ["28"],
8080
},
81-
"cub.bench.segmented_reduce.variable_argmax": {
81+
"cub.bench.segmented_reduce.variable_with_guarantee_argmax": {
8282
"T{ct}": ["I32", "F64"],
8383
"OffsetT{ct}": ["I32"],
8484
"Elements{io}[pow2]": ["28"],
@@ -308,12 +308,12 @@
308308
"cub.bench.segmented_sort.keys": {
309309
"small": {"MaxSegmentSize[pow2]": ["8"]},
310310
},
311-
"cub.bench.segmented_reduce.sum": {
311+
"cub.bench.segmented_reduce.fixed_size_sum": {
312312
"small": {"SegmentSize[pow2]": ["4"]},
313313
"medium": {"SegmentSize[pow2]": ["8"]},
314314
"large": {"SegmentSize[pow2]": ["12"]},
315315
},
316-
"cub.bench.segmented_reduce.variable_sum": {
316+
"cub.bench.segmented_reduce.variable_with_guarantee_sum": {
317317
"variable_small_dynamic": {
318318
"MaxSegmentSize[pow2]": ["4"],
319319
"GuaranteedMaxSegSize[pow2]": ["4"],
@@ -327,7 +327,7 @@
327327
"GuaranteedMaxSegSize[pow2]": ["12"],
328328
},
329329
},
330-
"cub.bench.segmented_reduce.variable_argmax": {
330+
"cub.bench.segmented_reduce.variable_with_guarantee_argmax": {
331331
"variable_small_dynamic": {
332332
"MaxSegmentSize[pow2]": ["4"],
333333
"GuaranteedMaxSegSize[pow2]": ["4"],

‎benchmarks/scripts/compare.py‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
import argparse
44
import os
55

6+
# mypy targets Python 3.10 (for cuda.compute), which lacks StrEnum
7+
from enum import StrEnum # type: ignore[attr-defined]
8+
69
import cccl
710
import numpy as np
811
import pandas as pd
9-
from colorama import Fore
1012

1113

1214
def get_filenames_map(arr):
@@ -100,6 +102,12 @@ def parse_args():
100102
slower_count = 0
101103

102104

105+
class Emoji(StrEnum):
106+
BLUE = "\U0001f535"
107+
GREEN = "\U0001f7e2"
108+
RED = "\U0001f534"
109+
110+
103111
def status(frac_diff, noise_ref, noise_cmp):
104112
global config_count
105113
global pass_count
@@ -109,13 +117,13 @@ def status(frac_diff, noise_ref, noise_cmp):
109117
min_noise = min(noise_ref, noise_cmp)
110118
if abs(frac_diff) <= min_noise:
111119
pass_count += 1
112-
return Fore.BLUE + "SAME" + Fore.RESET
120+
return f"{Emoji.BLUE} SAME"
113121
if frac_diff < 0:
114122
faster_count += 1
115-
return Fore.GREEN + "FAST" + Fore.RESET
123+
return f"{Emoji.GREEN} FAST"
116124
if frac_diff > 0:
117125
slower_count += 1
118-
return Fore.RED + "SLOW" + Fore.RESET
126+
return f"{Emoji.RED} SLOW"
119127

120128

121129
def compare():

0 commit comments

Comments
 (0)