From d10837db9d789ed37e281aebce8eb098fd41045c Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Mon, 23 Dec 2019 08:54:54 -0500 Subject: [PATCH] Add macro __HIP_ENABLE_CUDA_WRAPPER_FOR_OPENMP__ (#1761) This is to allow force enable cuda wrapper for OpenMP for flexibility [ROCm/hip commit: 3c90d57072e74deb93d82e3430db2067e66a5b65] --- projects/hip/include/hip/hcc_detail/hip_runtime.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/hip/include/hip/hcc_detail/hip_runtime.h b/projects/hip/include/hip/hcc_detail/hip_runtime.h index fbba1419fa..4240dd7259 100644 --- a/projects/hip/include/hip/hcc_detail/hip_runtime.h +++ b/projects/hip/include/hip/hcc_detail/hip_runtime.h @@ -506,7 +506,7 @@ hc_get_workitem_absolute_id(int dim) #endif // Support std::complex. -#ifndef _OPENMP +#if !_OPENMP || __HIP_ENABLE_CUDA_WRAPPER_FOR_OPENMP__ #pragma push_macro("__CUDA__") #define __CUDA__ #include <__clang_cuda_math_forward_declares.h> @@ -516,7 +516,7 @@ hc_get_workitem_absolute_id(int dim) #include #undef __CUDA__ #pragma pop_macro("__CUDA__") -#endif // ndef _OPENMP +#endif // !_OPENMP || __HIP_ENABLE_CUDA_WRAPPER_FOR_OPENMP__ #endif // defined(__clang__) && defined(__HIP__)