From 5e3c45afde5a6e6ac76d8d29143fbe23de8a4607 Mon Sep 17 00:00:00 2001 From: Michael LIAO Date: Wed, 17 Jun 2020 11:56:10 -0400 Subject: [PATCH] [hip] Disable `assert` workaround for HCC on HIP-Clang. - HIP-Clang follows the standard assert definition by providing `__assert_fail`. But, `assert` macro is added as an HCC-specific workaround due to the missing implementation. Only enable that on the HCC compilation to avoid unexpected behaviors on HIP-Clang compilation. Change-Id: I1c9a707baff9b85c30faef58c52ebfe07e3fc3fc [ROCm/clr commit: 41aedf5273117870e9d9bedbad0d734e0a092da8] --- projects/clr/hipamd/include/hip/hcc_detail/hip_runtime.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/include/hip/hcc_detail/hip_runtime.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_runtime.h index b022b8fcdb..c35a435fea 100644 --- a/projects/clr/hipamd/include/hip/hcc_detail/hip_runtime.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/hip_runtime.h @@ -121,7 +121,7 @@ extern int HIP_TRACE_API; #endif // TODO-HCC add a dummy implementation of assert, need to replace with a proper kernel exit call. -#if __HIP_DEVICE_COMPILE__ == 1 +#if defined(__HCC__) && __HIP_DEVICE_COMPILE__ == 1 #undef assert #define assert(COND) \ { \