From e24065e79b8102ea8cf0996a133e14ced1479347 Mon Sep 17 00:00:00 2001 From: Aaron Enye Shi Date: Tue, 22 Jan 2019 16:21:16 +0000 Subject: [PATCH] Allow hip-clang to use amd_mixed_dot as well [ROCm/clr commit: b0e0ec3c673d8e66920ccb03e4a13e40159f0a60] --- projects/clr/hipamd/include/hip/hcc_detail/hip_fp16.h | 2 +- projects/clr/hipamd/include/hip/hcc_detail/hip_fp16_math_fwd.h | 2 +- projects/clr/hipamd/include/hip/hcc_detail/math_functions.h | 2 +- projects/clr/hipamd/include/hip/hcc_detail/math_fwd.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/clr/hipamd/include/hip/hcc_detail/hip_fp16.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_fp16.h index 103e9765e1..a718678539 100644 --- a/projects/clr/hipamd/include/hip/hcc_detail/hip_fp16.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/hip_fp16.h @@ -1403,7 +1403,7 @@ THE SOFTWARE. } // Math functions - #if (__hcc_workweek__ >= 19015) + #if (__hcc_workweek__ >= 19015) || defined(__HIP_CLANG_ONLY__) inline __device__ float amd_mixed_dot(__half2 a, __half2 b, float c, bool saturate) { diff --git a/projects/clr/hipamd/include/hip/hcc_detail/hip_fp16_math_fwd.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_fp16_math_fwd.h index 2cb8556e63..0c025db786 100644 --- a/projects/clr/hipamd/include/hip/hcc_detail/hip_fp16_math_fwd.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/hip_fp16_math_fwd.h @@ -53,7 +53,7 @@ extern "C" typedef _Float16 __2f16 __attribute__((ext_vector_type(2))); typedef short __2i16 __attribute__((ext_vector_type(2))); - #if (__hcc_workweek__ >= 19015) + #if (__hcc_workweek__ >= 19015) || defined(__HIP_CLANG_ONLY__) __device__ __attribute__((const)) float __ockl_fdot2(__2f16 a, __2f16 b, float c, bool s); #endif diff --git a/projects/clr/hipamd/include/hip/hcc_detail/math_functions.h b/projects/clr/hipamd/include/hip/hcc_detail/math_functions.h index c5ebd9703d..c3a790751b 100644 --- a/projects/clr/hipamd/include/hip/hcc_detail/math_functions.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/math_functions.h @@ -121,7 +121,7 @@ uint64_t __make_mantissa(const char* tagp) } // DOT FUNCTIONS -#if (__hcc_workweek__ >= 19015) +#if (__hcc_workweek__ >= 19015) || defined(__HIP_CLANG_ONLY__) __DEVICE__ inline int amd_mixed_dot(short2 a, short2 b, int c, bool saturate) { diff --git a/projects/clr/hipamd/include/hip/hcc_detail/math_fwd.h b/projects/clr/hipamd/include/hip/hcc_detail/math_fwd.h index 9d4d51cf36..cdf8e78da4 100644 --- a/projects/clr/hipamd/include/hip/hcc_detail/math_fwd.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/math_fwd.h @@ -29,7 +29,7 @@ THE SOFTWARE. #endif // DOT FUNCTIONS -#if (__hcc_workweek__ >= 19015) +#if (__hcc_workweek__ >= 19015) || defined(__HIP_CLANG_ONLY__) __device__ __attribute__((const)) int __ockl_sdot2(short2 a, short2 b, int c, bool s);