Skip to content

Commit

Permalink
fix woa build
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Sep 3, 2024
1 parent f269b20 commit e778300
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/layer/arm/rmsnorm_arm_asimdhp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static void rmsnorm_fp16s(__fp16* ptr, const float* gamma_ptr, float eps, int el
}
for (; i < size; i++)
{
sqsum += ptr0[0] * ptr0[0];
sqsum += (float)ptr0[0] * (float)ptr0[0];
ptr0++;
}
}
Expand Down Expand Up @@ -183,7 +183,7 @@ static void rmsnorm_fp16s(__fp16* ptr, const float* gamma_ptr, float eps, int el
}
for (; i < size; i++)
{
ptr[0] = (ptr[0] * a) * gamma_ptr[0];
ptr[0] = (__fp16)(((float)ptr[0] * a) * gamma_ptr[0]);
ptr++;
gamma_ptr++;
}
Expand Down Expand Up @@ -211,7 +211,7 @@ static void rmsnorm_fp16s(__fp16* ptr, const float* gamma_ptr, float eps, int el
}
for (; i < size; i++)
{
ptr[0] = ptr[0] * a;
ptr[0] = (__fp16)((float)ptr[0] * a);
ptr++;
}
}
Expand Down

0 comments on commit e778300

Please sign in to comment.