From 86c0decc480147d109b1dd8b968bcbc509b7a2e6 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Thu, 23 Sep 2021 10:49:08 -0700 Subject: [PATCH] Disable more NVCC warnings. The 2979 warning is yet another "calling a __host__ function from a __host__ device__ function. Although we probably should eventually address these, they are flooding the logs. Most of these are harmless since we only call the original from the host. In cases where these are actually called from device, an error is generated instead anyways. The 2977 warning is a bit strange - although the warning suggests the `__device__` annotation is ignored, this doesn't actually seem to be the case. Without the `__device__` declarations, the kernel actually fails to run when attempting to construct such objects. Again, these warnings are flooding the logs, so disabling for now. --- Eigen/src/Core/util/DisableStupidWarnings.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Eigen/src/Core/util/DisableStupidWarnings.h b/Eigen/src/Core/util/DisableStupidWarnings.h index fa33689fa..44829a4b8 100755 --- a/Eigen/src/Core/util/DisableStupidWarnings.h +++ b/Eigen/src/Core/util/DisableStupidWarnings.h @@ -94,6 +94,12 @@ #pragma diag_suppress 2735 #pragma diag_suppress 2737 #pragma diag_suppress 2739 + #pragma diag_suppress 2979 + // Disable the "// __device__ annotation is ignored on a function(...) that is + // explicitly defaulted on its first declaration" message. + // The __device__ annotation seems to actually be needed in some cases, + // otherwise resulting in kernel runtime errors. + #pragma diag_suppress 2977 #endif #else