Skip to content

Commit 75c7b14

Browse files
authored
Fix NVRTC 13.3 warning bug in CCCL and CCCL.C (#9171)
1 parent 5a9ea63 commit 75c7b14

58 files changed

Lines changed: 99 additions & 9 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.

c/parallel/src/util/build_utils.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ namespace cccl::detail
2424
*/
2525
inline void extend_args_with_build_config(std::vector<const char*>& args, const cccl_build_config* config)
2626
{
27+
// Work around an NVRTC 13.3 diagnostic pragma bug in CUDA Toolkit headers that leaves deprecated vector type warnings
28+
// unsuppressed when including headers such as cuda_fp8.h, cuda_fp6.h, and cuda_fp4.h.
29+
args.push_back("-D__NV_NO_VECTOR_DEPRECATION_DIAG");
30+
2731
if (config)
2832
{
2933
// Add extra compile flags

c/parallel/test/test_util.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ inline std::string compile(const std::string& source)
8989
REQUIRE(NVRTC_SUCCESS == nvrtcCreateProgram(&prog, source.c_str(), "op.cu", 0, nullptr, nullptr));
9090

9191
// TEST_CTK_PATH needed to include cuda_fp16.h
92-
const char* options[] = {"--std=c++17", "-rdc=true", "-dlto", TEST_CTK_PATH};
92+
const char* options[] = {"--std=c++17", "-rdc=true", "-dlto", "-D__NV_NO_VECTOR_DEPRECATION_DIAG", TEST_CTK_PATH};
9393

94-
if (nvrtcCompileProgram(prog, 4, options) != NVRTC_SUCCESS)
94+
if (nvrtcCompileProgram(prog, 5, options) != NVRTC_SUCCESS)
9595
{
9696
size_t log_size{};
9797
REQUIRE(NVRTC_SUCCESS == nvrtcGetProgramLogSize(prog, &log_size));

cub/cub/util_type.cuh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ __CUB_ALIGN_BYTES(int4, 16)
346346
__CUB_ALIGN_BYTES(uint4, 16)
347347
__CUB_ALIGN_BYTES(float4, 16)
348348
_CCCL_SUPPRESS_DEPRECATED_PUSH
349+
_CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG
349350
__CUB_ALIGN_BYTES(long4, 16)
350351
__CUB_ALIGN_BYTES(ulong4, 16)
351352
_CCCL_SUPPRESS_DEPRECATED_POP
@@ -359,6 +360,7 @@ __CUB_ALIGN_BYTES(longlong2, 16)
359360
__CUB_ALIGN_BYTES(ulonglong2, 16)
360361
__CUB_ALIGN_BYTES(double2, 16)
361362
_CCCL_SUPPRESS_DEPRECATED_PUSH
363+
_CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG
362364
__CUB_ALIGN_BYTES(longlong4, 16)
363365
__CUB_ALIGN_BYTES(ulonglong4, 16)
364366
__CUB_ALIGN_BYTES(double4, 16)
@@ -645,18 +647,21 @@ CUB_DEFINE_VECTOR_TYPE(signed char, char)
645647
CUB_DEFINE_VECTOR_TYPE(short, short)
646648
CUB_DEFINE_VECTOR_TYPE(int, int)
647649
_CCCL_SUPPRESS_DEPRECATED_PUSH
650+
_CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG
648651
CUB_DEFINE_VECTOR_TYPE(long, long)
649652
CUB_DEFINE_VECTOR_TYPE(long long, longlong)
650653
_CCCL_SUPPRESS_DEPRECATED_POP
651654
CUB_DEFINE_VECTOR_TYPE(unsigned char, uchar)
652655
CUB_DEFINE_VECTOR_TYPE(unsigned short, ushort)
653656
CUB_DEFINE_VECTOR_TYPE(unsigned int, uint)
654657
_CCCL_SUPPRESS_DEPRECATED_PUSH
658+
_CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG
655659
CUB_DEFINE_VECTOR_TYPE(unsigned long, ulong)
656660
CUB_DEFINE_VECTOR_TYPE(unsigned long long, ulonglong)
657661
_CCCL_SUPPRESS_DEPRECATED_POP
658662
CUB_DEFINE_VECTOR_TYPE(float, float)
659663
_CCCL_SUPPRESS_DEPRECATED_PUSH
664+
_CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG
660665
CUB_DEFINE_VECTOR_TYPE(double, double)
661666
_CCCL_SUPPRESS_DEPRECATED_POP
662667
CUB_DEFINE_VECTOR_TYPE(bool, uchar)

cub/test/catch2_test_device_adjacent_difference_substract_right.cu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ C2H_TEST("DeviceAdjacentDifference::SubtractRightCopy does not change the input"
6565
}
6666

6767
_CCCL_SUPPRESS_DEPRECATED_PUSH
68+
_CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG
6869
template <class T>
6970
struct ref_diff
7071
{
@@ -171,6 +172,7 @@ C2H_TEST("DeviceAdjacentDifference::SubtractRightCopy works with pointers", "[de
171172
}
172173

173174
_CCCL_SUPPRESS_DEPRECATED_PUSH
175+
_CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG
174176
struct cust_diff
175177
{
176178
template <class T>

cub/test/catch2_test_device_histogram.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ DECLARE_LAUNCH_WRAPPER(cub::DeviceHistogram::HistogramEven, histogram_even);
3131
DECLARE_LAUNCH_WRAPPER(cub::DeviceHistogram::HistogramRange, histogram_range);
3232

3333
_CCCL_SUPPRESS_DEPRECATED_PUSH
34+
_CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG
3435
DECLARE_TMPL_LAUNCH_WRAPPER(cub::DeviceHistogram::MultiHistogramEven,
3536
multi_histogram_even,
3637
ESCAPE_LIST(int Channels, int ActiveChannels),

cub/test/catch2_test_device_reduce.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ DECLARE_LAUNCH_WRAPPER(cub::DeviceReduce::Max, device_max);
2626
DECLARE_LAUNCH_WRAPPER(cub::DeviceReduce::ArgMax, device_arg_max);
2727

2828
_CCCL_SUPPRESS_DEPRECATED_PUSH
29+
_CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG
2930
DECLARE_LAUNCH_WRAPPER(cub::DeviceReduce::ArgMin, device_arg_min_old);
3031
DECLARE_LAUNCH_WRAPPER(cub::DeviceReduce::ArgMax, device_arg_max_old);
3132
_CCCL_SUPPRESS_DEPRECATED_POP

cub/test/catch2_test_device_reduce.cuh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ inline void init_default_constant(uchar3& val, int element_val = 2)
204204
}
205205

206206
_CCCL_SUPPRESS_DEPRECATED_PUSH
207+
_CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG
207208
inline void init_default_constant(ulonglong4& val, int element_val = 2)
208209
{
209210
const auto element_init = static_cast<unsigned long long>(element_val);

cub/test/catch2_test_device_reduce_fp_inf.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ DECLARE_LAUNCH_WRAPPER(cub::DeviceReduce::ArgMin, device_arg_min);
1414
DECLARE_LAUNCH_WRAPPER(cub::DeviceReduce::ArgMax, device_arg_max);
1515

1616
_CCCL_SUPPRESS_DEPRECATED_PUSH
17+
_CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG
1718
DECLARE_LAUNCH_WRAPPER(cub::DeviceReduce::ArgMin, device_arg_min_old);
1819
DECLARE_LAUNCH_WRAPPER(cub::DeviceReduce::ArgMax, device_arg_max_old);
1920
_CCCL_SUPPRESS_DEPRECATED_POP

cub/test/catch2_test_device_select_unique.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ inline ulonglong2 to_bound(const unsigned long long bound)
3838
}
3939

4040
_CCCL_SUPPRESS_DEPRECATED_PUSH
41+
_CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG
4142
template <>
4243
inline ulonglong4 to_bound(const unsigned long long bound)
4344
{

cub/test/catch2_test_device_select_unique_by_key.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ inline ulonglong2 to_bound(const unsigned long long bound)
2727
}
2828

2929
_CCCL_SUPPRESS_DEPRECATED_PUSH
30+
_CCCL_SUPPRESS_DEPRECATED_NVRTC_DIAG
3031
template <>
3132
inline ulonglong4 to_bound(const unsigned long long bound)
3233
{

0 commit comments

Comments
 (0)