Skip to content

Commit

Permalink
restrict one dim dequantize scale bias size (#5886)
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui authored Jan 23, 2025
1 parent 21a71d3 commit 48e1260
Show file tree
Hide file tree
Showing 9 changed files with 540 additions and 4,575 deletions.
11 changes: 10 additions & 1 deletion src/layer/arm/convolution_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,16 @@ int Convolution_arm::forward_int8_arm(const Mat& bottom_blob, Mat& top_blob, con
#if __ARM_NEON
if (opt.use_packing_layout)
{
out_elempack_int32 = num_output % 8 == 0 ? 8 : num_output % 4 == 0 ? 4 : 1;
#if NCNN_ARM82
if (ncnn::cpu_support_arm_asimdhp() && opt.use_fp16_arithmetic)
{
out_elempack_int32 = num_output % 8 == 0 ? 8 : num_output % 4 == 0 ? 4 : 1;
}
else
#endif // NCNN_ARM82
{
out_elempack_int32 = num_output % 4 == 0 ? 4 : 1;
}
}
#endif // __ARM_NEON

Expand Down
Loading

0 comments on commit 48e1260

Please sign in to comment.