Commit 2e7e564a authored by Rostyslav Geyyer's avatar Rostyslav Geyyer
Browse files

Add fp8<->fp16 to PassThrough element op

parent cf0845ac
......@@ -99,6 +99,18 @@ struct PassThrough
{
y = type_convert<f8_t>(x);
}
template <>
__host__ __device__ void operator()<half_t, f8_t>(half_t& y, const f8_t& x) const
{
y = type_convert<half_t>(x);
}
template <>
__host__ __device__ void operator()<f8_t, half_t>(f8_t& y, const half_t& x) const
{
y = type_convert<f8_t>(x);
}
};
struct UnaryConvert
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment