Skip to content

libcu++: atomics SASS FileCheck suite for basic atomic operations - #10722

Open
griwes wants to merge 11 commits into
NVIDIA:mainfrom
griwes:feature/atomic-sass-basic-operations
Open

libcu++: atomics SASS FileCheck suite for basic atomic operations#10722
griwes wants to merge 11 commits into
NVIDIA:mainfrom
griwes:feature/atomic-sass-basic-operations

Conversation

@griwes

@griwes griwes commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

Resolves #10664.

This PR introduces a first SASS FileCheck suite for the atomic codegen, which includes a wide coverage of volatile and non-volatile codegen results for load, store, exchange, compare_exchange_weak, and compare_exchange_strong. It currently also incorporates the contents of #10671 and #10678, which should be merged first.

This PR is larger in scope than follow ups for other operations will be; this is because it also establishes the general shape of the SASS FileCheck suite for atomics, as well as the new CI jobs for libcu++ codegen testing, separated from regular libcu++ testing jobs.

The volatile changes will be removed from this PR once #10727 is merged.

Note for reviewers: the relevant changes to be reviewed within this PR are in the last three commits. The rest is contained in the aforementioned other PRs.

This PR introduces a non-trivial number of new CI jobs, though most of them are themselves quite trivial. Here's a breakdown of the relevant numbers:

  1. Total new jobs added: 66
  2. Total libcu++ jobs before: 63
  3. Total libcu++ jobs after: 129
  4. Total jobs at large before: 527
  5. Total jobs at large after: 593

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@griwes
griwes requested review from a team as code owners August 7, 2026 23:55
@griwes
griwes requested a review from gonidelis August 7, 2026 23:55
@griwes
griwes requested review from Jacobfaib and jrhemstad August 7, 2026 23:55
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Aug 7, 2026
@copy-pr-bot

copy-pr-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Aug 7, 2026
@griwes

griwes commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test eacf3c3

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added configurable CUDA PTX and SASS code-generation tests for atomic and SIMD operations across architectures, data types, scopes, and memory orders.
    • Expanded CI coverage across supported CUDA versions and configured code-generation targets.
    • Added support for selecting individual code-generation test targets.
  • Bug Fixes

    • Improved atomic_ref handling for cv-qualified types, including consistent unqualified value_type behavior and volatile support.
    • Generalized code-generation checks across multiple GPU architectures and compiler configurations.

Walkthrough

The change adds CV-unqualified atomic_ref value handling, shared PTX/SASS codegen infrastructure, broad atomic SASS FileCheck coverage, configurable SIMD and atomic suites, and CI matrix dispatch for individual codegen targets.

Changes

Atomic codegen and API

