From 3c72e7beea2864802b2c7c2ae7bb14eb092a39ab Mon Sep 17 00:00:00 2001 From: Aryan Salmanpour Date: Fri, 25 Sep 2020 16:28:50 -0400 Subject: [PATCH] rename abort in nvcc path [background] There is currently a compilation issue when both hip/hip_runtime.h and hip/hip_cooperative_groups.h included in a file and hipcc used to compile it on NV platform. The issue is that an abort is defined in hip/nvcc_detail/hip_runtime.h and it is also defined in the CUDA cooperative groups header (/cuda/include/cooperative_groups/details/helpers.h). this is problematic and leads to a compilation issue in hipcc on NV platform. Change-Id: I2ab6982ac4103822a1a4a0ced942cd604d6c19c1 --- include/hip/nvcc_detail/hip_runtime.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hip/nvcc_detail/hip_runtime.h b/include/hip/nvcc_detail/hip_runtime.h index c13540df54..e7c3eaf32a 100644 --- a/include/hip/nvcc_detail/hip_runtime.h +++ b/include/hip/nvcc_detail/hip_runtime.h @@ -104,13 +104,13 @@ typedef int hipLaunchParm; #define HIP_DYNAMIC_SHARED_ATTRIBUTE #ifdef __HIP_DEVICE_COMPILE__ -#define abort() \ +#define abort_() \ { asm("trap;"); } #undef assert #define assert(COND) \ { \ if (!COND) { \ - abort(); \ + abort_(); \ } \ } #endif