Fix NVRTC 13.3 warning bug in CCCL and CCCL.C#9171
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
important: WalkthroughAdds a standalone diagnostic suppression macro ( ChangesNVRTC 13.3 deprecated vector type warning suppression
Assessment against linked issues
Out-of-scope changes
Suggested labels
Suggested reviewers
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
c/parallel/test/test_util.h (1)
92-95: ⚡ Quick winsuggestion: Line 92/Line 95 should avoid a mutable options table + hardcoded count; use
const char* const options[] = {...};andstatic_cast<int>(::std::size(options))innvrtcCompileProgramto 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
📒 Files selected for processing (58)
c/parallel/src/util/build_utils.hc/parallel/test/test_util.hcub/cub/util_type.cuhcub/test/catch2_test_device_adjacent_difference_substract_right.cucub/test/catch2_test_device_histogram.cucub/test/catch2_test_device_reduce.cucub/test/catch2_test_device_reduce.cuhcub/test/catch2_test_device_reduce_fp_inf.cucub/test/catch2_test_device_select_unique.cucub/test/catch2_test_device_select_unique_by_key.cucub/test/catch2_test_iterator.cucub/test/test_util.hcudax/include/cuda/experimental/__execution/queries.cuhlibcudacxx/include/cuda/__driver/driver_api.hlibcudacxx/include/cuda/__type_traits/scalar_type.hlibcudacxx/include/cuda/__type_traits/vector_size.hlibcudacxx/include/cuda/std/__cccl/diagnostic.hlibcudacxx/include/cuda/std/__functional/binary_function.hlibcudacxx/include/cuda/std/__functional/binary_negate.hlibcudacxx/include/cuda/std/__functional/binder1st.hlibcudacxx/include/cuda/std/__functional/binder2nd.hlibcudacxx/include/cuda/std/__functional/mem_fun_ref.hlibcudacxx/include/cuda/std/__functional/pointer_to_binary_function.hlibcudacxx/include/cuda/std/__functional/pointer_to_unary_function.hlibcudacxx/include/cuda/std/__functional/unary_function.hlibcudacxx/include/cuda/std/__functional/unary_negate.hlibcudacxx/include/cuda/std/__iterator/back_insert_iterator.hlibcudacxx/include/cuda/std/__iterator/front_insert_iterator.hlibcudacxx/include/cuda/std/__iterator/insert_iterator.hlibcudacxx/include/cuda/std/__iterator/istream_iterator.hlibcudacxx/include/cuda/std/__iterator/istreambuf_iterator.hlibcudacxx/include/cuda/std/__iterator/ostream_iterator.hlibcudacxx/include/cuda/std/__iterator/ostreambuf_iterator.hlibcudacxx/include/cuda/std/__iterator/reverse_iterator.hlibcudacxx/include/cuda/std/__memory/allocator.hlibcudacxx/include/cuda/std/__memory/allocator_traits.hlibcudacxx/include/cuda/std/__tuple_dir/vector_types.hlibcudacxx/include/cuda/std/__utility/declval.hlibcudacxx/test/libcudacxx/cuda/stream_ref/stream_ref.ready.pass.cpplibcudacxx/test/libcudacxx/cuda/stream_ref/stream_ref.wait.pass.cpplibcudacxx/test/libcudacxx/cuda/utilities/tuple/vector_types_tuple_element.pass.cpplibcudacxx/test/libcudacxx/cuda/utilities/tuple/vector_types_tuple_size.pass.cpplibcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpplibcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpplibcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpplibcudacxx/test/libcudacxx/std/language.support/support.limits/limits/numeric.limits/default.pass.cpplibcudacxx/test/libcudacxx/std/language.support/support.limits/limits/round.style/check_values.pass.cpplibcudacxx/test/libcudacxx/std/numerics/c.math/fp_manip/copysign.pass.cpplibcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/fpclassify.pass.cpplibcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isfinite.pass.cpplibcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isinf.pass.cpplibcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isnan.pass.cpplibcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/isnormal.pass.cpplibcudacxx/test/libcudacxx/std/numerics/c.math/fp_traits/signbit.pass.cpppython/cuda_cccl/cuda/compute/_cpp_compile.pypython/cuda_cccl/cuda/coop/_experimental/_nvrtc.pythrust/thrust/iterator/iterator_traits.hthrust/thrust/type_traits/is_trivially_relocatable.h
| // NVRTC 13.3 does not honor nv_diag_suppress when it is emitted in the same macro expansion as | ||
| // nv_diagnostic push. Keep the suppression in a separate source-level macro invocation. | ||
| // See https://github.com/NVIDIA/cccl/issues/9170 and nvbug 6239043. | ||
| # define _CCCL_SUPPRESS_DEPRECATED_DIAG _Pragma("nv_diag_suppress 1444,20199") |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if nv_diag_suppress is used elsewhere with comma-separated warning numbers
rg -nP 'nv_diag_suppress\s+\d+\s*,\s*\d+' --type=cpp --type=cRepository: NVIDIA/cccl
Length of output: 189
🌐 Web query:
Does NVIDIA NVRTC nv_diag_suppress pragma support comma-separated warning numbers in a single pragma directive?
💡 Result:
No, the #pragma nv_diag_suppress directive does not support comma-separated warning numbers in a single pragma [1]. While NVIDIA's command-line compiler options (such as --diag-suppress) explicitly support comma-separated lists of diagnostic message numbers [2][3], the pragma-based diagnostic control is designed to take a single argument per directive [1]. To suppress multiple warnings using pragmas, you must issue a separate #pragma nv_diag_suppress directive for each warning number [1]. In practice, many developers use macros to automate this, such as those found in the NVIDIA/cccl library, which iterate over a list of warning numbers and generate the necessary sequence of individual pragmas [4].
Citations:
- 1: https://gh.evko.io/nvopen-tools/cudafe%2B%2B/reference/error-catalog.html
- 2: https://docs.nvidia.com/cuda/nvrtc/index.html
- 3: https://gist.github.com/gavinb/f2320f9eaa0e0a7efca6877a34047a9d
- 4: https://github.com/NVIDIA/cccl/blob/0d9331dc/libcudacxx/include/cuda/std/__cccl/diagnostic.h
critical: Fix NVRTC diagnostic suppression—nv_diag_suppress can’t take comma-separated warning numbers
Line 126 uses a single directive (_Pragma("nv_diag_suppress 1444,20199")), but #pragma nv_diag_suppress only accepts one diagnostic number per directive. This can silently fail to suppress warning 20199 (and/or 1444), breaking the intended NVRTC 13.3 behavior. Emit separate _Pragma("nv_diag_suppress 1444") and _Pragma("nv_diag_suppress 20199") directives in the NVRTC branch.
|
pre-commit.ci autofix |
|
/ok to test 39830e7 |
🥳 CI Workflow Results🟩 Finished in 4h 20m: Pass: 100%/483 | Total: 22d 05h | Max: 4h 19m | Hits: 26%/5331004See results here. |
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