Layer / File(s) Summary
CV-unqualified atomic reference API
libcudacxx/include/cuda/..., libcudacxx/test/libcudacxx/...
atomic_ref removes top-level CV qualifiers from value_type, operation parameters, dispatch returns, and trivial-copyability checks. A volatile atomic_ref test covers core operations and scopes.
Shared codegen infrastructure
libcudacxx/test/cmake/CodegenTest.cmake, libcudacxx/test/codegen/dump_and_check.bash, libcudacxx/test/CMakeLists.txt
Codegen configuration now supports concrete architectures, variants, combined FileCheck prefixes, explicit PTX/SASS dump modes, and selected atomic or SIMD suites.
Atomic PTX and SASS checks
libcudacxx/test/atomic_codegen/*
PTX checks accept multiple SM targets. New SASS checks cover load, store, exchange, and compare-exchange operations across types, scopes, memory orders, volatile forms, and 128-bit cases.
SIMD codegen registration
libcudacxx/test/simd_codegen/*
SIMD PTX and SASS targets use shared architecture discovery and conditional registration. Architecture-specific prefixes and pre-CUDA 13.2 exclusions are applied.
CI codegen selection
CMakePresets.json, ci/build_libcudacxx.sh, ci/matrix.yaml, .github/actions/workflow-build/build-workflow.py
CI defines codegen presets and matrix targets, accepts codegen_target, validates target values, and dispatches target-specific CMake builds.

Assessment against linked issues

Objective Addressed Explanation
Add SASS FileCheck coverage for load, store, exchange, and compare-exchange operations across relevant atomic types

Possibly related PRs

Suggested reviewers: jacobfaib, wmaxey, gonidelis

Mergeability Score: 🟡 Moderate · up to fb472

The new atomic code-generation tests can target unsupported architectures for 128-bit atomic_ref load/store operations, causing CI failures before the expected assembly is produced. The architecture gating should be corrected or explicitly accepted before merging.


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

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 8

🧹 Nitpick comments (4)
libcudacxx/test/cmake/CodegenTest.cmake (2)

359-372: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

suggestion: The variant and prefix detection reads the test source at configure time, but nothing marks the source as a configure dependency. If a developer edits %PARAM% lines or adds a new SASS check prefix, CMake does not re-run and the generated targets go stale. Add the test files to CMAKE_CONFIGURE_DEPENDS.

   foreach (test_path IN LISTS arg_TESTS)
     file(READ "${test_path}" test_contents)
+    set_property(
+      DIRECTORY
+      APPEND
+      PROPERTY CMAKE_CONFIGURE_DEPENDS "${test_path}"
+    )

245-245: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

suggestion: Handle -Wno-comment per CUDA compiler. Pass it through -Xcompiler=-Wno-comment for NVCC, keep the direct flag for Clang-CUDA, and build representative PTX and SASS targets with both compilers.

libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_apis.cu (2)

17-17: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

suggestion: Use angle-bracket syntax for atomic_codegen_helpers.h. Ensure the SASS test target exposes this directory as an include directory before changing the includes.

  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_apis.cu#L17-L17: Change the local helper include to angle-bracket syntax.
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_apis.cu#L16-L16: Change the local helper include to angle-bracket syntax.
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_8_16_atomic.cu#L20-L20: Change the local helper include to angle-bracket syntax.
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_8_16_atomic_ref.cu#L20-L20: Change the local helper include to angle-bracket syntax.
  • libcudacxx/test/atomic_codegen/sass/load_volatile_apis.cu#L16-L16: Change the local helper include to angle-bracket syntax.
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types_128_atomic_ref.cu#L17-L17: Change the local helper include to angle-bracket syntax.
  • libcudacxx/test/atomic_codegen/sass/store_volatile_apis.cu#L16-L16: Change the local helper include to angle-bracket syntax.
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types.cu#L17-L17: Change the local helper include to angle-bracket syntax.
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_128_atomic_ref.cu#L17-L17: Change the local helper include to angle-bracket syntax.
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_8_16_atomic.cu#L20-L20: Change the local helper include to angle-bracket syntax.
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_8_16_atomic_ref.cu#L20-L20: Change the local helper include to angle-bracket syntax.

As per coding guidelines, “All header inclusions must use angle-bracket syntax.”

Source: Coding guidelines


19-21: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

suggestion: Declare each unmodified by-value operand const.

  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_apis.cu#L19-L21: Declare desired as int32_t const.
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_apis.cu#L18-L20: Declare value as int32_t const.
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_8_16_atomic.cu#L22-L24: Declare value as TYPE const.
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_8_16_atomic_ref.cu#L22-L24: Declare value as TYPE const.
  • libcudacxx/test/atomic_codegen/sass/store_volatile_apis.cu#L18-L20: Declare value as int32_t const.
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types.cu#L19-L21: Declare value as TYPE const.
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_128_atomic_ref.cu#L19-L21: Declare value as TYPE const.
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_8_16_atomic.cu#L22-L24: Declare value as TYPE const.
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_8_16_atomic_ref.cu#L22-L24: Declare value as TYPE const.

As per coding guidelines, “All variables that are not modified must be declared const.”

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d6ae497f-de44-4f9c-b202-39d99adc1800

📥 Commits

Reviewing files that changed from the base of the PR and between 8b0b7eb and eacf3c3.

📒 Files selected for processing (78)
  • .github/actions/workflow-build/build-workflow.py
  • CMakePresets.json
  • ci/build_libcudacxx.sh
  • ci/matrix.yaml
  • cmake/CCCLTestParams.cmake
  • cub/test/test_param_tuple_fail.cu
  • docs/cccl/development/testing.rst
  • libcudacxx/codegen/generators/definitions.h
  • libcudacxx/codegen/generators/ld_st.h
  • libcudacxx/include/cuda/__atomic/atomic.h
  • libcudacxx/include/cuda/std/__atomic/api/common.h
  • libcudacxx/include/cuda/std/__atomic/api/owned.h
  • libcudacxx/include/cuda/std/__atomic/api/reference.h
  • libcudacxx/include/cuda/std/__atomic/functions/cuda_ptx_derived.h
  • libcudacxx/include/cuda/std/__atomic/functions/cuda_ptx_generated.h
  • libcudacxx/include/cuda/std/__atomic/types/base.h
  • libcudacxx/include/cuda/std/atomic
  • libcudacxx/test/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/atomic_add_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_cas_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_exch_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_load_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_store_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_sub_non_volatile.cu
  • libcudacxx/test/atomic_codegen/dump_and_check.bash
  • libcudacxx/test/atomic_codegen/sass/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/sass/atomic_codegen_helpers.h
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_apis.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_single_order.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_apis.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_apis.cu
  • libcudacxx/test/atomic_codegen/sass/load_types.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_apis.cu
  • libcudacxx/test/atomic_codegen/sass/store_types.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/cmake/CodegenTest.cmake
  • libcudacxx/test/codegen/dump_and_check.bash
  • libcudacxx/test/libcudacxx/std/atomics/atomics.types.generic/atomic_ref_volatile.pass.cpp
  • libcudacxx/test/simd_codegen/CMakeLists.txt
  • libcudacxx/test/simd_codegen/load_store/CMakeLists.txt
💤 Files with no reviewable changes (2)
  • libcudacxx/test/atomic_codegen/dump_and_check.bash
  • libcudacxx/include/cuda/std/__atomic/functions/cuda_ptx_derived.h

Comment thread .github/actions/workflow-build/build-workflow.py
Comment thread libcudacxx/test/atomic_codegen/sass/CMakeLists.txt
Comment thread libcudacxx/test/atomic_codegen/sass/compare_exchange_apis.cu
Comment thread libcudacxx/test/atomic_codegen/sass/store_apis.cu Outdated
Comment thread libcudacxx/test/atomic_codegen/sass/store_types_128_atomic_ref.cu Outdated
Comment thread libcudacxx/test/atomic_codegen/sass/store_types_8_16_atomic.cu
Comment thread libcudacxx/test/cmake/CodegenTest.cmake
@griwes
griwes force-pushed the feature/atomic-sass-basic-operations branch from eacf3c3 to ea162db Compare August 8, 2026 00:09
@github-actions

This comment has been minimized.

@griwes
griwes requested a review from wmaxey August 8, 2026 00:16
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@coderabbitai coderabbitai Bot left a comment

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
libcudacxx/test/cmake/CodegenTest.cmake (1)

165-179: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

important: Preserve numeric -PLUS checks for a and f architectures. Line 171 clears SM100-PLUS for 100a and 100f. The later registration logic then skips a test that has only this prefix. Extract the numeric architecture before the comparison instead of discarding plus_prefixes.

+  string(REGEX MATCH "^[0-9]+" arch_number "${arch}")
-  if ("${arch}" MATCHES "[af]$")
-    set(plus_prefixes)
-  endif()
   foreach (plus_prefix IN LISTS plus_prefixes)
     string(REGEX REPLACE ".*SM([0-9]+)-PLUS.*" "\\1" plus_arch "${plus_prefix}")
-    if (arch GREATER_EQUAL plus_arch)
+    if (arch_number GREATER_EQUAL plus_arch)
       list(APPEND check_prefixes "SM${plus_arch}-PLUS")
     endif()
   endforeach()

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3a4335fd-7a95-4795-b532-6a0bd14b9877

📥 Commits

Reviewing files that changed from the base of the PR and between eacf3c3 and cc657fb.

📒 Files selected for processing (15)
  • .github/actions/workflow-build/build-workflow.py
  • ci/matrix.yaml
  • libcudacxx/include/cuda/std/__atomic/types/reference.h
  • libcudacxx/test/atomic_codegen/atomic_add_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_exch_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_load_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_sub_non_volatile.cu
  • libcudacxx/test/atomic_codegen/sass/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_apis.cu
  • libcudacxx/test/atomic_codegen/sass/store_types.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_128_atomic_ref.cu
  • libcudacxx/test/cmake/CodegenTest.cmake
🚧 Files skipped from review as they are similar to previous changes (13)
  • libcudacxx/test/atomic_codegen/atomic_load_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_sub_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_exch_non_volatile.cu
  • libcudacxx/test/atomic_codegen/sass/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/sass/store_types.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/atomic_add_non_volatile.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_8_16_atomic_ref.cu
  • ci/matrix.yaml
  • .github/actions/workflow-build/build-workflow.py
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_apis.cu

@wmaxey

wmaxey commented Aug 10, 2026

Copy link
Copy Markdown
Member

And also sneaks in 8bit ld/st. This looks good so far. I'm wary that the SASS checks will ever be clean, but maybe if we make them loose enough with the regex it'll work.

@griwes

griwes commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Right. I did a couple of obvious codegen fixes too, I will edit the description to point them out.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment thread ci/matrix.yaml Outdated
@griwes

griwes commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Please split out the changes only relevant for this PR as it makes it difficult to review cleanly. Or consider using a stacked PR.

I'm about to push a version that does not include the contents of #10678, since that is now merged. Please further specify what you'd like separated, if anything.

@jrhemstad

Copy link
Copy Markdown
Collaborator

I'm about to push a version that does not include the contents of #10678, since that is now merged. Please further specify what you'd like separated, if anything.

Keep the changes relevant to just the PR title/linked issue of adding the SASS FileCheck suite and any changes to the actual code should be made in other PRs.

@griwes
griwes force-pushed the feature/atomic-sass-basic-operations branch from cac19be to 94d21a7 Compare August 12, 2026 17:39
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

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.

🔇 Additional comments (5)
libcudacxx/test/codegen/dump_and_check.bash (2)

9-12: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

⚠️ Unverified finding
Sandbox verification was unavailable.

important: Line 9 treats the first FileCheck option as a cuobjdump mode when the caller omits the optional mode. For example, --enable-var-scope becomes the cuobjdump argument and the command fails. Consume an argument only when it is a supported dump mode, or require an explicit separator before FileCheck options.

-dump_mode="${1:---dump-ptx}"
-if (( $# > 0 )); then
-  shift
-fi
+dump_mode="--dump-ptx"
+case "${1-}" in
+  --dump-ptx|--dump-sass)
+    dump_mode="${1}"
+    shift
+    ;;
+esac

16-25: LGTM!

libcudacxx/test/atomic_codegen/sass/exchange_types_128_atomic_ref.cu (1)

1-40: LGTM!

libcudacxx/test/atomic_codegen/sass/store_types_8_16_atomic.cu (1)

1-38: LGTM!

ci/matrix.yaml (1)

115-124: 🗄️ Data Integrity & Integration

⚠️ Unverified finding
Sandbox verification was unavailable.

important: Verify the codegen_target contract end to end.

These entries pass codegen_target as both a scalar and a list. Confirm that the workflow expands list values into separate jobs, forwards each selected value to ci/build_libcudacxx.sh, and resolves it through codegen_targets to the matching CMake target. Otherwise a job can run all suites, pass a list as one selector, or ignore the selection.

As per path instructions, validate CI matrix correctness and targeted build/test behavior.

Also applies to: 299-310, 420-431, 646-646, 696-701, 829-833


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 43d1eac1-6afc-412e-9416-52390195b0c8

📥 Commits

Reviewing files that changed from the base of the PR and between a5f6c04 and 94d21a7.

📒 Files selected for processing (75)
  • .github/actions/workflow-build/build-workflow.py
  • CMakePresets.json
  • ci/build_libcudacxx.sh
  • ci/matrix.yaml
  • libcudacxx/codegen/generators/definitions.h
  • libcudacxx/codegen/generators/ld_st.h
  • libcudacxx/include/cuda/__atomic/atomic.h
  • libcudacxx/include/cuda/std/__atomic/api/common.h
  • libcudacxx/include/cuda/std/__atomic/api/owned.h
  • libcudacxx/include/cuda/std/__atomic/api/reference.h
  • libcudacxx/include/cuda/std/__atomic/functions/cuda_ptx_derived.h
  • libcudacxx/include/cuda/std/__atomic/functions/cuda_ptx_generated.h
  • libcudacxx/include/cuda/std/__atomic/types/base.h
  • libcudacxx/include/cuda/std/__atomic/types/reference.h
  • libcudacxx/include/cuda/std/atomic
  • libcudacxx/test/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/atomic_add_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_cas_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_exch_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_load_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_store_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_sub_non_volatile.cu
  • libcudacxx/test/atomic_codegen/sass/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/sass/atomic_codegen_helpers.h
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_apis.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_single_order.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_apis.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_apis.cu
  • libcudacxx/test/atomic_codegen/sass/load_types.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_apis.cu
  • libcudacxx/test/atomic_codegen/sass/store_types.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/cmake/CodegenTest.cmake
  • libcudacxx/test/codegen/dump_and_check.bash
  • libcudacxx/test/libcudacxx/std/atomics/atomics.types.generic/atomic_ref_volatile.pass.cpp
  • libcudacxx/test/simd_codegen/CMakeLists.txt
  • libcudacxx/test/simd_codegen/load_store/CMakeLists.txt
💤 Files with no reviewable changes (1)
  • libcudacxx/include/cuda/std/__atomic/functions/cuda_ptx_derived.h
🚧 Files skipped from review as they are similar to previous changes (70)
  • libcudacxx/include/cuda/std/atomic
  • libcudacxx/codegen/generators/definitions.h
  • libcudacxx/include/cuda/std/__atomic/api/owned.h
  • ci/build_libcudacxx.sh
  • libcudacxx/test/atomic_codegen/atomic_add_non_volatile.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/atomic_cas_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_store_non_volatile.cu
  • libcudacxx/test/atomic_codegen/atomic_exch_non_volatile.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/include/cuda/__atomic/atomic.h
  • libcudacxx/test/atomic_codegen/sass/exchange_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_types.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/atomic_sub_non_volatile.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/atomic_load_non_volatile.cu
  • libcudacxx/include/cuda/std/__atomic/types/reference.h
  • libcudacxx/test/atomic_codegen/sass/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_single_order.cu
  • libcudacxx/test/atomic_codegen/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/sass/load_apis.cu
  • libcudacxx/test/simd_codegen/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_apis.cu
  • libcudacxx/test/simd_codegen/load_store/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types.cu
  • libcudacxx/test/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/sass/load_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_apis.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/atomic_codegen_helpers.h
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/include/cuda/std/__atomic/api/reference.h
  • libcudacxx/test/libcudacxx/std/atomics/atomics.types.generic/atomic_ref_volatile.pass.cpp
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_apis.cu
  • .github/actions/workflow-build/build-workflow.py
  • libcudacxx/include/cuda/std/__atomic/api/common.h
  • libcudacxx/include/cuda/std/__atomic/types/base.h
  • libcudacxx/codegen/generators/ld_st.h
  • libcudacxx/test/atomic_codegen/sass/store_volatile_apis.cu
  • libcudacxx/test/cmake/CodegenTest.cmake
  • CMakePresets.json
  • libcudacxx/test/atomic_codegen/sass/load_types.cu
  • libcudacxx/include/cuda/std/__atomic/functions/cuda_ptx_generated.h
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_apis.cu

Comment thread libcudacxx/test/atomic_codegen/sass/exchange_apis.cu Outdated
Comment thread libcudacxx/test/atomic_codegen/sass/load_apis.cu Outdated
@jrhemstad
jrhemstad requested a review from gonzalobg August 12, 2026 18:11
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@griwes griwes moved this from In Progress to Blocked in CCCL Aug 12, 2026
@griwes
griwes force-pushed the feature/atomic-sass-basic-operations branch from 94d21a7 to fb4728b Compare August 13, 2026 01:18

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 2

🧹 Nitpick comments (2)
libcudacxx/test/cmake/CodegenTest.cmake (1)

256-279: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

suggestion: standalone_prefixes can become empty when every active prefix is only a PREFIX_COMBINE component and no combination is active. Then check_suffix is empty, the check target name degrades to <path>..check, and filecheck_prefixes may also be empty, which makes FileCheck fail with an unhelpful error. Add a guard that reports the test path and the offending prefix set at configure time.

Also applies to: 302-309

libcudacxx/test/atomic_codegen/sass/exchange_apis.cu (1)

37-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

suggestion: The exchange SASS checks encode register allocation, which is not the property under test. A register-allocation change in a new CTK or a new architecture will break these checks without any real codegen regression. Match the operands with capture patterns instead.

  • libcudacxx/test/atomic_codegen/sass/exchange_apis.cu#L37-L38: replace PT with {{P(T|[0-9]+)}} and R4/R6 with {{R[0-9]+}}.
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_apis.cu#L39-L40: apply the same replacement.
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types.cu#L40-L41: replace R4/R6 with {{R[0-9]+}}; the predicate is already flexible.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d837d30e-1780-472b-9da5-3bfc8b7bf3a1

📥 Commits

Reviewing files that changed from the base of the PR and between 94d21a7 and fb4728b.

📒 Files selected for processing (48)
  • libcudacxx/test/atomic_codegen/sass/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_apis.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_single_order.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_apis.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_apis.cu
  • libcudacxx/test/atomic_codegen/sass/load_types.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_apis.cu
  • libcudacxx/test/atomic_codegen/sass/store_types.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/cmake/CodegenTest.cmake
  • libcudacxx/test/codegen/dump_and_check.bash
🚧 Files skipped from review as they are similar to previous changes (24)
  • libcudacxx/test/atomic_codegen/sass/exchange_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_apis.cu
  • libcudacxx/test/atomic_codegen/sass/CMakeLists.txt
  • libcudacxx/test/atomic_codegen/sass/store_types.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_types.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_single_order.cu
  • libcudacxx/test/atomic_codegen/sass/load_apis.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_8_16_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/store_types_128_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types_8_16_atomic_ref.cu
  • libcudacxx/test/atomic_codegen/sass/load_types_128_atomic.cu
  • libcudacxx/test/atomic_codegen/sass/compare_exchange_volatile_types.cu
  • libcudacxx/test/atomic_codegen/sass/exchange_volatile_types_8_16_atomic.cu

Comment thread libcudacxx/test/cmake/CodegenTest.cmake
@github-actions

Copy link
Copy Markdown
Contributor

⏱️ CCCL compile-time benchmark comparison: Public headers compile-time bench

Result: 1 regression row(s), 1 improvement row(s) above threshold.

Run Value
Config public-headers-gcc13
Baseline origin/main
Preset all-dev
Targets cub.headers.base, thrust.cpp.cuda.headers.base, libcudacxx.test.public_headers
GPU / launch args rtx2080 / --cuda 13.3 --host gcc13

Artifacts: reports and traces

Direct file processing

-f file-processing exclusive --sort total

🔴 Direct file processing — Regressions
Rank Regression impact Selected Δ Baseline Current Event Matched traces
1 0.216428 0.216428 9.585210 9.801638 Processing Header File: libcudacxx/include/cuda/__device/physical_device.h 93
🟢 Direct file processing — Improvements
Rank Improvement impact Selected Δ Baseline Current Event Matched traces
1 0.578941 -0.578941 5.350431 4.771490 Processing Header File: libcudacxx/include/cuda/std/__cccl/prologue.h 552

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

😬 CI Workflow Results

🟥 Finished in 2h 31m: Pass: 98%/597 | Total: 6d 03h | Max: 2h 30m | Hits: 81%/795244

See results here.

AI failure analysis

1. Compare-exchange SASS check incorrectly requires adjacent acquire invalidation · 8 jobs

Explanation: All eight atomic SASS matrix jobs fail because the new `NON_BLOCK_ACQUIRE-NEXT` assertion requires `CCTL.IVALL` immediately after `ATOM.E.CAS`. Generated SASS consistently places comparison or uniform-load instructions between them, so valid output is rejected across CUDA versions and architectures.

Evidence:

libcu++ nvcc GCC / [CTK12.0 GCC12 C++20] libcu++ Codegen FileCheck Atomics SASS(amd64): sm{75}, step 4

2026-08-13T01:39:58.0920020Z /home/coder/cccl/libcudacxx/test/atomic_codegen/sass/compare_exchange_apis.cu:40:27: error: NON_BLOCK_ACQUIRE-NEXT: is not on the line after the previous match
2026-08-13T01:39:58.0923108Z  /*0070*/ ATOM.E.CAS.STRONG.GPU PT, R11, [R12], R10, R11 ; /* 0x0000000a0c0b738b */
2026-08-13T01:39:58.0924655Z  /*0080*/ ISETP.NE.AND P0, PT, R11, R10, PT ; /* 0x0000000a0b00720c */

