From cd61d38118fa9777be1504813fde4a53b86ebcfa Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Wed, 29 Nov 2017 21:47:04 +0000 Subject: [PATCH] Use a much simpler guard for version 1.6, which allows for direct CUDA indexing to be used. [ROCm/hip commit: 7acb1e6ff6152bc2f58d0761ac00c06415db7c5e] --- projects/hip/include/hip/hcc_detail/host_defines.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/hip/include/hip/hcc_detail/host_defines.h b/projects/hip/include/hip/hcc_detail/host_defines.h index 56cfa0cc0f..d600956087 100644 --- a/projects/hip/include/hip/hcc_detail/host_defines.h +++ b/projects/hip/include/hip/hcc_detail/host_defines.h @@ -44,8 +44,12 @@ THE SOFTWARE. #if GENERIC_GRID_LAUNCH == 0 #define __global__ __attribute__((hc_grid_launch)) __attribute__((used)) #else -#define __global__ \ - __attribute__((annotate("__HIP_global_function__"), cpu, hc, used)) + #if __hcc_workweek__ >=17481 + #define __global__ \ + __attribute__((annotate("__HIP_global_function__"), cpu, hc, used)) + #else + #define __global__ __attribute__((hc, used)) + #endif #endif //GENERIC_GRID_LAUNCH #define __noinline__ __attribute__((noinline))