Skip to content

Fix NVRTC 13.3 warning bug in CCCL and CCCL.C#9171

Merged
NaderAlAwar merged 4 commits into
NVIDIA:mainfrom
NaderAlAwar:nvrtc-13.3-warning-fix
Jun 3, 2026
Merged

Fix NVRTC 13.3 warning bug in CCCL and CCCL.C#9171
NaderAlAwar merged 4 commits into
NVIDIA:mainfrom
NaderAlAwar:nvrtc-13.3-warning-fix

Conversation

@NaderAlAwar

Copy link
Copy Markdown
Contributor

Description

closes #9170

The fix is rather invasive because it requires us to add another macro to separate nv_diagnostic push from nv_diag_suppress. Not sure there is another way to fix this

Checklist

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

@NaderAlAwar NaderAlAwar requested review from a team as code owners May 29, 2026 00:51
@NaderAlAwar NaderAlAwar requested a review from leofang May 29, 2026 00:51
@github-project-automation github-project-automation Bot moved this to Todo in CCCL May 29, 2026
@NaderAlAwar NaderAlAwar requested review from andralex and davebayer May 29, 2026 00:51
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL May 29, 2026
@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

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: 7efca272-b913-4971-af47-c7bd180519b2

📥 Commits

Reviewing files that changed from the base of the PR and between acfe2d6 and f35daa2.

📒 Files selected for processing (1)
  • libcudacxx/include/cuda/std/__cccl/diagnostic.h
🚧 Files skipped from review as they are similar to previous changes (1)
  • libcudacxx/include/cuda/std/__cccl/diagnostic.h

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Reduced build/compile-time noise by extending deprecation-warning suppression across CUDA standard-library headers, iterator utilities, and device algorithm tests.
    • Improved NVRTC/CUDA compatibility so legacy vector-related deprecation warnings are suppressed more consistently.
    • Updated C++ and Python compile flows to include an extra define that prevents specific vector deprecation diagnostics during compilation.

important: Walkthrough

Adds an NVRTC-specific suppression macro and propagates it plus a compile-time define through build tools, headers, and tests to suppress CUDA 13.3 NVRTC vector-deprecation warnings.

Changes

NVRTC 13.3 deprecated vector type warning suppression

