From f3c39a8cfa74ddaf1f2013bb1b4c676ebd8303bf Mon Sep 17 00:00:00 2001 From: Aaron En Ye Shi Date: Mon, 19 Oct 2020 15:01:07 +0000 Subject: [PATCH] Fix header invalid sqrt fwd decl and ifdef The __ocml_sqrt_* functions only accept a single arg, not two args. Also, change ifdef for if because the flag __HCC_OR_HIP_CLANG__ is always defined. Change-Id: Id9dc4eaf0f25df1df27a1bf643cb545ac23653f8 [ROCm/clr commit: bd9ed9ad3d5ed90a2f04f21c486f6f908dc7fa9b] --- .../include/hip/hcc_detail/device_functions.h | 2 +- .../clr/hipamd/include/hip/hcc_detail/math_fwd.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/projects/clr/hipamd/include/hip/hcc_detail/device_functions.h b/projects/clr/hipamd/include/hip/hcc_detail/device_functions.h index e2ffacca2d..be5ef9d159 100644 --- a/projects/clr/hipamd/include/hip/hcc_detail/device_functions.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/device_functions.h @@ -972,7 +972,7 @@ __device__ static inline float __ull2float_rz(unsigned long long int x) { return #define __HCC_OR_HIP_CLANG__ 0 #endif -#ifdef __HCC_OR_HIP_CLANG__ +#if __HCC_OR_HIP_CLANG__ // Clock functions __device__ long long int __clock64(); 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 34b38aa723..c197af8976 100644 --- a/projects/clr/hipamd/include/hip/hcc_detail/math_fwd.h +++ b/projects/clr/hipamd/include/hip/hcc_detail/math_fwd.h @@ -364,16 +364,16 @@ __attribute__((const)) float __ocml_div_rtz_f32(float, float); __device__ __attribute__((const)) -float __ocml_sqrt_rte_f32(float, float); +float __ocml_sqrt_rte_f32(float); __device__ __attribute__((const)) -float __ocml_sqrt_rtn_f32(float, float); +float __ocml_sqrt_rtn_f32(float); __device__ __attribute__((const)) -float __ocml_sqrt_rtp_f32(float, float); +float __ocml_sqrt_rtp_f32(float); __device__ __attribute__((const)) -float __ocml_sqrt_rtz_f32(float, float); +float __ocml_sqrt_rtz_f32(float); __device__ __attribute__((const)) float __ocml_fma_rte_f32(float, float, float); @@ -675,16 +675,16 @@ __attribute__((const)) double __ocml_div_rtz_f64(double, double); __device__ __attribute__((const)) -double __ocml_sqrt_rte_f64(double, double); +double __ocml_sqrt_rte_f64(double); __device__ __attribute__((const)) -double __ocml_sqrt_rtn_f64(double, double); +double __ocml_sqrt_rtn_f64(double); __device__ __attribute__((const)) -double __ocml_sqrt_rtp_f64(double, double); +double __ocml_sqrt_rtp_f64(double); __device__ __attribute__((const)) -double __ocml_sqrt_rtz_f64(double, double); +double __ocml_sqrt_rtz_f64(double); __device__ __attribute__((const)) double __ocml_fma_rte_f64(double, double, double);