Root cause: The PR introduced an over-constrained FileCheck directive at line 40. Acquire compare-exchange still emits `CCTL.IVALL`, but result-processing instructions legitimately prevent it from being the next SASS line after the CAS instruction. Sources: libcudacxx/test/atomic_codegen/sass/compare_exchange_apis.cu:40.

Suggested next steps: Change `NON_BLOCK_ACQUIRE-NEXT` to `NON_BLOCK_ACQUIRE`, then validate both architectures with `./ci/build_libcudacxx.sh -codegen-tests -std 20 -arch 75 -target libcudacxx.test.atomics.sass -cmake-options -DLIBCUDACXX_CODEGEN_FILECHECK_TESTS=atomics-sass` and the equivalent `-arch 80` command.

Copy this prompt into a coding agent
Repository: https://github.com/NVIDIA/cccl
Workflow run: https://github.com/NVIDIA/cccl/actions/runs/31657272079
Failure group: Compare-exchange SASS check incorrectly requires adjacent acquire invalidation
Affected jobs:
- libcu++ nvcc GCC / [CTK12.0 GCC12 C++20] libcu++ Codegen FileCheck Atomics SASS(amd64): sm{75}: https://github.com/NVIDIA/cccl/actions/runs/31657272079/job/94314481590
- libcu++ nvcc GCC / [CTK12.0 GCC12 C++20] libcu++ Codegen FileCheck Atomics SASS(amd64): sm{80}: https://github.com/NVIDIA/cccl/actions/runs/31657272079/job/94314481614
- libcu++ nvcc GCC / [CTK12.9 GCC14 C++20] libcu++ Codegen FileCheck Atomics SASS(amd64): sm{80}: https://github.com/NVIDIA/cccl/actions/runs/31657272079/job/94314481629
- libcu++ nvcc GCC / [CTK12.9 GCC14 C++20] libcu++ Codegen FileCheck Atomics SASS(amd64): sm{75}: https://github.com/NVIDIA/cccl/actions/runs/31657272079/job/94314481632
- libcu++ nvcc GCC / [CTK13.0 GCC15 C++20] libcu++ Codegen FileCheck Atomics SASS(amd64): sm{75}: https://github.com/NVIDIA/cccl/actions/runs/31657272079/job/94314481800
- libcu++ nvcc GCC / [CTK13.0 GCC15 C++20] libcu++ Codegen FileCheck Atomics SASS(amd64): sm{80}: https://github.com/NVIDIA/cccl/actions/runs/31657272079/job/94314482289
- libcu++ nvcc GCC / [CTK13.3 GCC15 C++20] libcu++ Codegen FileCheck Atomics SASS(amd64): sm{80}: https://github.com/NVIDIA/cccl/actions/runs/31657272079/job/94314489074
- libcu++ nvcc GCC / [CTK13.3 GCC15 C++20] libcu++ Codegen FileCheck Atomics SASS(amd64): sm{75}: https://github.com/NVIDIA/cccl/actions/runs/31657272079/job/94314489174

