1414#include "hip/hip_version.h"
1515#endif // __has_include("hip/hip_version.h")
1616
17+ #ifdef __SPIRV__
18+ #define __PRIVATE_AS __attribute__((address_space(0)))
19+ #else
20+ #define __PRIVATE_AS __attribute__((address_space(5)))
21+ #endif
22+
1723#ifdef __cplusplus
1824extern "C" {
1925#endif
@@ -55,8 +61,7 @@ __device__ __attribute__((const)) float __ocml_fmax_f32(float, float);
5561__device__ __attribute__((const )) float __ocml_fmin_f32 (float , float );
5662__device__ __attribute__((const )) __device__ float __ocml_fmod_f32 (float ,
5763 float );
58- __device__ float __ocml_frexp_f32 (float ,
59- __attribute__((address_space (5 ))) int * );
64+ __device__ float __ocml_frexp_f32 (float , __PRIVATE_AS int * );
6065__device__ __attribute__((const )) float __ocml_hypot_f32 (float , float );
6166__device__ __attribute__((const )) int __ocml_ilogb_f32 (float );
6267__device__ __attribute__((const )) int __ocml_isfinite_f32 (float );
@@ -74,8 +79,7 @@ __device__ __attribute__((pure)) float __ocml_native_log2_f32(float);
7479__device__ __attribute__((const )) float __ocml_logb_f32 (float );
7580__device__ __attribute__((pure )) float __ocml_log_f32 (float );
7681__device__ __attribute__((pure )) float __ocml_native_log_f32 (float );
77- __device__ float __ocml_modf_f32 (float ,
78- __attribute__((address_space (5 ))) float * );
82+ __device__ float __ocml_modf_f32 (float , __PRIVATE_AS float * );
7983__device__ __attribute__((const )) float __ocml_nearbyint_f32 (float );
8084__device__ __attribute__((const )) float __ocml_nextafter_f32 (float , float );
8185__device__ __attribute__((const )) float __ocml_len3_f32 (float , float , float );
@@ -87,8 +91,7 @@ __device__ __attribute__((pure)) float __ocml_pow_f32(float, float);
8791__device__ __attribute__((pure )) float __ocml_pown_f32 (float , int );
8892__device__ __attribute__((pure )) float __ocml_rcbrt_f32 (float );
8993__device__ __attribute__((const )) float __ocml_remainder_f32 (float , float );
90- __device__ float __ocml_remquo_f32 (float , float ,
91- __attribute__((address_space (5 ))) int * );
94+ __device__ float __ocml_remquo_f32 (float , float , __PRIVATE_AS int * );
9295__device__ __attribute__((const )) float __ocml_rhypot_f32 (float , float );
9396__device__ __attribute__((const )) float __ocml_rint_f32 (float );
9497__device__ __attribute__((const )) float __ocml_rlen3_f32 (float , float , float );
@@ -99,10 +102,8 @@ __device__ __attribute__((pure)) float __ocml_rsqrt_f32(float);
99102__device__ __attribute__((const )) float __ocml_scalb_f32 (float , float );
100103__device__ __attribute__((const )) float __ocml_scalbn_f32 (float , int );
101104__device__ __attribute__((const )) int __ocml_signbit_f32 (float );
102- __device__ float __ocml_sincos_f32 (float ,
103- __attribute__((address_space (5 ))) float * );
104- __device__ float __ocml_sincospi_f32 (float ,
105- __attribute__((address_space (5 ))) float * );
105+ __device__ float __ocml_sincos_f32 (float , __PRIVATE_AS float * );
106+ __device__ float __ocml_sincospi_f32 (float , __PRIVATE_AS float * );
106107__device__ float __ocml_sin_f32 (float );
107108__device__ float __ocml_native_sin_f32 (float );
108109__device__ __attribute__((pure )) float __ocml_sinh_f32 (float );
@@ -176,8 +177,7 @@ __device__ __attribute__((const)) double __ocml_fma_f64(double, double, double);
176177__device__ __attribute__((const )) double __ocml_fmax_f64 (double , double );
177178__device__ __attribute__((const )) double __ocml_fmin_f64 (double , double );
178179__device__ __attribute__((const )) double __ocml_fmod_f64 (double , double );
179- __device__ double __ocml_frexp_f64 (double ,
180- __attribute__((address_space (5 ))) int * );
180+ __device__ double __ocml_frexp_f64 (double , __PRIVATE_AS int * );
181181__device__ __attribute__((const )) double __ocml_hypot_f64 (double , double );
182182__device__ __attribute__((const )) int __ocml_ilogb_f64 (double );
183183__device__ __attribute__((const )) int __ocml_isfinite_f64 (double );
@@ -192,8 +192,7 @@ __device__ __attribute__((pure)) double __ocml_log1p_f64(double);
192192__device__ __attribute__((pure )) double __ocml_log2_f64 (double );
193193__device__ __attribute__((const )) double __ocml_logb_f64 (double );
194194__device__ __attribute__((pure )) double __ocml_log_f64 (double );
195- __device__ double __ocml_modf_f64 (double ,
196- __attribute__((address_space (5 ))) double * );
195+ __device__ double __ocml_modf_f64 (double , __PRIVATE_AS double * );
197196__device__ __attribute__((const )) double __ocml_nearbyint_f64 (double );
198197__device__ __attribute__((const )) double __ocml_nextafter_f64 (double , double );
199198__device__ __attribute__((const )) double __ocml_len3_f64 (double , double ,
@@ -206,8 +205,7 @@ __device__ __attribute__((pure)) double __ocml_pow_f64(double, double);
206205__device__ __attribute__((pure )) double __ocml_pown_f64 (double , int );
207206__device__ __attribute__((pure )) double __ocml_rcbrt_f64 (double );
208207__device__ __attribute__((const )) double __ocml_remainder_f64 (double , double );
209- __device__ double __ocml_remquo_f64 (double , double ,
210- __attribute__((address_space (5 ))) int * );
208+ __device__ double __ocml_remquo_f64 (double , double , __PRIVATE_AS int * );
211209__device__ __attribute__((const )) double __ocml_rhypot_f64 (double , double );
212210__device__ __attribute__((const )) double __ocml_rint_f64 (double );
213211__device__ __attribute__((const )) double __ocml_rlen3_f64 (double , double ,
@@ -219,10 +217,8 @@ __device__ __attribute__((pure)) double __ocml_rsqrt_f64(double);
219217__device__ __attribute__((const )) double __ocml_scalb_f64 (double , double );
220218__device__ __attribute__((const )) double __ocml_scalbn_f64 (double , int );
221219__device__ __attribute__((const )) int __ocml_signbit_f64 (double );
222- __device__ double __ocml_sincos_f64 (double ,
223- __attribute__((address_space (5 ))) double * );
224- __device__ double
225- __ocml_sincospi_f64 (double , __attribute__((address_space (5 ))) double * );
220+ __device__ double __ocml_sincos_f64 (double , __PRIVATE_AS double * );
221+ __device__ double __ocml_sincospi_f64 (double , __PRIVATE_AS double * );
226222__device__ double __ocml_sin_f64 (double );
227223__device__ __attribute__((pure )) double __ocml_sinh_f64 (double );
228224__device__ double __ocml_sinpi_f64 (double );
0 commit comments