From 7066754d6d1ba44533780192382584c0858e65e6 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/hip commit: 20999c719d7d230343c66bd18196c7eb28c38f2f] --- .../include/hip/hcc_detail/device_functions.h | 2 +- projects/hip/include/hip/hcc_detail/math_fwd.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/projects/hip/include/hip/hcc_detail/device_functions.h b/projects/hip/include/hip/hcc_detail/device_functions.h index e2ffacca2d..be5ef9d159 100644 --- a/projects/hip/include/hip/hcc_detail/device_functions.h +++ b/projects/hip/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/hip/include/hip/hcc_detail/math_fwd.h b/projects/hip/include/hip/hcc_detail/math_fwd.h index 34b38aa723..c197af8976 100644 --- a/projects/hip/include/hip/hcc_detail/math_fwd.h +++ b/projects/hip/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);