Reproduce the atomic SASS FileCheck failure narrowly for SM75 or SM80. In `libcudacxx/test/atomic_codegen/sass/compare_exchange_apis.cu`, replace `; NON_BLOCK_ACQUIRE-NEXT: {{.*}}CCTL.IVALL{{.*}}` with `; NON_BLOCK_ACQUIRE: {{.*}}CCTL.IVALL{{.*}}`, because compare-exchange emits result-processing instructions between the CAS and acquire invalidation. Verify the relaxed directive still checks ordering and presence without accepting invalid code, implement the fix, and run the focused `libcudacxx.test.atomics.sass` validation for SM75 and SM80.

Jobs:

2. Two Windows example subprocesses exit nonzero without diagnostic output · 1 job

Explanation: The partition-object and struct-reduction examples succeed when imported, but fail when the test harness launches their files as child processes. The harness reports empty stderr and omits the child return code and stdout, preventing identification of the underlying Windows process failure.

Evidence:

Python nvcc MSVC / gs / [CTK12.0 MSVC14.44 py3.14 ctk-sysctk] Test cuda.cccl.examples(amd64, L4), step 4

2026-08-13T02:20:53.0936145Z Testing Compute - Partition - Three Way Partition Object...\nThree way partition object example completed successfully\n  Running compute.examples.partition.three_way_partition_object as script...\n\u2717 Compute - Partition - Three Way Partition Object examples failed: Module execution failed: 
2026-08-13T02:20:53.0945707Z Exception: Module execution failed: 
2026-08-13T02:20:53.0958587Z Testing Compute - Struct - Struct Reduction...\nPixel reduction result: [(80, 237, 158)]\n  Running compute.examples.struct.struct_reduction as script...\n\u2717 Compute - Struct - Struct Reduction examples failed: Module execution failed:

