Skip to content

nvcc compiler warnings with CUDA 11.7 #757

Closed

Description

@turnef

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions