Move fp16 dot functions to hip_fp16

Tento commit je obsažen v:
Aaron Enye Shi
2019-01-14 21:50:32 +00:00
rodič aae1f4f96e
revize f0b114ee1c
4 změnil soubory, kde provedl 10 přidání a 10 odebrání
+7
Zobrazit soubor
@@ -1405,6 +1405,13 @@ THE SOFTWARE.
// Math functions
inline
__device__
float amd_mixed_dot(__half2 a, __half2 b, float c, bool saturate) {
return __ockl_fdot2(static_cast<__half2_raw>(a).data,
static_cast<__half2_raw>(b).data,
c, saturate);
}
inline
__device__
__half htrunc(__half x)
{
return __half_raw{
+3 -1
Zobrazit soubor
@@ -53,6 +53,8 @@ extern "C"
typedef _Float16 __2f16 __attribute__((ext_vector_type(2)));
typedef short __2i16 __attribute__((ext_vector_type(2)));
__device__ __attribute__((const)) float __ockl_fdot2(__2f16 a, __2f16 b, float c, bool s);
__device__ __attribute__((const)) __2f16 __ocml_ceil_2f16(__2f16);
__device__ __2f16 __ocml_cos_2f16(__2f16);
__device__ __attribute__((pure)) __2f16 __ocml_exp_2f16(__2f16);
@@ -75,4 +77,4 @@ extern "C"
__device__ __2f16 __ocml_sin_2f16(__2f16);
__device__ __attribute__((const)) __2f16 __ocml_sqrt_2f16(__2f16);
__device__ __attribute__((const)) __2f16 __ocml_trunc_2f16(__2f16);
}
}
-5
Zobrazit soubor
@@ -123,11 +123,6 @@ uint64_t __make_mantissa(const char* tagp)
// DOT FUNCTIONS
__DEVICE__
inline
float amd_mixed_dot(__2f16 a, __2f16 b, float c, bool saturate) {
return __ockl_fdot2(a, b, c, saturate);
}
__DEVICE__
inline
int amd_mixed_dot(short2 a, short2 b, int c, bool saturate) {
return __ockl_sdot2(a, b, c, saturate);
}
-4
Zobrazit soubor
@@ -29,10 +29,6 @@ THE SOFTWARE.
#endif
// DOT FUNCTIONS
typedef _Float16 __2f16 __attribute__((ext_vector_type(2)));
__device__
__attribute__((const))
float __ockl_fdot2(__2f16 a, __2f16 b, float c, bool s);
__device__
__attribute__((const))
int __ockl_sdot2(short2 a, short2 b, int c, bool s);