mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-20 12:59:49 +00:00
fixed fp8 issues (#894)
* fixed fp8 init; and reference gemm
* Update host_tensor_generator.hpp
* fixed convert
* fixed reference gemm
* fixed comments
* fixed comments
* fixed ci
* fixed computeType
---------
Co-authored-by: Jing Zhang <jizha@amd.com>
[ROCm/composable_kernel commit: a66d14edf2]
This commit is contained in:
@@ -14,18 +14,22 @@ using ComputeDataType = float;
|
||||
|
||||
struct YElementOp
|
||||
{
|
||||
template <typename T>
|
||||
__host__ __device__ void operator()(T& y, const T& x) const
|
||||
template <typename Y, typename X>
|
||||
__host__ __device__ void operator()(Y& y, const X& x) const
|
||||
{
|
||||
static_assert(ck::is_same<T, float>::value || ck::is_same<T, double>::value ||
|
||||
ck::is_same<T, ck::half_t>::value,
|
||||
static_assert(ck::is_same<X, float>::value || ck::is_same<X, double>::value ||
|
||||
ck::is_same<X, ck::half_t>::value,
|
||||
"Data type is not supported by this operation!");
|
||||
|
||||
T a;
|
||||
static_assert(ck::is_same<Y, float>::value || ck::is_same<Y, double>::value ||
|
||||
ck::is_same<Y, ck::half_t>::value,
|
||||
"Data type is not supported by this operation!");
|
||||
|
||||
X a;
|
||||
|
||||
ck::tensor_operation::element_wise::Sigmoid{}(a, x);
|
||||
|
||||
y = x * a;
|
||||
y = ck::type_convert<Y>(x * a);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user