From 4bd3a9fb18e953171285b9107353fa3bca91bf7e Mon Sep 17 00:00:00 2001 From: mshivama Date: Tue, 22 Sep 2020 12:19:16 +0530 Subject: [PATCH] Layout the cooperative group related headers to target Nvidia Change-Id: I530ffc72d6fae1e273b5322d508629221e11ea6f [ROCm/clr commit: b35f5215b2f254e961441744fb9b4f08aa1e1f93] --- .../clr/hipamd/include/hip/hip_cooperative_groups.h | 5 ++++- .../include/hip/nvcc_detail/hip_cooperative_groups.h | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 projects/clr/hipamd/include/hip/nvcc_detail/hip_cooperative_groups.h diff --git a/projects/clr/hipamd/include/hip/hip_cooperative_groups.h b/projects/clr/hipamd/include/hip/hip_cooperative_groups.h index 5f6e18ea56..41f36378bb 100644 --- a/projects/clr/hipamd/include/hip/hip_cooperative_groups.h +++ b/projects/clr/hipamd/include/hip/hip_cooperative_groups.h @@ -30,12 +30,15 @@ THE SOFTWARE. #ifndef HIP_INCLUDE_HIP_HIP_COOPERATIVE_GROUP_H #define HIP_INCLUDE_HIP_HIP_COOPERATIVE_GROUP_H +#include +#include + #if defined(__HIP_PLATFORM_HCC__) && !defined(__HIP_PLATFORM_NVCC__) #if __cplusplus && defined(__clang__) && defined(__HIP__) #include #endif #elif defined(__HIP_PLATFORM_NVCC__) && !defined(__HIP_PLATFORM_HCC__) -#include +#include #else #error("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__"); #endif diff --git a/projects/clr/hipamd/include/hip/nvcc_detail/hip_cooperative_groups.h b/projects/clr/hipamd/include/hip/nvcc_detail/hip_cooperative_groups.h new file mode 100644 index 0000000000..113e600eec --- /dev/null +++ b/projects/clr/hipamd/include/hip/nvcc_detail/hip_cooperative_groups.h @@ -0,0 +1,12 @@ +#ifndef HIP_INCLUDE_HIP_NVCC_DETAIL_HIP_COOPERATIVE_GROUPS_H +#define HIP_INCLUDE_HIP_NVCC_DETAIL_HIP_COOPERATIVE_GROUPS_H + +// Include CUDA headers +#include +#include + +// Include HIP wrapper headers around CUDA +#include +#include + +#endif // HIP_INCLUDE_HIP_NVCC_DETAIL_HIP_COOPERATIVE_GROUPS_H