Layer / File(s) Summary
Diagnostic suppression macro infrastructure
libcudacxx/include/cuda/std/__cccl/diagnostic.h
Define _CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG and split NVRTC push vs _Pragma("nv_diag_suppress ...") when NVRTC >= 13.3 & pragma support.
Build config: add compile-time define
c/parallel/src/util/build_utils.h, c/parallel/test/test_util.h, python/cuda_cccl/cuda/compute/_cpp_compile.py, python/cuda_cccl/cuda/coop/_experimental/_nvrtc.py
Add -D__NV_NO_VECTOR_DEPRECATION_DIAG / define_macro="__NV_NO_VECTOR_DEPRECATION_DIAG" to NVRTC and C++ compile invocations.
libcudacxx functional headers suppressions
libcudacxx/include/cuda/std/__functional/*
Insert _CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG in functional adapter headers to control NVRTC deprecated-adapter diagnostics.
libcudacxx iterator headers suppressions and back_insert change
libcudacxx/include/cuda/std/__iterator/*
Insert suppression markers in iterator headers; replace __back_insert_iterator with back_insert_iterator and update associated types/operators.
libcudacxx memory header suppressions
libcudacxx/include/cuda/std/__memory/*
Insert suppression markers around deprecated Allocator pointer/const_pointer, is_always_equal, and rebind paths.
libcudacxx type/utility header suppressions
libcudacxx/include/cuda/__type_traits/*, libcudacxx/include/cuda/std/__utility/declval.h, libcudacxx/include/cuda/std/__tuple_dir/vector_types.h, libcudacxx/include/cuda/__driver/driver_api.h
Insert suppression markers around type traits, driver API deprecation blocks, declval, and tuple/vector specializations.
CUB library header suppressions
cub/cub/util_type.cuh, cub/test/test_util.h
Add NVRTC-specific suppression markers in AlignBytes specializations and vector overload instantiation regions.
CUB test suppression updates
cub/test/catch2_test_*.cu, cub/test/catch2_test_*.cuh
Add suppression markers in multiple CUB test translation units around deprecated-interface tests.
libcudacxx test suppression updates
libcudacxx/test/libcudacxx/**
Add suppression markers in stream_ref, tuple/vector, numeric_limits C++23 deprecation regions, and FP trait tests.
Thrust and CUDAX header suppressions
thrust/*, cudax/include/cuda/experimental/__execution/queries.cuh
Insert suppression markers in Thrust iterator/type-trait headers and CUDAX experimental query header.

important: Assessment against linked issues

Objective Addressed Explanation
Fix NVRTC 13.3 emitting deprecated vector type warnings when diagnostic suppression is applied [#9170]
Work around NVRTC 13.3 regression where nv_diag_suppress in same macro expansion as nv_diagnostic push is ignored [#9170]
Apply suppression across CUB util_type.cuh and affected headers/tests [#9170]

important: Out-of-scope changes

Code Change Explanation
Rename internal iterator and adjust public types/operators (libcudacxx/include/cuda/std/__iterator/back_insert_iterator.h:96-150) This changes exported iterator type/name and public member signatures; not required by the linked issue and functionally independent of diagnostic suppression.

suggestion: Suggested reviewers

  • andralex
  • davebayer

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

@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: 1

🧹 Nitpick comments (1)
c/parallel/test/test_util.h (1)

92-95: ⚡ Quick win

suggestion: Line 92/Line 95 should avoid a mutable options table + hardcoded count; use const char* const options[] = {...}; and static_cast<int>(::std::size(options)) in nvrtcCompileProgram to keep the count correct when flags change.

As per coding guidelines: "All variables that are not modified must use const qualifier".


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 03f3afc6-6d24-440a-80f8-fc477b0e2e32

📥 Commits

Reviewing files that changed from the base of the PR and between d083f97 and b25a34c.

📒 Files selected for processing (58)
  • c/parallel/src/util/build_utils.h
  • c/parallel/test/test_util.h
  • cub/cub/util_type.cuh
  • cub/test/catch2_test_device_adjacent_difference_substract_right.cu
  • cub/test/catch2_test_device_histogram.cu
  • cub/test/catch2_test_device_reduce.cu
  • cub/test/catch2_test_device_reduce.cuh
  • cub/test/catch2_test_device_reduce_fp_inf.cu
  • cub/test/catch2_test_device_select_unique.cu
  • cub/test/catch2_test_device_select_unique_by_key.cu
  • cub/test/catch2_test_iterator.cu
  • cub/test/test_util.h
  • cudax/include/cuda/experimental/__execution/queries.cuh
  • libcudacxx/include/cuda/__driver/driver_api.h
  • libcudacxx/include/cuda/__type_traits/scalar_type.h
  • libcudacxx/include/cuda/__type_traits/vector_size.h
  • libcudacxx/include/cuda/std/__cccl/diagnostic.h
  • libcudacxx/include/cuda/std/__functional/binary_function.h
  • libcudacxx/include/cuda/std/__functional/binary_negate.h
  • libcudacxx/include/cuda/std/__functional/binder1st.h
  • libcudacxx/include/cuda/std/__functional/binder2nd.h
  • libcudacxx/include/cuda/std/__functional/mem_fun_ref.h
  • libcudacxx/include/cuda/std/__functional/pointer_to_binary_function.h
  • libcudacxx/include/cuda/std/__functional/pointer_to_unary_function.h
  • libcudacxx/include/cuda/std/__functional/unary_function.h
  • libcudacxx/include/cuda/std/__functional/unary_negate.h
  • libcudacxx/include/cuda/std/__iterator/back_insert_iterator.h
  • libcudacxx/include/cuda/std/__iterator/front_insert_iterator.h
  • libcudacxx/include/cuda/std/__iterator/insert_iterator.h
  • libcudacxx/include/cuda/std/__iterator/istream_iterator.h
  • libcudacxx/include/cuda/std/__iterator/istreambuf_iterator.h
  • libcudacxx/include/cuda/std/__iterator/ostream_iterator.h
  • libcudacxx/include/cuda/std/__iterator/ostreambuf_iterator.h
  • libcudacxx/include/cuda/std/__iterator/reverse_iterator.h
  • libcudacxx/include/cuda/std/__memory/allocator.h
  • libcudacxx/include/cuda/std/__memory/allocator_traits.h
  • libcudacxx/include/cuda/std/__tuple_dir/vector_types.h
  • libcudacxx/include/cuda/std/__utility/declval.h
  • libcudacxx/test/libcudacxx/cuda/stream_ref/stream_ref.ready.pass.cpp
  • libcudacxx/test/libcudacxx/cuda/stream_ref/stream_ref.wait.pass.cpp
  • libcudacxx/test/libcudacxx/cuda/utilities/tuple/vector_types_tuple_element.pass.cpp
  • libcudacxx/test/libcudacxx/cuda/utilities/tuple/vector_types_tuple_size.pass.cpp
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits/default.pass.cpp
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/round.style/check_values.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_manip/copysign.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/fpclassify.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isfinite.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isinf.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isnan.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isnormal.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/signbit.pass.cpp
  • python/cuda_cccl/cuda/compute/_cpp_compile.py
  • python/cuda_cccl/cuda/coop/_experimental/_nvrtc.py
  • thrust/thrust/iterator/iterator_traits.h
  • thrust/thrust/type_traits/is_trivially_relocatable.h

Comment thread libcudacxx/include/cuda/std/__cccl/diagnostic.h Outdated
@NaderAlAwar

Copy link
Copy Markdown
Contributor Author

pre-commit.ci autofix

@copy-pr-bot

copy-pr-bot Bot commented May 29, 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.

@NaderAlAwar

Copy link
Copy Markdown
Contributor Author

/ok to test 39830e7

@github-actions

This comment has been minimized.

Comment thread libcudacxx/include/cuda/std/__cccl/diagnostic.h

@miscco miscco 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.

I hate the solution, but I believe its the only one we can reasonably do. Can we add _NVRTC to the macro so that we know its targeted to NVRTC

@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.

🧹 Nitpick comments (1)
libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp (1)

21-24: 💤 Low value

suggestion: The _CCCL_SUPPRESS_DEPRECATED_PUSH at line 22 lacks a matching _CCCL_SUPPRESS_DEPRECATED_POP at the end of the file. While this works (diagnostics reset at TU boundary), consider adding a conditional POP before the final return 0; for consistency with other files:

`#if` _CCCL_STD_VER >= 2023
_CCCL_SUPPRESS_DEPRECATED_POP
`#endif`

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2f5fad46-4d83-4bc2-8b42-21c1aa6c2eb0

📥 Commits

Reviewing files that changed from the base of the PR and between 39830e7 and acfe2d6.

📒 Files selected for processing (54)
  • cub/cub/util_type.cuh
  • cub/test/catch2_test_device_adjacent_difference_substract_right.cu
  • cub/test/catch2_test_device_histogram.cu
  • cub/test/catch2_test_device_reduce.cu
  • cub/test/catch2_test_device_reduce.cuh
  • cub/test/catch2_test_device_reduce_fp_inf.cu
  • cub/test/catch2_test_device_select_unique.cu
  • cub/test/catch2_test_device_select_unique_by_key.cu
  • cub/test/catch2_test_iterator.cu
  • cub/test/test_util.h
  • cudax/include/cuda/experimental/__execution/queries.cuh
  • libcudacxx/include/cuda/__driver/driver_api.h
  • libcudacxx/include/cuda/__type_traits/scalar_type.h
  • libcudacxx/include/cuda/__type_traits/vector_size.h
  • libcudacxx/include/cuda/std/__cccl/diagnostic.h
  • libcudacxx/include/cuda/std/__functional/binary_function.h
  • libcudacxx/include/cuda/std/__functional/binary_negate.h
  • libcudacxx/include/cuda/std/__functional/binder1st.h
  • libcudacxx/include/cuda/std/__functional/binder2nd.h
  • libcudacxx/include/cuda/std/__functional/mem_fun_ref.h
  • libcudacxx/include/cuda/std/__functional/pointer_to_binary_function.h
  • libcudacxx/include/cuda/std/__functional/pointer_to_unary_function.h
  • libcudacxx/include/cuda/std/__functional/unary_function.h
  • libcudacxx/include/cuda/std/__functional/unary_negate.h
  • libcudacxx/include/cuda/std/__iterator/back_insert_iterator.h
  • libcudacxx/include/cuda/std/__iterator/front_insert_iterator.h
  • libcudacxx/include/cuda/std/__iterator/insert_iterator.h
  • libcudacxx/include/cuda/std/__iterator/istream_iterator.h
  • libcudacxx/include/cuda/std/__iterator/istreambuf_iterator.h
  • libcudacxx/include/cuda/std/__iterator/ostream_iterator.h
  • libcudacxx/include/cuda/std/__iterator/ostreambuf_iterator.h
  • libcudacxx/include/cuda/std/__iterator/reverse_iterator.h
  • libcudacxx/include/cuda/std/__memory/allocator.h
  • libcudacxx/include/cuda/std/__memory/allocator_traits.h
  • libcudacxx/include/cuda/std/__tuple_dir/vector_types.h
  • libcudacxx/include/cuda/std/__utility/declval.h
  • libcudacxx/test/libcudacxx/cuda/stream_ref/stream_ref.ready.pass.cpp
  • libcudacxx/test/libcudacxx/cuda/stream_ref/stream_ref.wait.pass.cpp
  • libcudacxx/test/libcudacxx/cuda/utilities/tuple/vector_types_tuple_element.pass.cpp
  • libcudacxx/test/libcudacxx/cuda/utilities/tuple/vector_types_tuple_size.pass.cpp
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits/default.pass.cpp
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/round.style/check_values.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_manip/copysign.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/fpclassify.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isfinite.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isinf.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isnan.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isnormal.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/signbit.pass.cpp
  • thrust/thrust/iterator/iterator_traits.h
  • thrust/thrust/type_traits/is_trivially_relocatable.h
✅ Files skipped from review due to trivial changes (24)
  • libcudacxx/include/cuda/std/__iterator/istreambuf_iterator.h
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isnan.pass.cpp
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/round.style/check_values.pass.cpp
  • libcudacxx/include/cuda/std/__iterator/istream_iterator.h
  • libcudacxx/test/libcudacxx/cuda/stream_ref/stream_ref.wait.pass.cpp
  • libcudacxx/include/cuda/std/__functional/unary_negate.h
  • libcudacxx/include/cuda/std/__iterator/front_insert_iterator.h
  • libcudacxx/test/libcudacxx/cuda/utilities/tuple/vector_types_tuple_size.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isinf.pass.cpp
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits/default.pass.cpp
  • cub/test/catch2_test_device_select_unique_by_key.cu
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isfinite.pass.cpp
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/fpclassify.pass.cpp
  • libcudacxx/include/cuda/std/__iterator/reverse_iterator.h
  • libcudacxx/include/cuda/__driver/driver_api.h
  • cub/test/test_util.h
  • libcudacxx/test/libcudacxx/cuda/stream_ref/stream_ref.ready.pass.cpp
  • libcudacxx/include/cuda/std/__iterator/ostreambuf_iterator.h
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_manip/copysign.pass.cpp
  • cub/test/catch2_test_device_reduce.cu
  • thrust/thrust/type_traits/is_trivially_relocatable.h
  • cub/test/catch2_test_device_histogram.cu
  • thrust/thrust/iterator/iterator_traits.h
  • libcudacxx/include/cuda/__type_traits/vector_size.h
🚧 Files skipped from review as they are similar to previous changes (23)
  • cudax/include/cuda/experimental/__execution/queries.cuh
  • libcudacxx/include/cuda/std/__functional/mem_fun_ref.h
  • libcudacxx/include/cuda/std/__functional/pointer_to_unary_function.h
  • libcudacxx/include/cuda/std/__functional/binder2nd.h
  • cub/test/catch2_test_device_reduce.cuh
  • libcudacxx/test/libcudacxx/cuda/utilities/tuple/vector_types_tuple_element.pass.cpp
  • libcudacxx/include/cuda/std/__iterator/ostream_iterator.h
  • cub/test/catch2_test_device_select_unique.cu
  • libcudacxx/include/cuda/std/__functional/binary_function.h
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp
  • cub/test/catch2_test_device_adjacent_difference_substract_right.cu
  • libcudacxx/include/cuda/std/__functional/unary_function.h
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/signbit.pass.cpp
  • libcudacxx/include/cuda/std/__utility/declval.h
  • libcudacxx/include/cuda/__type_traits/scalar_type.h
  • cub/test/catch2_test_device_reduce_fp_inf.cu
  • libcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
  • libcudacxx/include/cuda/std/__functional/pointer_to_binary_function.h
  • libcudacxx/include/cuda/std/__tuple_dir/vector_types.h
  • libcudacxx/include/cuda/std/__memory/allocator_traits.h
  • libcudacxx/include/cuda/std/__memory/allocator.h
  • libcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isnormal.pass.cpp
  • libcudacxx/include/cuda/std/__iterator/back_insert_iterator.h

@NaderAlAwar

Copy link
Copy Markdown
Contributor Author

pre-commit.ci autofix

@NaderAlAwar

Copy link
Copy Markdown
Contributor Author

/ok to test f35daa2

@NaderAlAwar NaderAlAwar enabled auto-merge (squash) June 3, 2026 14:07
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 2h 29m: Pass: 100%/483 | Total: 8d 22h | Max: 2h 28m | Hits: 95%/660014

See results here.

@NaderAlAwar NaderAlAwar merged commit 75c7b14 into NVIDIA:main Jun 3, 2026
504 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

NVRTC 13.3 emits deprecated vector type warnings even with diagnostic suppression

4 participants