Skip to content

[infra] Add clang-22 CUDA build job to nightly/weekly CI#8888

Open
davebayer wants to merge 3 commits into
NVIDIA:mainfrom
davebayer:add_clang_cuda22
Open

[infra] Add clang-22 CUDA build job to nightly/weekly CI#8888
davebayer wants to merge 3 commits into
NVIDIA:mainfrom
davebayer:add_clang_cuda22

Conversation

@davebayer
Copy link
Copy Markdown
Contributor

@davebayer davebayer commented May 9, 2026

LLVM 22.1 is out, so I thought we could add it to our nightly/weekly CI runs as clang-cuda-next run to catch potential issues early. It brings CUDA 12.9 support.

Waiting for llvm22 + cuda-ext devcontainers: rapidsai/devcontainers#695

@davebayer davebayer requested a review from a team as a code owner May 9, 2026 07:04
@davebayer davebayer requested a review from jrhemstad May 9, 2026 07:04
@github-project-automation github-project-automation Bot moved this to Todo in CCCL May 9, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL May 9, 2026
@github-actions

This comment has been minimized.

@davebayer davebayer force-pushed the add_clang_cuda22 branch from fa2cde8 to 1d4d5b2 Compare May 9, 2026 07:20
@github-actions

This comment has been minimized.

@davebayer davebayer changed the title [infra] Add clang-22 build job to nightly/weekly CI [infra] Add clang-22 CUDA build job to nightly/weekly CI May 11, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bc0b52c2-7dad-40d0-bd88-e1f34c731b8c

📥 Commits

Reviewing files that changed from the base of the PR and between 48998ef and 46769aa.

📒 Files selected for processing (5)
  • cub/cub/agent/agent_histogram.cuh
  • cub/cub/device/dispatch/dispatch_histogram.cuh
  • cub/cub/util_device.cuh
  • cub/test/CMakeLists.txt
  • libcudacxx/test/libcudacxx/std/utilities/memory/smartptr/unique.ptr/unique.ptr.create/make_unique_for_overwrite.pass.cpp
✅ Files skipped from review due to trivial changes (2)
  • cub/test/CMakeLists.txt
  • cub/cub/agent/agent_histogram.cuh

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added devcontainer configurations for CUDA 12.9, 12.9ext, and 13.2 with LLVM 22 to standardize development environments.
  • Chores

    • Extended CI matrix to include clang-cuda-next and LLVM 22 toolchain combinations and updated devcontainer mappings.
  • Bug Fixes

    • Improved std::span deduction attributes, adjusted CUDA architecture dispatch, added runtime-check wrapping, enforced a histogram vector-size constraint, and suppressed a Clang CUDA warning in tests.
  • Tests

    • Reworked make_unique_for_overwrite detection to a SFINAE-based trait for more robust test coverage.

important:

Walkthrough

Adds three LLVM‑22 Dev Container definitions (CUDA 12.9, 12.9ext, 13.2), extends CI matrix/devcontainer aliasing for clang-cuda-next and clang‑22, and applies small libcudacxx test and CUB compile-time/verification adjustments.

important:

Changes

LLVM 22 Devcontainers and clang-cuda-next CI Support

Layer / File(s) Summary
LLVM 22 devcontainers for CUDA 12.9, 12.9ext, and 13.2
.devcontainer/cuda12.9-llvm22/devcontainer.json, .devcontainer/cuda12.9ext-llvm22/devcontainer.json, .devcontainer/cuda13.2-llvm22/devcontainer.json
Three new devcontainer definitions add container lifecycle/runArgs, initialization and post-attach commands (WSL/Codespaces conditionals), SCCache/AWS/toolchain/container env, workspace mounts and persistent build/wheelhouse volumes, and VS Code extension/editor/clangd/clang-format settings.
CI matrix clang-cuda-next wiring and toolchain aliases
ci/matrix.yaml
Adds clang-cuda-next entries to override/nightly/weekly workflows with a fixed SM list; adds dc_ext entry for CTK 12.X with clang22; expands CTK 12.9 aliases to include clang-cuda-next; adds clang 22 host_compiler alias cuda-next.
libcudacxx span deduction-guide attributes
libcudacxx/include/cuda/std/span
Two std::array-based span deduction guides updated to use _CCCL_DEDUCTION_GUIDE_ATTRIBUTES instead of _CCCL_HOST_DEVICE.
CUB compile-time arch dispatch tweak
cub/cub/util_device.cuh
ChainedPolicy::Invoke now prepends 0 to the instantiated architecture integer pack for the Clang CUDA >=22 __CUDA_ARCH_LIST__ branch.
CUB histogram safety
cub/cub/agent/agent_histogram.cuh, cub/cub/device/dispatch/dispatch_histogram.cuh
Enforce VEC_SIZE ∈ {1,2,4} via static_assert and check MaxPolicy::Invoke return with _CCCL_VERIFY(... == cudaSuccess, ...).
CUB test compile flags
cub/test/CMakeLists.txt
Conditionally add -Wno-pass-failed for tests when building with Clang CUDA compiler >= 22.0.0.
libcudacxx test trait modernization
libcudacxx/test/.../make_unique_for_overwrite.pass.cpp
Replace concept-based HasMakeUniqueForOverwrite with a SFINAE void_t/decltype trait and add type_traits include.

