mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-20 14:59:17 +00:00
Explicit cast values to half (#1593)
Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
This commit is contained in:
@@ -653,7 +653,7 @@ inline __device__ double sin<double>(double x)
|
||||
template <>
|
||||
inline __device__ half_t sin<half_t>(half_t x)
|
||||
{
|
||||
return ::hsin(x);
|
||||
return hsin(static_cast<__half>(x));
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@@ -785,7 +785,7 @@ inline __device__ double ceil<double>(double x)
|
||||
template <>
|
||||
inline __device__ half_t ceil<half_t>(half_t x)
|
||||
{
|
||||
return ::hceil(x);
|
||||
return hceil(static_cast<__half>(x));
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@@ -827,7 +827,7 @@ inline __device__ double floor<double>(double x)
|
||||
template <>
|
||||
inline __device__ half_t floor<half_t>(half_t x)
|
||||
{
|
||||
return ::hfloor(x);
|
||||
return hfloor(static_cast<__half>(x));
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@@ -849,7 +849,7 @@ inline __device__ T exp(T x)
|
||||
template <>
|
||||
inline __device__ half_t exp<half_t>(half_t x)
|
||||
{
|
||||
return hexp(x);
|
||||
return hexp(static_cast<__half>(x));
|
||||
};
|
||||
|
||||
template <>
|
||||
@@ -873,7 +873,7 @@ inline __device__ T log(T x)
|
||||
template <>
|
||||
inline __device__ half_t log<half_t>(half_t x)
|
||||
{
|
||||
return hlog(x);
|
||||
return hlog(static_cast<__half>(x));
|
||||
};
|
||||
|
||||
template <>
|
||||
|
||||
Reference in New Issue
Block a user