From 2d5e831c7f4e33feaabce262d67cd488e90e6b99 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Sat, 7 Jul 2018 23:30:39 -0400 Subject: [PATCH] Add declare of __get_dynamicgroupbaseptr for host compilation [ROCm/clr commit: 1f34993ac1e112b82bc319cca3fde2dd21316809] --- .../clr/hipamd/include/hip/hcc_detail/device_functions.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/include/hip/hcc_detail/device_functions.h b/projects/clr/hipamd/include/hip/hcc_detail/device_functions.h index 716c51a887..0b7dd81d67 100644 --- a/projects/clr/hipamd/include/hip/hcc_detail/device_functions.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/device_functions.h @@ -735,7 +735,6 @@ int64_t __lanemask_lt() } #ifdef __HIP_DEVICE_COMPILE__ - __device__ inline void* __get_dynamicgroupbaseptr() @@ -743,6 +742,10 @@ void* __get_dynamicgroupbaseptr() // Get group segment base pointer. return (char*)__local_to_generic(__to_local(__llvm_amdgcn_groupstaticsize())); } +#else +__device__ +void* __get_dynamicgroupbaseptr(); +#endif // __HIP_DEVICE_COMPILE__ __device__ inline @@ -750,7 +753,6 @@ void *__amdgcn_get_dynamicgroupbaseptr() { return __get_dynamicgroupbaseptr(); } -#endif // __HIP_DEVICE_COMPILE__ // hip.amdgcn.bc - sync threads