From d726ba1d9ac5ea19559ec481f171d5e1e434d6a6 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Sat, 2 Jun 2018 18:01:09 -0400 Subject: [PATCH 1/2] Add more function declarations for hip-clang --- include/hip/hcc_detail/hip_runtime.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/hip/hcc_detail/hip_runtime.h b/include/hip/hcc_detail/hip_runtime.h index 1a6b0f7dda..7c1f2a4d16 100644 --- a/include/hip/hcc_detail/hip_runtime.h +++ b/include/hip/hcc_detail/hip_runtime.h @@ -98,6 +98,9 @@ struct Empty_launch_parm {}; #include "grid_launch_GGL.hpp" #endif // GENERIC_GRID_LAUNCH +#endif // HCC + +#if __HCC_OR_HIP_CLANG__ extern int HIP_TRACE_API; #ifdef __cplusplus @@ -106,15 +109,16 @@ extern int HIP_TRACE_API; #include #include #include +#if __HCC___ #include #include +#endif // __HCC__ // TODO-HCC remove old definitions ; ~1602 hcc supports __HCC_ACCELERATOR__ define. #if defined(__KALMAR_ACCELERATOR__) && !defined(__HCC_ACCELERATOR__) #define __HCC_ACCELERATOR__ __KALMAR_ACCELERATOR__ #endif - // TODO-HCC add a dummy implementation of assert, need to replace with a proper kernel exit call. #if __HIP_DEVICE_COMPILE__ == 1 #undef assert @@ -179,10 +183,6 @@ extern int HIP_TRACE_API; #define __HCC_C__ #endif -#endif // defined __HCC__ - -#if __HCC_OR_HIP_CLANG__ - // TODO - hipify-clang - change to use the function call. //#define warpSize hc::__wavesize() static constexpr int warpSize = 64; From dde875f23ba37bc4247942654e69d576fbd89b29 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Thu, 28 Jun 2018 11:19:22 +0530 Subject: [PATCH 2/2] Fix typo --- include/hip/hcc_detail/hip_runtime.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hip/hcc_detail/hip_runtime.h b/include/hip/hcc_detail/hip_runtime.h index 7c1f2a4d16..ca4e73eee0 100644 --- a/include/hip/hcc_detail/hip_runtime.h +++ b/include/hip/hcc_detail/hip_runtime.h @@ -109,7 +109,7 @@ extern int HIP_TRACE_API; #include #include #include -#if __HCC___ +#if __HCC__ #include #include #endif // __HCC__