Commit f1245c3b authored by rocking's avatar rocking
Browse files

Refine bias elementwise op

parent d6dff178
......@@ -26,14 +26,9 @@ struct PassThrough
// TODO - Move bias functor to the kernel
struct Bias
{
__host__ __device__ constexpr void operator()(float& y_plus_bias, const float& y, const float& bias) const
__host__ __device__ constexpr void operator()(half_t& y_plus_bias, const half_t& y, const half_t& bias) const
{
y_plus_bias = y + bias;
}
__host__ __device__ constexpr void operator()(half_t& y_plus_bias, const half_t& y, const float& bias) const
{
y_plus_bias = y + bias;
y_plus_bias = y_plus_bias = y + bias;
}
};
......
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