A_Man
A_Man

Reputation: 131

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.

Upvotes: 1

Views: 1175

Answers (2)

einpoklum
einpoklum

Reputation: 131525

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.

Upvotes: 4

RHertel
RHertel

Reputation: 23788

This specific warning can be suppressed with the following flag:

-Xcudafe --diag_suppress=esa_on_defaulted_function_ignored

Upvotes: 1

Related Questions