Commit 5490de18 authored by rocking's avatar rocking
Browse files

Cast only constant

parent 7b6c15b9
...@@ -91,7 +91,7 @@ struct ReferenceLayernorm : public device::BaseOperator ...@@ -91,7 +91,7 @@ struct ReferenceLayernorm : public device::BaseOperator
for(int m = 0; m < M; ++m) for(int m = 0; m < M; ++m)
{ {
AccDataType divisor = AccDataType divisor =
static_cast<AccDataType>(1 / ck::math::sqrt(var(m) + arg.epsilon_)); static_cast<AccDataType>(1) / ck::math::sqrt(var(m) + arg.epsilon_);
for(int n = 0; n < N; ++n) for(int n = 0; n < N; ++n)
{ {
......
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