CLI11 icon indicating copy to clipboard operation
CLI11 copied to clipboard

nvcc compiler warnings with CUDA 11.7

Open turnef opened this issue 2 years ago • 0 comments

Inclusion of CLI11.hpp in CUDA code results in nvcc emitting these compiler warnings as of the CUDA 11.7 release:

CLI/CLI11.hpp(1027): warning #20236-D: pragma "diag_suppress" is deprecated, use "nv_diag_suppress" instead
CLI/CLI11.hpp(1032): warning #20236-D: pragma "diag_default" is deprecated, use "nv_diag_default" instead

The specific lines from CLI11.hpp that produce the warnings:

// NVCC warns about narrowing conversions here
#ifdef __CUDACC__
#pragma diag_suppress 2361
#endif
        TT { std::declval<CC>() }
#ifdef __CUDACC__
#pragma diag_default 2361
#endif

Simply prefixing the pragma directives with nv_ as the warning text suggests eliminates them which is easy to do in a locally deployed copy of the header. NVIDIA's documentation states that the deprecated forms of the pragma directives may be removed in a future release of CUDA.

I figured you might want to know this was happening. Thanks.

turnef avatar Jul 21 '22 17:07 turnef