Search code examples
cudaeigennvcc

How to find and disable specific NVCC warning?


Where are the NVCC codes for a specific warning listed?

Looking at other questions like this one gives the answer to use -Xcudafe "--diag_suppress=xxx to suppress warning "xxx", and links to a list of possible warnings here.

However, when I have the warnings

/usr/include/eigen3/Eigen/src/Core/util/XprHelper.h(94): warning: __host__ annotation is ignored on a function("no_assignment_operator") that is explicitly defaulted on its first declaration

and

/usr/include/eigen3/Eigen/src/Core/util/XprHelper.h(94): warning: __device__ annotation is ignored on a function("no_assignment_operator") that is explicitly defaulted on its first declaration

I do not find that type in the list. Can someone point me to the page where it is, so I can find the code/name of it? I did not find it in the documentation for NVCC.


Solution

  • Instead of looking for the string code for the warning, you can pass the --display_error_number flag to NVCC, and get the number of that error. Then you can disable it with:

    -Xcudafe --diag_suppress=1234
    

    or whatever the error number was.