mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-15 18:42:06 +00:00
Add transpose scale amax example (#1547)
* Add transpose scale amax example
* fixes
* Tune reduce instance
[ROCm/composable_kernel commit: f21cda2536]
This commit is contained in:
@@ -419,6 +419,12 @@ struct UnaryAbs
|
||||
|
||||
y = ck::math::abs(x);
|
||||
};
|
||||
|
||||
template <>
|
||||
__host__ __device__ void operator()(f8_t& y, const f8_t& x) const
|
||||
{
|
||||
y = ck::type_convert<f8_t>(ck::math::abs(ck::type_convert<float>(x)));
|
||||
};
|
||||
};
|
||||
|
||||
struct UnarySqrt
|
||||
|
||||
@@ -80,6 +80,8 @@ static inline __host__ bool isnan(half_t x)
|
||||
return (xx & 0x7FFF) > 0x7C00;
|
||||
};
|
||||
|
||||
static inline __host__ bool isnan(f8_t x) { return (x & 0x80); };
|
||||
|
||||
#ifdef CK_EXPERIMENTAL_BIT_INT_EXTENSION_INT4
|
||||
static inline __host__ bool isnan(int4_t x)
|
||||
{
|
||||
@@ -529,6 +531,8 @@ static inline __device__ bool isnan(half_t x)
|
||||
return (xx & 0x7FFF) > 0x7C00;
|
||||
};
|
||||
|
||||
static inline __device__ bool isnan(f8_t x) { return (x & 0x80); };
|
||||
|
||||
static inline __device__ half_t sqrt(half_t x)
|
||||
{
|
||||
return static_cast<half_t>(__builtin_amdgcn_sqrtf(static_cast<float>(x)));
|
||||
|
||||
Reference in New Issue
Block a user