mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-12 14:25:16 +08:00
Convert diag pragmas to nv_diag.
This commit is contained in:
parent
532cc73f39
commit
da79095923
@ -75,38 +75,47 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined __NVCC__
|
#if defined __NVCC__
|
||||||
#pragma diag_suppress boolean_controlling_expr_is_constant
|
#define EIGEN_MAKE_PRAGMA(X) _Pragma(#X)
|
||||||
|
#if defined __NVCC_DIAG_PRAGMA_SUPPORT__
|
||||||
|
#define EIGEN_NV_DIAG_SUPPRESS(X) EIGEN_MAKE_PRAGMA(nv_diag_suppress X)
|
||||||
|
#else
|
||||||
|
#define EIGEN_NV_DIAG_SUPPRESS(X) EIGEN_MAKE_PRAGMA(diag_suppress X)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
EIGEN_NV_DIAG_SUPPRESS(boolean_controlling_expr_is_constant)
|
||||||
// Disable the "statement is unreachable" message
|
// Disable the "statement is unreachable" message
|
||||||
#pragma diag_suppress code_is_unreachable
|
EIGEN_NV_DIAG_SUPPRESS(code_is_unreachable)
|
||||||
// Disable the "dynamic initialization in unreachable code" message
|
// Disable the "dynamic initialization in unreachable code" message
|
||||||
#pragma diag_suppress initialization_not_reachable
|
EIGEN_NV_DIAG_SUPPRESS(initialization_not_reachable)
|
||||||
// Disable the "invalid error number" message that we get with older versions of nvcc
|
// Disable the "invalid error number" message that we get with older versions of nvcc
|
||||||
#pragma diag_suppress 1222
|
EIGEN_NV_DIAG_SUPPRESS(1222)
|
||||||
// Disable the "calling a __host__ function from a __host__ __device__ function is not allowed" messages (yes, there are many of them and they seem to change with every version of the compiler)
|
// Disable the "calling a __host__ function from a __host__ __device__ function is not allowed" messages (yes, there are many of them and they seem to change with every version of the compiler)
|
||||||
#pragma diag_suppress 2527
|
EIGEN_NV_DIAG_SUPPRESS(2527)
|
||||||
#pragma diag_suppress 2529
|
EIGEN_NV_DIAG_SUPPRESS(2529)
|
||||||
#pragma diag_suppress 2651
|
EIGEN_NV_DIAG_SUPPRESS(2651)
|
||||||
#pragma diag_suppress 2653
|
EIGEN_NV_DIAG_SUPPRESS(2653)
|
||||||
#pragma diag_suppress 2668
|
EIGEN_NV_DIAG_SUPPRESS(2668)
|
||||||
#pragma diag_suppress 2669
|
EIGEN_NV_DIAG_SUPPRESS(2669)
|
||||||
#pragma diag_suppress 2670
|
EIGEN_NV_DIAG_SUPPRESS(2670)
|
||||||
#pragma diag_suppress 2671
|
EIGEN_NV_DIAG_SUPPRESS(2671)
|
||||||
#pragma diag_suppress 2735
|
EIGEN_NV_DIAG_SUPPRESS(2735)
|
||||||
#pragma diag_suppress 2737
|
EIGEN_NV_DIAG_SUPPRESS(2737)
|
||||||
#pragma diag_suppress 2739
|
EIGEN_NV_DIAG_SUPPRESS(2739)
|
||||||
#pragma diag_suppress 2885
|
EIGEN_NV_DIAG_SUPPRESS(2885)
|
||||||
#pragma diag_suppress 2888
|
EIGEN_NV_DIAG_SUPPRESS(2888)
|
||||||
#pragma diag_suppress 2976
|
EIGEN_NV_DIAG_SUPPRESS(2976)
|
||||||
#pragma diag_suppress 2979
|
EIGEN_NV_DIAG_SUPPRESS(2979)
|
||||||
#pragma diag_suppress 20011
|
EIGEN_NV_DIAG_SUPPRESS(20011)
|
||||||
#pragma diag_suppress 20014
|
EIGEN_NV_DIAG_SUPPRESS(20014)
|
||||||
// Disable the "// __device__ annotation is ignored on a function(...) that is
|
// Disable the "// __device__ annotation is ignored on a function(...) that is
|
||||||
// explicitly defaulted on its first declaration" message.
|
// explicitly defaulted on its first declaration" message.
|
||||||
// The __device__ annotation seems to actually be needed in some cases,
|
// The __device__ annotation seems to actually be needed in some cases,
|
||||||
// otherwise resulting in kernel runtime errors.
|
// otherwise resulting in kernel runtime errors.
|
||||||
#pragma diag_suppress 2886
|
EIGEN_NV_DIAG_SUPPRESS(2886)
|
||||||
#pragma diag_suppress 2977
|
EIGEN_NV_DIAG_SUPPRESS(2977)
|
||||||
#pragma diag_suppress 20012
|
EIGEN_NV_DIAG_SUPPRESS(20012)
|
||||||
|
#undef EIGEN_NV_DIAG_SUPPRESS
|
||||||
|
#undef EIGEN_MAKE_PRAGMA
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -20,10 +20,18 @@
|
|||||||
// Don't re-enable the diagnostic messages, as it turns out these messages need
|
// Don't re-enable the diagnostic messages, as it turns out these messages need
|
||||||
// to be disabled at the point of the template instantiation (i.e the user code)
|
// to be disabled at the point of the template instantiation (i.e the user code)
|
||||||
// otherwise they'll be triggered by nvcc.
|
// otherwise they'll be triggered by nvcc.
|
||||||
// #pragma diag_default code_is_unreachable
|
// #define EIGEN_MAKE_PRAGMA(X) _Pragma(#X)
|
||||||
// #pragma diag_default initialization_not_reachable
|
// #if __NVCC_DIAG_PRAGMA_SUPPORT__
|
||||||
// #pragma diag_default 2651
|
// #define EIGEN_NV_DIAG_DEFAULT(X) EIGEN_MAKE_PRAGMA(nv_diag_default X)
|
||||||
// #pragma diag_default 2653
|
// #else
|
||||||
|
// #define EIGEN_NV_DIAG_DEFAULT(X) EIGEN_MAKE_PRAGMA(diag_default X)
|
||||||
|
// #endif
|
||||||
|
// EIGEN_NV_DIAG_DEFAULT(code_is_unreachable)
|
||||||
|
// EIGEN_NV_DIAG_DEFAULT(initialization_not_reachable)
|
||||||
|
// EIGEN_NV_DIAG_DEFAULT(2651)
|
||||||
|
// EIGEN_NV_DIAG_DEFAULT(2653)
|
||||||
|
// #undef EIGEN_NV_DIAG_DEFAULT
|
||||||
|
// #undef EIGEN_MAKE_PRAGMA
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user