Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Apr 29, 2024
1 parent 3ddb97b commit a3d46da
Show file tree
Hide file tree
Showing 4 changed files with 696 additions and 707 deletions.
4 changes: 4 additions & 0 deletions src/layer/arm/lstm_int8.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ static void lstm_transform_weight_int8(const Mat& weight_xc, const Mat& weight_x
float* descales_ptr = weight_data_tm_int8_descales_dr.row(q);

int i = 0;
#if __ARM_NEON
#if __ARM_FEATURE_DOTPROD
for (; i + 3 < size; i += 4)
{
Expand Down Expand Up @@ -112,6 +113,7 @@ static void lstm_transform_weight_int8(const Mat& weight_xc, const Mat& weight_x
kptr[7] = weight_xc_G[i + 1];
kptr += 8;
}
#endif // __ARM_NEON
for (; i < size; i++)
{
kptr[0] = weight_xc_I[i];
Expand All @@ -122,6 +124,7 @@ static void lstm_transform_weight_int8(const Mat& weight_xc, const Mat& weight_x
}

i = 0;
#if __ARM_NEON
#if __ARM_FEATURE_DOTPROD
for (; i + 3 < num_output; i += 4)
{
Expand Down Expand Up @@ -156,6 +159,7 @@ static void lstm_transform_weight_int8(const Mat& weight_xc, const Mat& weight_x
kptr[7] = weight_hc_G[i + 1];
kptr += 8;
}
#endif // __ARM_NEON
for (; i < num_output; i++)
{
kptr[0] = weight_hc_I[i];
Expand Down
Loading

0 comments on commit a3d46da

Please sign in to comment.