From 0bc09def970f652a0c55aa34739c1176a59d07d1 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 [ROCm/clr commit: 35a3304acc0b5cba2f3f3ea227c37a8344047207] --- projects/clr/hipamd/include/hip/nvcc_detail/hip_runtime.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/include/hip/nvcc_detail/hip_runtime.h b/projects/clr/hipamd/include/hip/nvcc_detail/hip_runtime.h index c13540df54..e7c3eaf32a 100644 --- a/projects/clr/hipamd/include/hip/nvcc_detail/hip_runtime.h +++ b/projects/clr/hipamd/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