Suggested reviewers:

  • bdice
  • bernhardmgruber

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 07e1774d-884b-47d6-b073-04cffb238887

📥 Commits

Reviewing files that changed from the base of the PR and between e49bdfa and cfac25f.

📒 Files selected for processing (4)
  • .devcontainer/cuda12.9-llvm22/devcontainer.json
  • .devcontainer/cuda12.9ext-llvm22/devcontainer.json
  • .devcontainer/cuda13.2-llvm22/devcontainer.json
  • ci/matrix.yaml

Comment thread .devcontainer/cuda12.9ext-llvm22/devcontainer.json
Comment thread ci/matrix.yaml
@github-actions

This comment has been minimized.

@davebayer davebayer requested a review from a team as a code owner May 13, 2026 19:24
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.devcontainer/cuda12.9-llvm22/devcontainer.json (1)

41-42: ⚡ Quick win

suggestion: Make timezone mounting host-portable.

Line 41 binds /etc/timezone, which is absent on some hosts (notably macOS), and can block container startup. Prefer relying on /etc/localtime only, or gate /etc/timezone by host type in generation logic.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ba867447-8cfa-4c48-b786-93c75c6c110b

📥 Commits

Reviewing files that changed from the base of the PR and between cfac25f and df91fd6.

📒 Files selected for processing (5)
  • .devcontainer/cuda12.9-llvm22/devcontainer.json
  • .devcontainer/cuda12.9ext-llvm22/devcontainer.json
  • .devcontainer/cuda13.2-llvm22/devcontainer.json
  • ci/matrix.yaml
  • libcudacxx/include/cuda/std/span
✅ Files skipped from review due to trivial changes (1)
  • libcudacxx/include/cuda/std/span
🚧 Files skipped from review as they are similar to previous changes (3)
  • .devcontainer/cuda13.2-llvm22/devcontainer.json
  • .devcontainer/cuda12.9ext-llvm22/devcontainer.json
  • ci/matrix.yaml

Comment thread .devcontainer/cuda12.9-llvm22/devcontainer.json
@github-actions

This comment has been minimized.

@davebayer davebayer requested a review from a team as a code owner May 13, 2026 21:09
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
cub/cub/util_device.cuh (1)

783-785: 💤 Low value

suggestion: The 0 sentinel in the variadic pack guards against empty macro expansion and ensures the fold expression is non-empty. While functionally harmless, a comment explaining this defensive measure would clarify the intent for maintainers.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f67611ff-f0b1-45f0-a428-47047edfaab3

📥 Commits

Reviewing files that changed from the base of the PR and between df91fd6 and 48998ef.

📒 Files selected for processing (1)
  • cub/cub/util_device.cuh

@github-actions

This comment has been minimized.

@davebayer davebayer requested a review from a team as a code owner May 14, 2026 07:39
@github-actions
Copy link
Copy Markdown
Contributor

😬 CI Workflow Results

🟥 Finished in 29m 17s: Pass: 66%/12 | Total: 3h 20m | Max: 29m 12s | Hits: 97%/17693

See results here.

#if _CCCL_HAS_HOST_STD_LIB()
template <class _Tp, size_t _Sz>
_CCCL_HOST_DEVICE span(::std::array<_Tp, _Sz>&) -> span<_Tp, _Sz>;
_CCCL_DEDUCTION_GUIDE_ATTRIBUTES span(::std::array<_Tp, _Sz>&) -> span<_Tp, _Sz>;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of other places where this is just _CCCL_API (for example the ranges). Is that a problem?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed all deduction guide attributes in #6964, so none should use _CCCL_HOST_DEVICE anymore :)

Comment on lines -32 to -33
_CCCL_CONCEPT HasMakeUniqueForOverwrite = _CCCL_REQUIRES_EXPR((T, variadic Args), T t, Args&&... args)(
(cuda::std::make_unique_for_overwrite<T>(cuda::std::forward<Args>(args)...)));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the issue with the original concept macro formulation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-22 in CUDA mode failed to evaluate it correctly in C++17 for some reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

4 participants