Root cause: Both child Python processes returned nonzero on Windows with Python 3.14, but the saved log contains no return code or child output that identifies whether this was an assertion, native CUDA crash, or environment issue. The PR does not modify the Python examples or their test harness. Sources: python/cuda_cccl/tests/test_examples.py:119, python/cuda_cccl/tests/test_examples.py:125, python/cuda_cccl/tests/test_examples.py:126.

Suggested next steps: First include `result.returncode`, `result.stdout`, and `result.stderr` in the raised exception, then rerun only the two failing tests through `./ci/windows/test_cuda_cccl_examples_python.ps1 -py-version 3.14 -ctk-mode sysctk`. Use the resulting Windows status code or traceback to determine the actual example or runtime fix.

Copy this prompt into a coding agent
Repository: https://github.com/NVIDIA/cccl
Workflow run: https://github.com/NVIDIA/cccl/actions/runs/31657272079
Failure group: Two Windows example subprocesses exit nonzero without diagnostic output
Affected jobs:
- Python nvcc MSVC / gs / [CTK12.0 MSVC14.44 py3.14 ctk-sysctk] Test cuda.cccl.examples(amd64, L4): https://github.com/NVIDIA/cccl/actions/runs/31657272079/job/94319659035

Reproduce the two failing Windows Python 3.14 tests for `compute.examples.partition.three_way_partition_object` and `compute.examples.struct.struct_reduction`. Update `python/cuda_cccl/tests/test_examples.py` so a nonzero subprocess result reports the numeric return code plus captured stdout and stderr, then rerun only those tests. Diagnose the revealed child-process failure, implement the smallest underlying fix rather than merely suppressing the tests, and run focused validation followed by the examples test script.

