From 48e81cf6f8603b3552f0de6852ad6117024fa0d6 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Wed, 16 Sep 2020 00:31:03 +0100 Subject: [PATCH] Hip Pragmas --- Grid/Grid_Eigen_Dense.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Grid/Grid_Eigen_Dense.h b/Grid/Grid_Eigen_Dense.h index 9556c03d..d9c002bc 100644 --- a/Grid/Grid_Eigen_Dense.h +++ b/Grid/Grid_Eigen_Dense.h @@ -34,6 +34,12 @@ #define __SYCL__REDEFINE__ #endif +/* HIP save and restore compile environment*/ +#ifdef GRID_HIP +#pragma push +#pragma push_macro("__HIP_DEVICE_COMPILE__") +#endif +#define EIGEN_NO_HIP #include #include @@ -52,6 +58,12 @@ #pragma pop #endif +/*HIP restore*/ +#ifdef __HIP__REDEFINE__ +#pragma pop_macro("__HIP_DEVICE_COMPILE__") +#pragma pop +#endif + #if defined __GNUC__ #pragma GCC diagnostic pop #endif