Jobs:

3. NVBench configuration cannot clone public fmt dependency · 1 job

Explanation: NVBench helper configuration stops while CPM/FetchContent clones `fmt` 11.2.0. Git retries three times but attempts an unavailable interactive GitHub credential flow, so CMake cannot populate the dependency.

Evidence:

NVBench Helper nvcc GCC / [CTK13.3 GCC15] Test(amd64, T4), step 4

2026-08-13T01:24:50.9877539Z -- CPM: Adding package fmt@11.2.0 (11.2.0)
2026-08-13T01:24:52.1556849Z Cloning into 'fmt-src'...
2026-08-13T01:24:52.1560537Z fatal: could not read Username for 'https://github.com': No such device or address

Root cause: The runner's Git transport, credential configuration, proxy, or GitHub access failed for a public dependency; the log does not distinguish among those environment mechanisms. This occurs before compilation and is unrelated to the PR's atomic changes.

Suggested next steps: Retry `./ci/test_nvbench_helper.sh`; if it remains reproducible, inspect runner Git URL rewrites and credentials and run `git ls-remote https://github.com/fmtlib/fmt.git`. Correct the runner access configuration rather than changing NVBench code unless public Git clones are intentionally unsupported.

Copy this prompt into a coding agent
Repository: https://github.com/NVIDIA/cccl
Workflow run: https://github.com/NVIDIA/cccl/actions/runs/31657272079
Failure group: NVBench configuration cannot clone public fmt dependency
Affected jobs:
- NVBench Helper nvcc GCC / [CTK13.3 GCC15] Test(amd64, T4): https://github.com/NVIDIA/cccl/actions/runs/31657272079/job/94314478133

Reproduce the NVBench helper configuration failure with `./ci/test_nvbench_helper.sh`. Before changing repository code, inspect Git URL rewrites, credential helpers, proxy settings, and `git ls-remote https://github.com/fmtlib/fmt.git` on the same runner. If this is persistent infrastructure configuration, fix or document that configuration and rerun the helper; only implement a repository dependency-fetch change if direct public GitHub cloning is intentionally unavailable, then run the focused NVBench helper validation.

Jobs:

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

Labels

None yet

Projects

Status: Blocked

Development

Successfully merging this pull request may close these issues.

SASS FileCheck coverage for atomics: basic atomic operations (load, store, exchange, CAS)

4 participants